/* =============================================
   СКИЛЛТРЕК — Глобальные стили
   Новый дизайн-система
   ============================================= */

/* --- CSS Variables (Light Theme) --- */
:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --secondary: #00B894;
    --secondary-light: #55EFC4;
    --accent-orange: #FDCB6E;
    --accent-red: #FF6B6B;
    --accent-pink: #FD79A8;
    --accent-cyan: #00CEC9;
    --accent-blue: #0984E3;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F4F5F9;
    --bg-tertiary: #ECEDF3;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F9FE;
    --bg-code: #1E1E2E;

    --text-primary: #0a0a2e;
    --text-secondary: #4A4A6A;
    --text-tertiary: #8888A8;
    --text-inverse: #FFFFFF;

    --border: #E8E8F0;
    --border-hover: #D0D0E0;

    --shadow-sm: 0 2px 8px rgba(10, 10, 46, 0.06);
    --shadow-md: 0 4px 24px rgba(10, 10, 46, 0.10);
    --shadow-lg: 0 8px 48px rgba(10, 10, 46, 0.12);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --nav-height: 72px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
    --bg-primary: #0F0F1A;
    --bg-secondary: #16162A;
    --bg-tertiary: #1E1E35;
    --bg-card: #1A1A30;
    --bg-card-hover: #22223A;
    --bg-code: #12121F;

    --text-primary: #E8E8F0;
    --text-secondary: #A0A0C0;
    --text-tertiary: #6868A0;

    --border: #2A2A45;
    --border-hover: #3A3A60;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.3);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 15, 26, 0.92);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 36px;
    width: auto;
}

.logo-text {
    color: var(--text-primary);
}

.logo-accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(108, 92, 231, 0.05);
}

.icon-moon { display: none; }

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Avatar dropdown */
.avatar-dropdown {
    position: relative;
}

.avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #4e8cff 100%);
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.avatar-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.2);
}

.avatar-initials {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-main);
    line-height: 1;
    pointer-events: none;
}

.avatar-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 200px;
    padding: 8px;
    z-index: 1000;
}

.avatar-menu.open,
.avatar-menu.active {
    display: block;
    animation: fadeInDown 0.15s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.avatar-menu-header {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.avatar-menu-header strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-menu-header small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s;
}

.avatar-menu a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.avatar-menu a.danger {
    color: var(--accent-red);
}
.avatar-menu a.danger:hover {
    background: rgba(255,107,107,0.08);
}

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
}

.btn-dark {
    background: #1a1a2e;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-dark:hover {
    background: #0a0a2e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,26,46,0.30);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.45);
}

