/* ============================================================
   leslogin.css — Student lesson code entry page
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d1f3c;
  --bg2:      #152848;
  --surface:  #1e3460;
  --border:   #2d4a7a;
  --accent:   #6366f1;
  --accent2:  #818cf8;
  --text:     #e8edf7;
  --muted:    #8fa8c8;
  --green:    #22c55e;
  --red:      #ef4444;
  --radius:   14px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse at 50% 0%, #1a3060 0%, #0d1f3c 70%);
}

/* ── Logo / header ── */
.ll-logo {
  text-align: center;
  margin-bottom: 36px;
}
.ll-logo-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}
.ll-logo h1 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.ll-logo p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ── Card ── */
.ll-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

/* ── Code input ── */
.ll-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
  display: block;
}

.ll-code-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s;
  margin-bottom: 16px;
}
.ll-code-wrap:focus-within {
  border-color: var(--accent);
}

#ll-code-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 16px 18px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  width: 0;
}
#ll-code-input::placeholder {
  color: var(--muted);
  opacity: .5;
  letter-spacing: 2px;
  font-weight: 400;
  font-size: 20px;
}

/* ── Button ── */
.ll-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .08s;
  letter-spacing: .02em;
}
.ll-btn:hover  { background: var(--accent2); }
.ll-btn:active { transform: scale(.98); }
.ll-btn:disabled {
  background: var(--border);
  cursor: not-allowed;
  transform: none;
}

/* ── Error / success ── */
.ll-msg {
  min-height: 22px;
  font-size: 13px;
  margin-bottom: 14px;
  text-align: center;
  border-radius: 8px;
  padding: 0;
}
.ll-msg.error {
  color: var(--red);
  background: rgba(239,68,68,.1);
  padding: 8px 12px;
}
.ll-msg.ok {
  color: var(--green);
  background: rgba(34,197,94,.1);
  padding: 8px 12px;
}

/* ── Divider / hint ── */
.ll-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.6;
}
.ll-hint strong { color: var(--text); }

/* ── Footer ── */
.ll-footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.ll-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
