* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; padding: 24px 24px 50px; display: grid; place-items: center; background: #0C0C0C; color: #E0E0E0; font-family: 'JetBrains Mono', monospace; }
/* Fade the bottom edge to the page background so a tall lesson list doesn't hard-cut. */
body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 150px;
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(12, 12, 12, 0) 0%, rgba(12, 12, 12, .7) 40%, #0C0C0C 85%);
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: 100%; max-width: 450px; }
#authView { width: 100%; max-width: 400px; margin: 0 auto; }
body.outdated-open { overflow: hidden; }
.outdated-overlay {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center; padding: 24px;
    background: #0C0C0C;
}
.outdated-card { width: 100%; max-width: 340px; }
.outdated-kicker { margin-bottom: 16px; color: #555; font-size: .65rem; letter-spacing: .08em; }
.outdated-card h2 { margin: 0 0 8px; color: #fff; font-size: .9rem; font-weight: 600; }
.outdated-copy { margin: 0 0 22px; color: #777; font-size: .72rem; line-height: 1.6; }
.outdated-versions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; font-size: .7rem; }
.outdated-label { color: #555; }
.outdated-installed { color: #FF6B6B; }
.outdated-required { color: #ccc; }
.outdated-arrow { margin: 0 2px; color: #333; }
.outdated-hint { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06); color: #555; font-size: .65rem; }
.view { display: none; }
.view.active { display: block; }
.telegram-link, .logout-btn { position: fixed; top: 24px; color: #555; font-size: .75rem; text-decoration: none; z-index: 2; }
.telegram-link { left: 24px; }
.logout-btn { right: 24px; border: 0; background: none; }
.telegram-link:hover, .logout-btn:hover { color: #bbb; }
header { margin-bottom: 36px; }
header h1 { margin: 0 0 6px; font-size: .75rem; font-weight: 500; color: #777; }
header p { margin: 0; font-size: 1.1rem; font-weight: 600; color: #fff; }
.auth-header { margin-top: 40px; margin-bottom: 30px; }
.auth-header p { font-size: .9rem; opacity: .6; }
.auth-header p.error { color: #FF6B6B; opacity: 1; }
.auth-form { margin-top: 32px; }
.input-group { position: relative; border-bottom: 1px solid #333; }
.input-group:focus-within { border-color: #4CAF50; }
.input-group input { width: 100%; padding: 12px 32px 12px 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: #ddd; font-size: .8rem; }
.input-group input::placeholder { color: #555; }
.auth-btn { position: absolute; top: 0; right: 0; bottom: 0; border: 0; background: transparent; color: #777; font-size: 1rem; padding: 0 8px; }
.auth-btn:hover, .input-group:focus-within .auth-btn { color: #4CAF50; }
.auth-footer { margin-top: 60px; color: #555; opacity: .65; text-align: center; letter-spacing: .5px; font-size: .65rem; }
.steps { margin-bottom: 40px; }
.step { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: .8rem; line-height: 1.5; }
.step:last-child { border-bottom: 0; }
.step-num { color: #555; flex-shrink: 0; }
.step-text { color: #888; }
.step-text strong { color: #bbb; font-weight: 500; }
.step-text small { opacity: .8; }
.step-text code { background: rgba(255,107,107,.1); color: #FF6B6B; padding: 2px 6px; border-radius: 3px; font-size: .75rem; }
.step-text code.ok { color: #4CAF50; background: rgba(76,175,80,.1); }
.step-link { padding: 0 0 1px; border: 0; border-bottom: 1px solid rgba(255,255,255,.3); background: none; color: #fff; font-size: inherit; text-align: left; }
.step-link:hover { border-color: #fff; }
.paste-area { border: 1px solid rgba(255,255,255,.08); border-radius: 4px; margin-bottom: 12px; background: rgba(255,255,255,.02); }
.paste-label { display: block; padding: 10px 14px; font-size: .65rem; color: #777; }
textarea { width: 100%; height: 64px; resize: none; padding: 14px; border: 0; border-top: 1px solid rgba(255,255,255,.04); outline: 0; background: transparent; color: #FF6B6B; font-size: .75rem; }
textarea::placeholder { color: #555; }
.capture-btn { width: 100%; padding: 11px; border: 1px solid rgba(76,175,80,.3); border-radius: 4px; background: transparent; color: #4CAF50; font-size: .75rem; font-weight: 500; }
.capture-btn:hover:enabled { background: rgba(76,175,80,.1); border-color: rgba(76,175,80,.5); }
.capture-btn:disabled { opacity: .45; cursor: default; }
.capture-btn.success { background: rgba(76,175,80,.1); }
.capture-btn.ended { color: #888; border-color: #333; }
.notice { min-height: 20px; margin: 12px 0 0; color: #FF6B6B; font-size: .7rem; line-height: 1.5; }
.loading, .success { text-align: center; padding: 48px 0; }
.loading { color: #777; font-size: .8rem; }
.loader { width: 20px; height: 20px; margin: 0 auto 14px; border: 2px solid #1a1a1a; border-top-color: #4CAF50; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { margin-bottom: 14px; color: #4CAF50; font-size: 1.5rem; }
.success h2 { margin: 0 0 4px; color: #fff; font-size: .85rem; }
.success p { margin: 0 0 28px; color: #888; font-size: .75rem; }
.text-btn, .quiet-btn { border: 0; background: none; color: #4CAF50; font-size: .75rem; }
.text-btn { border-bottom: 1px solid rgba(76,175,80,.3); padding: 0 0 1px; }
.text-btn:hover { border-color: #4CAF50; }
.error-box { padding: 14px; border: 1px solid rgba(255,107,107,.2); border-radius: 4px; background: rgba(255,107,107,.05); color: #FF6B6B; font-size: .75rem; text-align: center; margin-bottom: 14px; }
#dashboardView { padding-top: 48px; }
.identity-card, .lesson-item { padding: 12px 14px; border: 1px solid rgba(255,255,255,.06); border-radius: 4px; background: rgba(255,255,255,.02); }
.identity-card { display: flex; align-items: center; justify-content: space-between; border-color: rgba(76,175,80,.4); }
.identity-name, .lesson-title { color: #ccc; font-size: .8rem; }
.identity-id, .lesson-meta { margin-top: 3px; color: #777; font-size: .7rem; }
.relink { font-size: .65rem; }
.lessons-header { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 10px; color: #777; font-size: .65rem; letter-spacing: .08em; }
.lesson-day { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 8px; color: #888; font-size: .65rem; letter-spacing: .06em; }
.lesson-day:first-child { margin-top: 4px; }
.lesson-day-sep { color: #444; }
.lesson-day-relative { color: #555; }
.quiet-btn { color: #888; font-size: .65rem; }
.quiet-btn:hover { color: #fff; }
.lesson-item { margin-bottom: 6px; }
.lesson-item .capture-btn { margin-top: 10px; padding: 9px; }
.lesson-error { margin-top: 8px; color: #FF6B6B; font-size: .7rem; line-height: 1.5; }
.empty { padding: 24px; color: #777; text-align: center; font-size: .75rem; }
@media (max-width: 600px) { .telegram-link, .logout-btn { top: 14px; } .telegram-link { left: 14px; } .logout-btn { right: 14px; } body { padding: 55px 16px 32px; } }
