* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
html, body { background: #0b0e14; color: #ffffff; min-height: 100vh; margin: 0; padding: 0; min-width: 320px; }
body { display: flex; justify-content: center; }
.app-container { width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100vh; }
.top-header { padding: 16px 20px; text-align: center; }
.logo { font-size: 24px; font-weight: 800; background: linear-gradient(135deg, #a855f7, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.5px; }
.header-badge { background: rgba(30,41,59,0.7); border: 1px solid rgba(51,65,85,0.5); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; }
body.light-theme .header-badge { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); color: #1e293b; }
#content-area { flex-grow: 1; padding: 0 20px 90px 20px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.screen-container { display: none; flex-direction: column; gap: 16px; animation: slideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
#screen-home { display: flex; }
#screen-geometry.screen-container { gap: 8px; }
#screen-oge.screen-container { align-items: stretch; gap: 12px; }
#screen-oge .oge-menu { margin: 0; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

.alert-box { background: rgba(69,26,3,0.6); border: 1px solid rgba(146,64,14,0.5); backdrop-filter: blur(8px); padding: 14px; border-radius: 14px; color: #fcd34d; font-size: 14px; text-align: center; line-height: 1.4; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.news-card { background: rgba(30,41,59,0.7); border: 1px solid rgba(51,65,85,0.5); backdrop-filter: blur(12px); padding: 16px; border-radius: 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.news-card:nth-child(2) { animation-delay: 0.1s; }
.news-icon { font-size: 28px; flex-shrink: 0; }
.news-text h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.news-text p { font-size: 13px; color: #94a3b8; line-height: 1.4; }
.recent-chats { width: 100%; }
.recent-chats .news-card { margin-bottom: 8px; }
.screen-container h1 { font-size: 22px; margin-top: 40px; text-align: center; }
.screen-container p { font-size: 14px; color: #94a3b8; text-align: center; }

/* === BOTTOM NAV === */
.bottom-nav { position: fixed; bottom: 12px; left: 12px; right: 12px; max-width: 480px; margin: 0 auto; background: rgba(30,41,59,0.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: flex; justify-content: space-around; padding: 10px 0; z-index: 100; box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06); border-radius: 20px; border: 1px solid rgba(51,65,85,0.3); }
.nav-btn { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 12px; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-btn:active { transform: scale(0.88); }
.nav-icon { font-size: 26px; line-height: 1; transition: transform 0.2s; }
.nav-btn:active .nav-icon { transform: scale(0.85); }
.nav-label { font-size: 11px; color: #64748b; font-weight: 500; }

/* === SETTINGS === */
.settings-group { width: 100%; }
.settings-label { display: block; font-size: 14px; font-weight: 600; color: #cbd5e1; margin-bottom: 10px; }
.option-row { display: flex; gap: 8px; flex-wrap: wrap; }
.option-btn { flex: 1; min-width: 44px; padding: 10px 6px; border: 1px solid #334155; border-radius: 10px; background: #1e293b; color: #cbd5e1; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; text-align: center; }
.option-btn:active { transform: scale(0.95); }
.option-btn.active { border-color: #3b82f6; background: rgba(59,130,246,0.15); color: #60a5fa; box-shadow: 0 0 20px rgba(59,130,246,0.15); }
.settings-select { width: 100%; padding: 12px; border: 1px solid #334155; border-radius: 10px; background: #1e293b; color: #e2e8f0; font-size: 14px; cursor: pointer; outline: none; }
.settings-select:focus { border-color: #3b82f6; }

/* === TOPICS === */
.subject-btn.big { width: 100%; padding: 18px; border: 1px solid rgba(51,65,85,0.5); border-radius: 16px; background: rgba(30,41,59,0.7); backdrop-filter: blur(12px); color: #e2e8f0; font-size: 17px; font-weight: 700; cursor: pointer; transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1); margin-bottom: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.subject-btn.big:last-child { margin-bottom: 0; }
.subject-btn.big:hover { border-color: rgba(139,92,246,0.6); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,92,246,0.15); }
.subject-btn.big:active { transform: scale(0.97); }
.back-btn { align-self: flex-start; background: rgba(148,163,184,0.1); border: 1px solid rgba(148,163,184,0.2); border-radius: 8px; color: #e2e8f0; font-size: 14px; font-weight: 500; cursor: pointer; padding: 6px 12px; transition: all 0.2s; }
.back-btn:active { transform: translateX(-3px); }
.back-btn:hover { background: rgba(148,163,184,0.18); border-color: rgba(148,163,184,0.3); color: #ffffff; }

/* === DESKTOP === */
@media (min-width: 768px) {
    body { background: #0b0e14; }
    .app-container { max-width: 480px; margin: 0 auto; min-height: 100vh; box-shadow: 0 0 60px rgba(0,0,0,0.5); border-left: 1px solid rgba(51,65,85,0.3); border-right: 1px solid rgba(51,65,85,0.3); }
    body.light-theme .app-container { border-left-color: rgba(226,232,240,0.4); border-right-color: rgba(226,232,240,0.4); }
    .bottom-nav { max-width: 480px; }
}
.chapter-card { background: rgba(30,41,59,0.7); border: 1px solid rgba(51,65,85,0.5); backdrop-filter: blur(12px); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.12); animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.chapter-card:nth-child(1) { animation-delay: 0s; }
.chapter-card:nth-child(2) { animation-delay: 0.12s; }
.chapter-card:nth-child(3) { animation-delay: 0.24s; }
.chapter-card:nth-child(4) { animation-delay: 0.36s; }
.chapter-card:nth-child(5) { animation-delay: 0.48s; }
.chapter-title { padding: 14px 16px; font-size: 15px; font-weight: 700; color: #f1f5f9; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; transition: background 0.2s; }
.chapter-title:active { background: rgba(255,255,255,0.03); }
.paragraph-title { padding: 10px 16px; font-size: 13px; font-weight: 600; color: #60a5fa; background: rgba(59,130,246,0.04); cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; transition: background 0.2s; }
.paragraph-title:active { background: rgba(59,130,246,0.08); }
.collapse-icon { font-size: 16px; font-weight: 700; color: #475569; flex-shrink: 0; margin-left: 8px; }
.chapter-body, .paragraph-body { overflow: hidden; transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.chapter-body.collapsed, .paragraph-body.collapsed { max-height: 0; }
.topic-item { padding: 12px 16px; font-size: 14px; color: #cbd5e1; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(51,65,85,0.3); }
.topic-item:last-child { border-bottom: none; }
.topic-item.topic-locked { opacity: 0.45; }
.topic-item.topic-locked .topic-name { cursor: default; }
.topic-item.topic-locked .topic-name:hover { color: #cbd5e1; }
.topic-name { flex-grow: 1; cursor: pointer; transition: color 0.2s; padding: 2px 0; }
.topic-name:hover { color: #60a5fa; }
.topic-name:active { color: #3b82f6; }

.grade-divider { text-align: center; font-size: 12px; font-weight: 700; color: #475569; padding: 12px 0 8px; text-transform: uppercase; letter-spacing: 2px; border-top: 1px solid rgba(51,65,85,0.25); margin-top: 8px; }
.grade-divider:first-child { border-top: none; margin-top: 0; padding-top: 4px; }
.topic-check { opacity: 0.3; cursor: pointer; transition: all 0.2s; user-select: none; padding: 4px 8px; margin: -4px -8px; font-size: 12px; font-weight: 700; min-width: 34px; text-align: right; }
.topic-check:hover { opacity: 0.7; }
.topic-check:active { transform: scale(1.3); }
.topic-item.done .topic-check { opacity: 1; color: #10b981; }

/* === SEARCH === */
.search-input { width: 100%; padding: 12px 16px; border: 1px solid #334155; border-radius: 12px; background: rgba(30,41,59,0.6); color: #e2e8f0; font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.search-input::placeholder { color: #475569; }
.search-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* === SCREEN HEADER === */
.screen-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.screen-header h1 { margin: 0; }
.home-btn { background: rgba(148,163,184,0.1); border: 1px solid rgba(148,163,184,0.2); border-radius: 8px; font-size: 22px; cursor: pointer; padding: 4px 10px; color: #e2e8f0; opacity: 1; transition: all 0.2s; }
.home-btn:hover { background: rgba(148,163,184,0.18); border-color: rgba(148,163,184,0.3); color: #ffffff; }
.home-btn:active { transform: scale(0.9); }

/* === SETTINGS COLLAPSE === */
.settings-collapse { width: 100%; }
.settings-collapse-title { padding: 12px 16px; border: 1px solid #334155; border-radius: 12px; background: #1e293b; display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: #cbd5e1; cursor: pointer; user-select: none; transition: all 0.3s; box-shadow: 0 1px 6px rgba(0,0,0,0.1); }
.settings-collapse-title:active { transform: scale(0.98); }
.settings-collapse-title.open { border-radius: 12px 12px 0 0; }
.settings-collapse-body { overflow: hidden; transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), padding 0.35s; max-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid transparent; border-top: none; border-radius: 0 0 12px 12px; }
.settings-collapse-body.open { padding: 8px; border-color: #334155; }
.textbook-btn { width: 100%; text-align: left; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #cbd5e1; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.textbook-btn:hover { background: rgba(255,255,255,0.05); }
.textbook-btn:active { transform: scale(0.97); }
.textbook-btn.active { background: rgba(59,130,246,0.15); color: #60a5fa; border-color: #3b82f6; }

/* === CHAT === */
#screen-chat.screen-container { gap: 0; align-items: stretch; flex: 1; min-height: 0; }
#screen-chat .screen-header { flex-shrink: 0; }
#screen-chat .screen-header .back-btn { align-self: center; }
.chat-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px 8px; opacity: 0.6; transition: all 0.2s; }
.chat-btn:hover { opacity: 1; }
.chat-btn:active { transform: scale(0.9); }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 0; width: 100%; min-height: 0; scroll-behavior: smooth; }
.chat-msg { padding: 12px 14px; border-radius: 16px; font-size: 14px; line-height: 1.6; word-break: break-word; animation: msgIn 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.chat-msg.user { color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.ai { background: rgba(30,41,59,0.7); backdrop-filter: blur(12px); border: 1px solid rgba(51,65,85,0.5); color: #e2e8f0; border-bottom-left-radius: 4px; margin-bottom: 2px; }
.chat-wrap { display: flex; flex-direction: column; width: fit-content; max-width: 85%; animation: msgIn 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.chat-wrap.user { align-self: flex-end; }
.chat-wrap.ai { align-self: flex-start; }
.chat-wrap.user .chat-msg { align-self: flex-end; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; border-bottom-right-radius: 4px; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.chat-actions { display: flex; gap: 2px; padding: 2px 0 0 4px; opacity: 0; transition: opacity 0.2s; }
.chat-wrap:hover .chat-actions { opacity: 0.6; }
.chat-wrap:hover .chat-actions:hover { opacity: 1; }
.chat-action { background: none; border: none; font-size: 13px; cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: background 0.2s; }
.chat-action:hover { background: rgba(255,255,255,0.08); }
.chat-sep { height: 1px; background: rgba(51,65,85,0.15); margin: 4px 0 8px; width: 100%; }
.chat-topic-header { font-size: 12px; color: #64748b; font-weight: 600; padding: 4px 0 8px; text-align: center; border-bottom: 1px solid rgba(51,65,85,0.2); margin-bottom: 4px; flex-shrink: 0; }
.chat-input-wrap { display: flex; gap: 8px; width: 100%; padding: 12px 0 4px; border-top: 1px solid rgba(51,65,85,0.3); flex-shrink: 0; }
.chat-input { flex-grow: 1; padding: 12px 16px; border: 1px solid #334155; border-radius: 14px; background: rgba(30,41,59,0.6); color: #e2e8f0; font-size: 14px; outline: none; height: 48px; transition: border-color 0.2s, box-shadow 0.2s; }
.chat-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.chat-send { width: 48px; height: 48px; padding: 0; margin: 0; border: none; border-radius: 14px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-size: 22px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; user-select: none; transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.chat-send:active { transform: scale(0.9); box-shadow: 0 2px 6px rgba(37,99,235,0.2); }

/* === SKELETON === */
.skeleton-line { height: 10px; width: 10px; border-radius: 50%; background: #475569; display: inline-block; margin: 0 3px; animation: typing 1.2s ease infinite; }
.skeleton-line:nth-child(2) { animation-delay: 0.2s; }
.skeleton-line:nth-child(3) { animation-delay: 0.4s; }
.cursor { animation: blink 0.8s step-end infinite; display: inline; }
@keyframes blink { 50% { opacity: 0; } }

/* === MAIN BUTTON === */
.main-button { background: linear-gradient(135deg, #8b5cf6, #3b82f6); color: white; border: none; padding: 14px 24px; border-radius: 14px; font-size: 15px; font-weight: 700; cursor: pointer; width: 100%; box-shadow: 0 4px 20px rgba(99,102,241,0.25); transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s; }
.main-button:active { transform: scale(0.96); box-shadow: 0 2px 10px rgba(99,102,241,0.15); }

/* === OGE === */
.oge-menu { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.oge-menu-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.oge-section { margin-bottom: 4px; }
.oge-section-title { padding: 12px 16px; background: rgba(30,41,59,0.6); border: 1px solid rgba(51,65,85,0.4); border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; justify-content: flex-start; align-items: center; gap: 8px; transition: all 0.2s; box-shadow: 0 1px 6px rgba(0,0,0,0.1); }
.oge-section-title:hover { background: rgba(30,41,59,0.9); }
.oge-section-title.open { border-radius: 12px 12px 0 0; }
.oge-section-title .collapse-icon { margin-left: auto; }
.oge-section-body { overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; max-height: 0; padding: 0 8px; border: 1px solid transparent; border-top: none; border-radius: 0 0 12px 12px; }
.oge-section-body.open { max-height: 500px; padding: 8px; border-color: rgba(51,65,85,0.4); }
.oge-topic-item { padding: 10px 16px; font-size: 13px; color: #cbd5e1; cursor: pointer; transition: all 0.2s; border-bottom: 1px solid rgba(51,65,85,0.2); display: flex; justify-content: space-between; align-items: center; }
.oge-topic-item:last-child { border-bottom: none; }
.oge-topic-item:hover { background: rgba(59,130,246,0.06); color: #60a5fa; }
.oge-topic-item:active { transform: scale(0.98); }

body.light-theme .oge-section-title { background: rgba(255,255,255,0.6); border-color: rgba(226,232,240,0.5); box-shadow: 0 1px 6px rgba(0,0,0,0.04); }
body.light-theme .oge-section-title:hover { background: rgba(255,255,255,0.9); }
body.light-theme .oge-topic-item { color: #475569; border-bottom-color: rgba(148,163,184,0.2); }
body.light-theme .oge-topic-item:last-child { border-bottom: none; }
body.light-theme .oge-topic-item:hover { background: rgba(59,130,246,0.04); }
body.light-theme .oge-section-body.open { border-color: rgba(226,232,240,0.5); }

.oge-desc { font-size: 13px; color: #94a3b8; text-align: center; }
.oge-tasks { width: 100%; }
.oge-timer { text-align: center; font-size: 28px; font-weight: 800; color: #f1f5f9; padding: 8px 0; font-variant-numeric: tabular-nums; }
.oge-timer.warning { color: #f59e0b; }
.oge-timer.danger { color: #ef4444; }

.oge-timer-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; }
.oge-pause-btn { transition: all 0.2s; border:1px solid #475569;color:#94a3b8;border-radius:8px;padding:4px 10px;font-size:12px;cursor:pointer;background:none; }
.oge-pause-btn:hover { background: rgba(148,163,184,0.1); color: #e2e8f0; }
.oge-pause-btn.paused { border-color: #f59e0b; color: #fbbf24; background: rgba(245,158,11,0.1); }
body.light-theme .oge-pause-btn { color: #64748b; border-color: #cbd5e1; }
body.light-theme .oge-pause-btn:hover { background: rgba(0,0,0,0.05); color: #1e293b; }
.oge-task-card { background: rgba(30,41,59,0.7); border: 1px solid rgba(51,65,85,0.5); backdrop-filter: blur(12px); border-radius: 14px; padding: 16px; margin-bottom: 12px; animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.oge-task-card:nth-child(1) { animation-delay: 0s; }
.oge-task-card:nth-child(2) { animation-delay: 0.12s; }
.oge-task-card:nth-child(3) { animation-delay: 0.24s; }
.oge-task-card:nth-child(4) { animation-delay: 0.36s; }
.oge-task-card:nth-child(5) { animation-delay: 0.48s; }
.oge-task-num { font-size: 12px; color: #64748b; font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.oge-task-text { font-size: 15px; color: #e2e8f0; line-height: 1.6; margin-bottom: 10px; }
.oge-task-input { width: 100%; padding: 10px 14px; border: 1px solid #334155; border-radius: 10px; background: rgba(11,14,20,0.6); color: #e2e8f0; font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.oge-task-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.oge-task-img { width: 100%; max-height: 110px; object-fit: contain; border-radius: 10px; margin: 8px 0; background: #ffffff; }
.oge-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; color: #e2e8f0; }
.oge-table th, .oge-table td { border: 1px solid #334155; padding: 7px 10px; text-align: left; vertical-align: top; }
.oge-table th { background: rgba(59,130,246,0.12); font-weight: 600; }
.oge-table tr:nth-child(even) td { background: rgba(148,163,184,0.05); }
body.light-theme .oge-table { color: #1e293b; }
body.light-theme .oge-table th, body.light-theme .oge-table td { border-color: #cbd5e1; }
body.light-theme .oge-table th { background: rgba(59,130,246,0.1); }
.oge-task-result { margin-top: 8px; font-size: 13px; padding: 8px 12px; border-radius: 10px; animation: msgIn 0.3s ease; }
.oge-task-result.correct { background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.oge-task-result.wrong { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.oge-results { width: 100%; }
#oge-results-list { width: 100%; margin-top: 16px; }

/* === SHOP === */
.perk { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(139,92,246,0.1); color: #a78bfa; border: 1px solid rgba(139,92,246,0.2); }

/* === RESULT SCREEN === */
.result-icon { font-size: 64px; margin-bottom: 16px; text-align: center; }
.result-stats { display: flex; gap: 16px; width: 100%; margin-top: 24px; }
.stat-card { flex: 1; background: rgba(30,41,59,0.7); border: 1px solid rgba(51,65,85,0.5); backdrop-filter: blur(12px); border-radius: 14px; padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat-value { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, #a855f7, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 12px; color: #94a3b8; font-weight: 500; }

body.light-theme .stat-card { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); }
body.light-theme .stat-label { color: #64748b; }

/* === LIGHT THEME === */
body.light-theme { background: #f1f5f9; color: #0f172a; }
body.light-theme .logo { background: linear-gradient(135deg, #7c3aed, #2563eb); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body.light-theme .bottom-nav { background: rgba(255,255,255,0.85); border-color: rgba(226,232,240,0.6); box-shadow: 0 8px 32px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9); }
body.light-theme .nav-label { color: #64748b; }
body.light-theme .alert-box { background: rgba(254,243,199,0.7); border-color: rgba(245,158,11,0.3); color: #92400e; }
body.light-theme .news-card { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
body.light-theme .recent-chats .news-card:hover { background: rgba(255,255,255,0.95); }
body.light-theme .news-text p { color: #64748b; }
body.light-theme .settings-label { color: #334155; }
body.light-theme .option-btn { background: #ffffff; border-color: #e2e8f0; color: #334155; }
body.light-theme .option-btn:active { transform: scale(0.95); }
body.light-theme .option-btn.active { background: rgba(59,130,246,0.06); border-color: #3b82f6; }
body.light-theme .settings-select { background: #ffffff; border-color: #e2e8f0; color: #1e293b; }
body.light-theme .subject-btn.big { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); color: #1e293b; }
body.light-theme .subject-btn.big:hover { border-color: rgba(124,58,237,0.4); }
body.light-theme .chapter-card { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); box-shadow: 0 4px 16px rgba(0,0,0,0.03); }
body.light-theme .chapter-title { color: #1e293b; }
body.light-theme .paragraph-title { color: #2563eb; background: rgba(37,99,235,0.03); }
body.light-theme .topic-item { color: #334155; border-bottom-color: rgba(226,232,240,0.5); }
body.light-theme .grade-divider { color: #94a3b8; border-top-color: rgba(148,163,184,0.3); }
body.light-theme .topic-name:hover { color: #2563eb; }
body.light-theme .search-input { background: rgba(255,255,255,0.6); border-color: #e2e8f0; color: #1e293b; }
body.light-theme .search-input::placeholder { color: #94a3b8; }
body.light-theme .search-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.08); }
body.light-theme .settings-collapse-title { background: #ffffff; border-color: #e2e8f0; color: #334155; }
body.light-theme .settings-collapse-body.open { border-color: #e2e8f0; }
body.light-theme .textbook-btn { color: #334155; }
body.light-theme .textbook-btn:hover { background: rgba(0,0,0,0.02); }
body.light-theme .textbook-btn.active { background: rgba(37,99,235,0.06); color: #2563eb; }
body.light-theme .chat-msg.ai { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); color: #1e293b; }
body.light-theme .chat-wrap.user .chat-msg { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
body.light-theme .chat-input { background: rgba(255,255,255,0.6); border-color: #e2e8f0; color: #1e293b; }
body.light-theme .chat-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.08); }
body.light-theme .chat-input-wrap { border-top-color: rgba(226,232,240,0.5); background: #f1f5f9; }
body.light-theme #screen-chat .screen-header { background: #f1f5f9; }
body.light-theme .chat-sep { background: rgba(148,163,184,0.2); }
body.light-theme .chat-topic-header { color: #94a3b8; border-bottom-color: rgba(148,163,184,0.2); }
body.light-theme .chat-action:hover { background: rgba(0,0,0,0.05); }
body.light-theme .skeleton-line { background: #94a3b8; }
body.light-theme .oge-task-card { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); }
body.light-theme .oge-task-text { color: #1e293b; }
body.light-theme .oge-task-input { background: rgba(248,250,252,0.6); border-color: #e2e8f0; color: #1e293b; }
body.light-theme .oge-task-input:focus { border-color: #3b82f6; }

/* === ONBOARDING === */
#screen-onboarding { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.onboarding-slide { max-width: 360px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.onboarding-emoji { font-size: 64px; margin-bottom: 8px; }
.onboarding-title { font-size: 26px; font-weight: 800; background: linear-gradient(135deg, #a855f7, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; }
.onboarding-desc { font-size: 15px; color: #94a3b8; line-height: 1.5; }

/* Nav preview inside onboarding */
.onboard-nav-preview { display: flex; justify-content: center; gap: 28px; padding: 16px 24px; background: rgba(30,41,59,0.6); border-radius: 20px; border: 1px solid rgba(51,65,85,0.3); margin: 4px 0 8px; width: 100%; max-width: 280px; }
.light-theme .onboard-nav-preview { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.6); }
.onboard-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; padding: 4px; }
.onboard-nav-icon { font-size: 28px; line-height: 1; position: relative; z-index: 1; }
.onboard-nav-label { font-size: 11px; color: #94a3b8; }
.light-theme .onboard-nav-label { color: #64748b; }
.onboard-nav-highlight { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; transform: translate(-50%, -50%); border-radius: 50%; border: 2.5px solid #8b5cf6; opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }
.onboard-nav-highlight.active { opacity: 1; animation: pulseRing 2s ease-in-out infinite; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); } 50% { box-shadow: 0 0 0 8px rgba(139,92,246,0); } 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0); } }

.onboard-dot { width: 10px; height: 10px; border-radius: 50%; background: #334155; transition: all 0.3s; }
.onboard-dot.active { background: #8b5cf6; width: 28px; border-radius: 5px; }
.light-theme .onboarding-desc { color: #64748b; }
.light-theme .onboard-dot { background: #cbd5e1; }
.light-theme .onboard-dot.active { background: #7c3aed; }

/* === HOME HERO + DAY CARD === */
.home-hero { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; }
.home-greeting { font-size: 13px; color: #94a3b8; }
.light-theme .home-greeting { color: #64748b; }
.home-name { font-size: 22px; font-weight: 800; color: #f1f5f9; line-height: 1.2; }
.light-theme .home-name { color: #1e293b; }
.home-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.light-theme .home-sub { color: #64748b; }
.home-rank { font-size: 32px; padding: 10px; background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.1)); border: 1px solid rgba(139,92,246,0.3); border-radius: 16px; }

.day-card { background: linear-gradient(135deg, rgba(124,58,237,0.14), rgba(59,130,246,0.08)); border: 1px solid rgba(139,92,246,0.3); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
.day-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.progress-bar { width: 100%; height: 6px; background: rgba(51,65,85,0.5); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.light-theme .progress-bar { background: rgba(226,232,240,0.8); }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #8b5cf6, #3b82f6); border-radius: 99px; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.day-task { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(30,41,59,0.55); border: 1px solid rgba(51,65,85,0.4); border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: transform 0.15s ease; }
.light-theme .day-task { background: rgba(255,255,255,0.7); border-color: rgba(226,232,240,0.7); }
.day-task:active { transform: scale(0.98); }
.day-task.done { opacity: 0.6; }
.day-task.done .day-task-check { background: #10b981; border-color: #10b981; color: #fff; }
.day-task-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #64748b; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.day-task-emoji { font-size: 18px; flex-shrink: 0; }
.day-task-text { flex: 1; font-size: 13.5px; color: #e2e8f0; line-height: 1.3; }
.light-theme .day-task-text { color: #334155; }
.day-task-sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.light-theme .day-task-sub { color: #64748b; }
.day-task.done .day-task-text { text-decoration: line-through; color: #94a3b8; }
