:root {
  color-scheme: light;
  --bg: #0f172a;
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --error: #dc2626;
  --success: #16a34a;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, var(--bg), #1e293b);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

h1 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  color: var(--text);
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#code {
  width: 100%;
  padding: 16px;
  font-size: 1.3rem;
  text-align: center;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
}

#code:focus {
  border-color: var(--accent);
}

button {
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:active {
  background: var(--accent-dark);
}

button:disabled {
  background: #93a5c4;
  cursor: not-allowed;
}

.status {
  margin-top: 18px;
  min-height: 22px;
  font-size: 0.95rem;
  font-weight: 500;
}

.status[data-state="loading"] {
  color: var(--muted);
}

.status[data-state="error"] {
  color: var(--error);
}

.status[data-state="success"] {
  color: var(--success);
}

.retry-btn {
  margin-top: 10px;
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid #cbd5e1;
}

.retry-btn:active {
  background: #e2e8f0;
}