/* Тёмная кнопка (новый стиль) */
.btn-dark {
    background: #1a1a2e;
    color: white;
    box-shadow: 0 4px 15px rgba(26, 26, 46, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.btn-dark:hover {
    background: #0a0a2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(26, 26, 46, 0.35);
}

.btn-outline {
    background: transparent;
    color: #1a1a2e;
    border: 2px solid #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-outline:hover {
    background: #1a1a2e;
    color: #fff;
    transform: translateY(-2px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-white {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.xp-badge {
    background: rgba(0, 184, 148, 0.2);
    color: var(--secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-white .xp-badge {
    background: rgba(0, 184, 148, 0.15);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #4e8cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Code Window */
.hero-visual {
    position: relative;
}

.code-window {
    background: var(--bg-code);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #FF5F57; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.code-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-mono);
}

.code-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: #ABB2BF;
    overflow-x: auto;
}

.code-keyword { color: #C678DD; }
.code-class { color: #E5C07B; }
.code-func { color: #61AFEF; }
.code-param { color: #E06C75; }
.code-string { color: #98C379; }
.code-number { color: #D19A66; }
.code-comment { color: #5C6370; }

.code-cursor {
    width: 2px;
    height: 18px;
    background: var(--primary);
    position: absolute;
    bottom: 38px;
    right: 58px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Floating Cards */
.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
    z-index: 2;
    white-space: nowrap;
}

.card-emoji { font-size: 1.3rem; }

.float-1 {
    top: -20px;
    right: -20px;
    animation: float-y 3s ease-in-out infinite;
}

.float-2 {
    bottom: 60px;
    left: -40px;
    animation: float-y 4s ease-in-out infinite 0.5s;
}

.float-3 {
    top: 50%;
    right: -50px;
    animation: float-y 3.5s ease-in-out infinite 1s;
}

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 1;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* --- Section Common --- */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.badge-purple { background: rgba(108, 92, 231, 0.1); color: var(--primary); }
.badge-green { background: rgba(0, 184, 148, 0.1); color: var(--secondary); }
.badge-blue { background: rgba(9, 132, 227, 0.1); color: var(--accent-blue); }
.badge-orange { background: rgba(253, 203, 110, 0.15); color: #E17055; }
.badge-cyan { background: rgba(0, 206, 201, 0.1); color: var(--accent-cyan); }

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Classes Grid --- */
.classes-section {
    background: var(--bg-secondary);
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.class-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 2px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.class-card--locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.class-card--active {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    opacity: 1;
}

.class-card--active:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 50px rgba(108, 92, 231, 0.25);
}

.class-badge {
    position: absolute;
    top: -10px;
    background: linear-gradient(135deg, var(--primary), #4e8cff);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.class-number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
}

.class-card--active .class-number {
    background: linear-gradient(135deg, var(--primary), #4e8cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.class-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.class-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 12px;
}

.class-progress {
    width: 100%;
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #4e8cff);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.class-progress span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* --- Topics Timeline --- */
.topics-timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.topic-card {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
}

.topic-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.topic-card[data-status="completed"] {
    border-left: 4px solid var(--secondary);
}

.topic-card[data-status="current"] {
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.topic-card[data-status="locked"] {
    opacity: 0.6;
}

.topic-card[data-status="locked"]:hover {
    transform: none;
    cursor: not-allowed;
}

.topic-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-tertiary);
    min-width: 40px;
    font-variant-numeric: tabular-nums;
}

.topic-card[data-status="current"] .topic-number {
    color: var(--primary);
}

.topic-content {
    flex: 1;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.topic-icon {
    font-size: 1.3rem;
}

.topic-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.topic-content > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.topic-lessons {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.topic-xp {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.topic-status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.topic-status-badge.completed {
    background: rgba(0, 184, 148, 0.1);
    color: var(--secondary);
}

.topic-status-badge.current {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.topic-progress-bar {
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 12px;
}

.topic-progress-bar .progress-fill {
    height: 100%;
}

/* --- Lesson Types Grid (For Students) --- */
.students-section {
    background: var(--bg-secondary);
}

.lesson-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lesson-type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.lesson-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #4e8cff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.lesson-type-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.lesson-type-card:hover::before {
    transform: scaleX(1);
}

.ltc-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.ltc-icon--interactive { background: rgba(108, 92, 231, 0.1); color: var(--primary); }
.ltc-icon--quiz { background: rgba(253, 203, 110, 0.15); color: #E17055; }
.ltc-icon--practice { background: rgba(0, 184, 148, 0.1); color: var(--secondary); }
.ltc-icon--prep { background: rgba(255, 107, 107, 0.1); color: var(--accent-red); }
.ltc-icon--flashcards { background: rgba(108, 92, 231, 0.1); color: var(--primary-light); }
.ltc-icon--sandbox { background: rgba(0, 206, 201, 0.1); color: var(--accent-cyan); }

.lesson-type-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lesson-type-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.ltc-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
}

.tag-blue { background: rgba(9, 132, 227, 0.1); color: var(--accent-blue); }
.tag-green { background: rgba(0, 184, 148, 0.1); color: var(--secondary); }
.tag-purple { background: rgba(108, 92, 231, 0.1); color: var(--primary); }
.tag-orange { background: rgba(253, 203, 110, 0.15); color: #E17055; }
.tag-red { background: rgba(255, 107, 107, 0.1); color: var(--accent-red); }

.ltc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.ltc-link:hover {
    gap: 10px;
}

/* --- Gamification Section --- */
.gamification-grid {
    display: grid;
    grid-template-columns: 300px 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.game-card:hover {
    box-shadow: var(--shadow-md);
}

.game-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Player Card */
.player-card {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.player-avatar {
    position: relative;
    margin-bottom: 16px;
}

.avatar-ring svg {
    width: 120px;
    height: 120px;
}

.avatar-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
}

.avatar-level {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #4e8cff);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-card);
}

.player-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.player-xp {
    width: 100%;
    margin-bottom: 20px;
}

.xp-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 6px;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #4e8cff);
    border-radius: var(--radius-full);
    position: relative;
    transition: width 1.5s ease;
}

.xp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: xp-shine 2s infinite;
}

@keyframes xp-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.player-xp span {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.player-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.ps-item {
    text-align: center;
}

.ps-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.ps-label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.achievement {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
    filter: grayscale(1);
    opacity: 0.4;
}

.achievement.unlocked {
    filter: none;
    opacity: 1;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
}

.achievement.unlocked:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
}

.achievement-glow {
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #4e8cff);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.achievement.unlocked:hover .achievement-glow {
    opacity: 0.3;
}

/* Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.lb-row:hover {
    background: var(--bg-card-hover);
}

.lb-rank {
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.lb-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.lb-xp {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.lb-you {
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: var(--radius-sm);
}

.lb-footer {
    margin-top: 12px;
    text-align: center;
}

.lb-class-filter {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

/* Daily Tasks */
.daily-tasks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    transition: var(--transition);
}

.daily-task:hover {
    background: var(--bg-tertiary);
}

.dt-check {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
}

.daily-task.completed .dt-check {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.dt-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dt-title {
    font-size: 0.88rem;
    font-weight: 500;
}

.daily-task.completed .dt-title {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.dt-reward {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
}

.daily-bonus {
    margin-top: 16px;
    padding: 12px;
    text-align: center;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 184, 148, 0.05));
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}

.bonus-xp {
    font-weight: 700;
    color: var(--primary);
}

/* Daily Card */
.daily-card {
    grid-column: span 2;
}

/* --- Teachers Grid --- */
.teachers-section {
    background: var(--bg-secondary);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.teacher-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

.teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-blue);
}

.tc-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.teacher-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.teacher-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.tc-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tc-features li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
}

.tc-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: 700;
}

/* --- Features Bento --- */
.features-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    overflow: hidden;
}

.bento-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.bento-large {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.bento-wide {
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.bento-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.bento-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.bento-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* AI Chat Preview */
.ai-chat-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    max-width: 85%;
    animation: fade-up 0.5s ease;
}

.chat-bubble.bot {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    align-self: flex-start;
}

.chat-bubble.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
}

/* Season Badges */
.season-badges {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.season-badge {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    opacity: 0.6;
    transition: var(--transition);
}

.season-badge.active {
    opacity: 1;
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

/* --- CTA Section --- */
.cta-section {
    padding: 80px 0;
}

.cta-card {
    position: relative;
    background: linear-gradient(135deg, #0a0a2e, #1a1a3e, var(--primary-dark));
    border-radius: var(--radius-xl);
    padding: 60px;
    text-align: center;
    color: white;
    overflow: hidden;
}

.cta-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.cta-card h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
}

.cta-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
    position: relative;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    position: relative;
    flex-wrap: wrap;
}

.cta-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    opacity: 0.9;
    font-size: 0.9rem;
}

.trust-avatars {
    display: flex;
    align-items: center;
}

.trust-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-left: -8px;
    border: 2px solid rgba(108, 92, 231, 0.8);
}

.trust-avatar:first-child { margin-left: 0; }

.trust-more {
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    background: rgba(0, 184, 148, 0.4);
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 32px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 28px;
    padding-bottom: 28px;
}

.footer-brand-col {}
.footer-logo { margin-bottom: 14px; display: inline-flex; }
.footer-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 300px;
    margin-top: 12px;
}

.footer-nav-col {}
.footer-col-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-tertiary);
    margin-bottom: 14px;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-list a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.18s;
}

.footer-nav-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* keep old classes for backward-compat */
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-brand { flex-shrink: 0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: .88rem; color: var(--text-secondary); transition: var(--transition); }
.footer-links a:hover { color: var(--primary); }

/* Footer legacy grid support */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 12px;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--text-tertiary);
    transition: var(--transition);
}

.footer-socials a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* --- Achievement Popup --- */
.achievement-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    overflow: hidden;
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-popup.show {
    transform: translateY(0);
}

.ap-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.ap-icon {
    font-size: 2rem;
    animation: achievement-bounce 0.6s ease;
}

@keyframes achievement-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.ap-text {
    display: flex;
    flex-direction: column;
}

.ap-title {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ap-name {
    font-weight: 700;
    font-size: 1rem;
}

.ap-xp {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.ap-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #4e8cff);
    animation: ap-timer 4s linear forwards;
}

@keyframes ap-timer {
    from { width: 100%; }
    to { width: 0%; }
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888A8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Auth forms */
.auth-container {
    max-width: 440px;
    margin: 120px auto 60px;
    padding: 0 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 28px;
}

.auth-card .btn {
    width: 100%;
    justify-content: center;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* Flash messages */
.flash {
    max-width: 600px;
    margin: 90px auto 0;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.flash-success {
    background: rgba(0, 184, 148, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.flash-error {
    background: rgba(255, 107, 107, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.flash-info {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
    border: 1px solid rgba(108, 92, 231, 0.2);
}

/* --- Dashboard cards --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.dash-card:hover {
    box-shadow: var(--shadow-md);
}

.dash-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.dash-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Page header */
.page-header {
    padding: 100px 0 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Content area */
.content-area {
    padding: 40px 0 80px;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-card-hover);
}

/* --- Animations --- */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .code-window {
        transform: none;
    }

    .gamification-grid {
        grid-template-columns: 1fr 1fr;
    }

    .player-card {
        grid-column: span 2;
        grid-row: auto;
    }

    .daily-card {
        grid-column: span 2;
    }

    .lesson-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large {
        grid-column: span 2;
    }

    .bento-wide {
        grid-column: span 2;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        transform: translateY(-120%);
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .burger {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .floating-card {
        display: none;
    }

    .gamification-grid {
        grid-template-columns: 1fr;
    }

    .player-card {
        grid-column: auto;
    }

    .daily-card {
        grid-column: auto;
    }

    .lesson-types-grid {
        grid-template-columns: 1fr;
    }

    .teachers-grid {
        grid-template-columns: 1fr;
    }

    .features-bento {
        grid-template-columns: 1fr;
    }

    .bento-large {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .bento-wide {
        grid-column: auto;
        flex-direction: column;
    }

    .season-badges {
        flex-wrap: wrap;
    }

    .classes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-card {
        padding: 40px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .hero-stats {
        flex-wrap: wrap;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

    .auth-container {
        margin-top: 100px;
    }

    .auth-card {
        padding: 28px 24px;
    }
}

@media (max-width: 480px) {
    .classes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-container {
        padding: 40px 16px;
    }

    .achievements-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .achievement {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .btn-sm.btn-outline {
        display: none;
    }
}
