:root {
    --bg-color: #f4f6fa;
    --card-bg: #ffffff;
    --text-main: #070e22;
    --text-muted: #586b8c;
    --accent: #1db954; 
    --accent-hover: #1aa649;
    --secondary: #0055ff; 
    --avatar-bg: #eefcf4;
    --border: rgba(29, 185, 84, 0.08);
    --shadow: 0 12px 40px rgba(10, 44, 19, 0.04), 0 2px 8px rgba(10, 44, 19, 0.02);
    --overlay-bg: rgba(10, 22, 14, 0.3);
    --chat-self: #e3ffed;
    --chat-other: rgba(128,128,128,0.06);
    --noti-bg: rgba(255, 255, 255, 0.85);
    --input-bg: #f8fafc;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --card-bg: #121214;
    --text-main: #ffffff;
    --text-muted: #878d99;
    --accent: #24d15d; 
    --accent-hover: #198c3e;
    --secondary: #1a66ff; 
    --avatar-bg: #141a16;
    --border: #1b281f;
    --shadow: 0 0 0 1px #1b281f;
    --overlay-bg: rgba(0, 0, 0, 0.85);
    --chat-self: #143820;
    --chat-other: #1c1c1f;
    --noti-bg: rgba(18, 12, 20, 0.85);
    --input-bg: #1c1c1f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 16px;
    transition: background 0.2s cubic-bezier(0.25, 1, 0.5, 1), color 0.2s ease;
}

.app-container {
    width: 100%;
    max-width: 440px; 
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 95px;
    position: relative;
}

.glass-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: background 0.2s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.2s ease;
}

