:root {
  --bg: #2b1b3d;
  --bg2: #4a2a63;
  --gold: #f4c95d;
  --pink: #ff7ab6;
  --text: #fff7ec;
  --card: rgba(255, 255, 255, 0.08);
  --error: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, var(--bg2), var(--bg));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.wrap {
  width: 100%;
  max-width: 480px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.hidden { display: none !important; }

h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.subtitle {
  opacity: 0.85;
  margin-bottom: 24px;
  line-height: 1.4;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

input {
  font-size: 1.4rem;
  letter-spacing: 0.3rem;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  border: none;
  outline: none;
}

button {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: var(--gold);
  color: #2b1b3d;
  transition: transform 0.1s ease;
}

button:active { transform: scale(0.97); }

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-top: 16px;
}

.error {
  color: var(--error);
  margin-top: 12px;
  font-weight: 600;
}

.step-indicator {
  opacity: 0.6;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.clue {
  white-space: pre-line;
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 0 28px;
  text-align: left;
}

.finished {
  background: rgba(244, 201, 93, 0.15);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  font-weight: 600;
}

.scanner-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  margin-bottom: 16px;
  border: 3px solid var(--pink);
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