/* ВЕБИНАРНЫЙ БАННЕР */
.webinar-banner-card {
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.12) 0%, rgba(0, 85, 255, 0.08) 100%), var(--card-bg);
    border: 1px solid rgba(29, 185, 84, 0.25);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.banner-badge {
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
}
.banner-title { font-size: 16px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.banner-timer-container { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.timer-segment { background: rgba(128, 128, 128, 0.08); padding: 6px 12px; border-radius: 12px; font-weight: 800; font-size: 18px; display: flex; align-items: baseline; gap: 2px; }
.timer-segment small { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.timer-divider { font-weight: 800; font-size: 18px; opacity: 0.5; }
.banner-footer-text { font-size: 12px; color: var(--secondary); font-weight: 700; }

/* ВЕБИНАРНАЯ КОМНАТА */
.webinar-container { display: flex; flex-direction: column; gap: 14px; padding: 16px !important; }
.webinar-status-badge { background: rgba(0, 85, 255, 0.1); color: var(--secondary); font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 20px; display: inline-block; }
.webinar-status-badge.pulse { animation: badgePulse 2s infinite ease-in-out; }
@keyframes badgePulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
.webinar-room-title { font-size: 17px; font-weight: 800; margin-top: 6px; }
.video-player-mock { width: 100%; aspect-ratio: 16 / 9; background: #09090b; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(255, 255, 255, 0.05); position: relative; }
.play-icon-center { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.play-icon-center svg { width: 18px; height: 18px; fill: #fff; transform: translateX(2px); }
.player-placeholder-text { font-size: 12px; color: #666; font-weight: 500; }
.webinar-chat-box { background: rgba(128, 128, 128, 0.03); border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.webinar-messages { height: 130px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding-right: 4px; }
.web-msg { font-size: 12px; line-height: 1.4; word-break: break-word; }
.web-msg span { font-weight: 700; margin-right: 4px; }
.web-msg span.user-color-1 { color: #ff9500; } 
.web-msg span.user-color-2 { color: #007aff; } 
.web-msg span.user-color-3 { color: #af52de; } 
.web-msg span.user-color-random { color: #34c759; } 

.webinar-input-area { display: flex; gap: 6px; }
.webinar-input-area input, .chat-input { 
    flex: 1; background: var(--card-bg); border: 1px solid var(--border); 
    padding: 10px 14px; border-radius: 12px; color: var(--text-main); 
    font-size: 16px !important; outline: none; 
}
.webinar-input-area button { background: var(--secondary); color: #fff; border: none; width: 36px; height: 36px; border-radius: 12px; cursor: pointer; font-weight: bold; }

.mobile-logo-box { display: flex; align-items: center; margin-bottom: 8px; padding-left: 4px; font-size: 24px; font-weight: 800; color: var(--text-main); }
.mobile-logo-box span { color: var(--text-muted); font-weight: 500; }
.role-container { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.nav-screen { display: flex; flex-direction: column; gap: 14px; width: 100%; will-change: transform, opacity; }

@media screen and (max-width: 767px) {
    .nav-screen:not(.hidden) { animation: scaleFromDepth 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards; transform-origin: center top; }
}
@keyframes scaleFromDepth { 0% { opacity: 0; transform: scale(0.96) translateZ(0); } 100% { opacity: 1; transform: scale(1) translateZ(0); } }
.hidden { display: none !important; }

#toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-40px); background: var(--card-bg); color: var(--text-main); padding: 12px 20px; border-radius: 30px; opacity: 0; border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 9999; font-weight: 600; font-size: 13px; text-align: center; pointer-events: none; max-width: 85%; transition: opacity 0.2s, transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ШАПКА И ПРОФИЛЬ */
.profile-header-wrapper { position: relative; width: 100%; }
.header { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 100; }
.user-info { display: flex; align-items: center; gap: 14px; }
.avatar { width: 54px; height: 54px; background: var(--avatar-bg); border: 2px solid var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: var(--accent); cursor: pointer; user-select: none; background-size: cover; background-position: center; overflow: hidden; transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1); }
.avatar:active { transform: scale(0.95); }

.avatar-picker { 
    display: none; gap: 12px; padding: 20px; background: var(--card-bg); border-radius: 24px; justify-content: center; border: 1px solid var(--accent); flex-wrap: wrap; position: absolute; top: 80px; left: 0; width: 100%; z-index: 9999 !important; box-shadow: 0 20px 45px rgba(0,0,0,0.12);
}
.avatar-picker.show { display: flex !important; animation: pickerRevealSlide 0.25s cubic-bezier(0.25, 1, 0.5, 1) both; }

.avatar-option { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-color); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: bold; cursor: pointer; border: 1px solid var(--border); font-size: 16px; transition: border-color 0.2s; }
.avatar-option:hover { border-color: var(--accent); }
.avatar-option.upload-btn { background: var(--avatar-bg); border: 1px dashed var(--accent); font-size: 10px; font-weight: 700; text-align: center; line-height: 1.2; padding: 4px; }

.noti-dropdown { display: none; flex-direction: column; gap: 12px; padding: 18px; background: var(--card-bg); border-radius: 24px; border: 1px solid var(--secondary); position: absolute; top: 80px; right: 0; width: 100%; z-index: 9999 !important; box-shadow: 0 20px 45px rgba(0,0,0,0.12); }
.noti-dropdown.show { display: flex !important; animation: pickerRevealSlide 0.25s cubic-bezier(0.25, 1, 0.5, 1) both; }
.noti-item { display: flex; align-items: center; gap: 14px; font-size: 13px; line-height: 1.4; padding: 4px 0; }
.noti-icon-box { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; background: rgba(128,128,128,0.06); flex-shrink: 0; }

.bell-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; }
.bell-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
.bell-badge-dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; background: #ff3b30; border-radius: 50%; }

.theme-btn-mobile, .theme-btn-desktop { cursor: pointer; }
.theme-btn-mobile svg, .theme-btn-desktop svg { 
    width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; 
    transition: transform 0.42s cubic-bezier(0.34, 1.45, 0.64, 1) !important;
    transform-origin: center center !important; display: block; 
    opacity: 1 !important;
}

.user-name { font-weight: 800 !important; font-size: 19px; display: inline-block; cursor: pointer; }
.user-rank { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.level-badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.theme-btn-mobile { position: fixed; bottom: 95px; right: 24px; background: var(--card-bg); border: 1px solid var(--border); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 1000; }

/* ПРЕДМЕТЫ */
.subject-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.subject-btn { padding: 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--card-bg); color: var(--text-main); font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; text-align: left; word-break: break-word; transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s; will-change: transform; }
.subject-btn.active { border-color: var(--accent); background: var(--avatar-bg); box-shadow: 0 0 0 1.5px var(--accent); }
.icon-box { width: 36px; height: 36px; border-radius: 12px; background: rgba(128,128,128,0.04); display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; font-weight: 800; font-size: 15px; transition: background-color 0.2s, color 0.2s; transform: none !important; }
.subject-btn.active .icon-box { background: var(--accent); color: white; transform: none !important; }

.app-container .subject-btn.haptic-tap { animation: hapticCardSpring 0.14s cubic-bezier(0.25, 1, 0.5, 1); }
@keyframes hapticCardSpring {
    0% { transform: scale(1) translateZ(0); }
    50% { transform: scale(0.94) translateZ(0); }
    100% { transform: scale(1) translateZ(0); }
}

/* ПРОГРЕСС БАРЫ */
.xp-header { display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 8px; font-weight: 600; }
.xp-header .title-wrapper { display: flex; align-items: center; gap: 6px; }
.xp-header svg { width: 18px; height: 18px; stroke: var(--secondary); stroke-width: 2; fill: none; }
.xp-header span:last-child { color: var(--secondary); }
.xp-container { background: rgba(0, 85, 255, 0.06); border-radius: 20px; height: 12px; overflow: hidden; }
.xp-fill { width: 0%; height: 100%; border-radius: 20px; background-color: var(--secondary) !important; transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.topic-progress { margin-top: 8px; }
.topic-item { display: flex; align-items: center; gap: 12px; padding: 12px 6px; font-size: 14px; cursor: pointer; border-radius: 14px; transition: background-color 0.15s, padding-left 0.15s; }
.topic-item:hover { background-color: rgba(128,128,128,0.02); padding-left: 10px; }
.topic-name { min-width: 130px; font-weight: 600; }
.topic-bar { flex: 1; height: 8px; background: rgba(0, 85, 255, 0.08); border-radius: 20px; overflow: hidden; }
.topic-bar-fill { height: 100%; border-radius: 20px; width: 0%; background-color: var(--secondary) !important; transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.topic-percent { min-width: 40px; text-align: right; font-weight: 700; color: var(--secondary); font-size: 13px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }

/* КВЕСТЫ */
.squad-members { display: flex; gap: 12px; margin-top: 12px; }
.squad-avatar { width: 48px; height: 48px; background: var(--avatar-bg); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--accent); border: 1px solid var(--border); }
.squad-avatar small { font-size: 8px; opacity: 0.7; font-weight: 500; margin-top: 1px; }
.squad-avatar.add { border: 2px dashed var(--text-muted); opacity: 0.6; cursor: pointer; background: none; color: var(--text-main); display: flex; align-items: center; justify-content: center; }
.squad-avatar.add svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.5; }
.task-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.task-info { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.task-xp { color: var(--accent); font-weight: 700; font-size: 13px; margin-right: 8px; }
.task-btn { background: var(--accent); color: white; border: none; padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background-color 0.2s, transform 0.1s ease; }
.task-btn:active { transform: scale(0.96); }
.task-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; display: none; }
.task-btn.done { background: rgba(142, 142, 147, 0.12) !important; color: #8e8e93 !important; border: 1px solid rgba(142, 142, 147, 0.15); cursor: default; transform: none !important; }
.task-btn.done svg { display: inline-block; }

/* КВИЗЫ */
.quiz-container { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.quiz-question { font-size: 16px; font-weight: 700; line-height: 1.4; white-space: pre-line; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.option-btn { padding: 16px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-main); border-radius: 16px; text-align: left; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
.option-btn:hover { border-color: var(--secondary); }
.option-btn.selected { border-color: var(--secondary); background: rgba(0, 85, 255, 0.04); }
.option-btn.correct-visual { border-color: var(--accent) !important; background: rgba(29, 185, 84, 0.08) !important; color: var(--accent) !important; }
.option-btn.wrong-visual { border-color: #ff3b30 !important; background: rgba(255, 59, 48, 0.08) !important; color: #ff3b30 !important; }
.quiz-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.submit-answer-btn { background: var(--secondary); color: white; border: none; padding: 14px 28px; border-radius: 16px; font-weight: 700; font-size: 14px; cursor: pointer; transition: opacity 0.15s; }
.submit-answer-btn:active { transform: scale(0.96); }
.submit-answer-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ЧАТЫ */
.chat-container { display: flex; flex-direction: column; height: 460px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; margin-bottom: 12px; }
.message { max-width: 80%; padding: 12px 16px; border-radius: 18px; font-size: 14px; line-height: 1.4; position: relative; }
.message.incoming { background: var(--chat-other); align-self: flex-start; border-bottom-left-radius: 4px; }
.message.outgoing { background: var(--chat-self); align-self: flex-end; border-bottom-right-radius: 4px; border: 1px solid rgba(29, 185, 84, 0.1); }
.msg-sender { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 4px; display: block; }
.msg-time { font-size: 10px; opacity: 0.5; display: block; text-align: right; margin-top: 4px; }
.chat-input-area { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; }
.chat-send-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); border: none; color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.15s; flex-shrink: 0; }
.chat-send-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; fill: none; transform: translateX(1px); }
.leaderboard-title-box { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.leaderboard-title-box svg { width: 24px; height: 24px; stroke: var(--text-main); stroke-width: 2.5; fill: none; }
.leaderboard-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.leader-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: rgba(128,128,128,0.02); border-radius: 16px; border: 1px solid var(--border); }
.leader-row.my-squad { border-color: var(--accent); background: var(--avatar-bg); }
.leader-rank-num { font-weight: 800; font-size: 16px; width: 24px; }
.leader-row:nth-child(1) .leader-rank-num { color: #ffbc00; }
.leader-row:nth-child(2) .leader-rank-num { color: #a0a0a0; }
.leader-name { font-weight: 700; font-size: 15px; flex: 1; margin-left: 10px; }
.leader-xp { font-weight: 700; color: var(--accent); font-size: 14px; }

/* НАВБАР СМАРТФОНОВ */
.bottom-nav { 
    position: fixed; bottom: 16px; left: 50%; 
    width: calc(100% - 32px); max-width: 408px; background: var(--card-bg); 
    border: 1px solid var(--border); display: flex; justify-content: space-around; 
    padding: 8px 0; border-radius: 24px; box-shadow: 0 12px 40px rgba(0,0,0,0.08); z-index: 1000; 
    -webkit-transform: translateX(-50%) translateZ(0);
    transform: translateX(-50%) translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
}
.nav-item { display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; gap: 4px; padding: 6px 12px; transition: color 0.25s ease, transform 0.15s cubic-bezier(0.25, 1, 0.5, 1); position: relative; flex: 1; }
.nav-item:active { transform: scale(0.92) translateZ(0); }
.nav-icon-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
.nav-item.active { color: var(--accent); }
.nav-item.active svg { stroke-width: 2.3; }
.nav-item::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) scaleX(0); width: 12px; height: 2.5px; background: var(--accent); border-radius: 10px; opacity: 0; transition: transform 0.25s, opacity 0.25s; }
.nav-item.active::after { transform: translateX(-50%) scaleX(1); opacity: 1; }

.desktop-sidebar { display: none; }
.mobile-logo-box { display: flex; } 

@media screen and (min-width: 768px) {
    body { 
        justify-content: flex-start; 
        padding-left: 116px !important; 
        padding-right: 40px; padding-top: 30px; 
        transition: padding-left 0.35s cubic-bezier(0.25, 1, 0.5, 1); 
    }
    body:has(.desktop-sidebar:hover) { padding-left: 300px !important; }
    .app-container { max-width: 100%; width: 100%; padding-bottom: 30px; }
    .app-container .subject-btn:active, .app-container .subject-btn:active .icon-box, .nav-item:active { transform: none !important; }
    .subject-btn:hover { background: rgba(29, 185, 84, 0.04); border-color: var(--accent); }
    .bottom-nav, .theme-btn-mobile, .mobile-logo-box { display: none !important; }
    
    .desktop-sidebar { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: 76px; background: var(--card-bg); border-right: 1px solid var(--border); padding: 30px 14px; z-index: 1005; box-shadow: 4px 0 24px rgba(0,0,0,0.02); overflow: hidden; transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1), padding 0.35s cubic-bezier(0.25, 1, 0.5, 1); }
    .desktop-sidebar:hover { width: 260px; padding: 30px 20px; }
    .sidebar-logo { position: fixed; top: 30px; left: 28px; z-index: 1020; font-size: 24px; font-weight: 800; color: var(--text-main); white-space: nowrap; cursor: pointer; }
    .sidebar-logo span { opacity: 0; display: inline-block; transform: translateX(-10px); transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none; }
    .desktop-sidebar:hover .sidebar-logo span { opacity: 1; transform: translateX(0); transition-delay: 0.05s; pointer-events: auto; }
    .sidebar-menu { display: flex; flex-direction: column; gap: 8px; flex: 1; margin-top: 55px; }
    
    .sidebar-link { display: flex; align-items: center; gap: 16px; padding: 14px 12px; border-radius: 16px; color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
    .sidebar-link span { opacity: 0; transition: opacity 0.15s ease; }
    .desktop-sidebar:hover .sidebar-link span { opacity: 1; transition-delay: 0.05s; }
    .sidebar-link svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
    .sidebar-link:hover { background: rgba(128,128,128,0.03); color: var(--text-main); }
    .sidebar-link.active { background: var(--avatar-bg); color: var(--accent); }
    .sidebar-link.active svg { stroke-width: 2.3; }
    .theme-btn-desktop { display: flex; align-items: center; justify-content: center; margin-top: auto; padding: 14px; border-radius: 16px; color: var(--accent); cursor: pointer; width: 100%; border: 1px solid transparent; transition: border-color 0.15s; }
    .theme-btn-desktop:hover { border-color: var(--border); }
    .subject-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* МОДАЛЬНЫЕ ОКНА */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: var(--overlay-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); 
    z-index: 99999 !important; display: none; justify-content: center; align-items: center; padding: 16px; 
}
.report-card { 
    background: var(--card-bg); border-radius: 28px; width: 100%; max-width: 380px; 
    padding: 28px; border: 1px solid var(--border); text-align: center; 
    box-shadow: 0 24px 60px rgba(0,0,0,0.15); animation: modalOpen 0.3s cubic-bezier(0.25, 1, 0.5, 1) both; 
}
@keyframes modalOpen { from { transform: scale(0.9) translateZ(0); opacity: 0; } to { transform: scale(1) translateZ(0); opacity: 1; } }

.trophy-box { 
    width: 54px; height: 54px; background: rgba(255, 188, 0, 0.1); color: #ffbc00; 
    border-radius: 16px; display: flex; align-items: center; justify-content: center; 
    margin: 0 auto 20px auto; 
}
.trophy-box svg { 
    width: 26px !important; 
    height: 26px !important; 
    stroke: currentColor; stroke-width: 2.2; fill: none; 
    display: block;
}
.report-title { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.report-subtitle { font-size: 13px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 24px; }
.close-report-btn { background: var(--accent); color: #fff; border: none; width: 100%; padding: 16px; border-radius: 18px; font-weight: 700; font-size: 15px; cursor: pointer; display: block; transition: background-color 0.2s; }
.close-report-btn:hover { background-color: var(--accent-hover); }