/* ==========================================================================
   LERNISY · SISTEMA DE DISEÑO MODERNO & GAMIFICADO (v3.0)
   ========================================================================== */

/* 1. VARIABLES & PALETAS POR TEMA */
:root {
    /* Tema Aurora / Modern Indigo (Default) */
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-light: rgba(124, 58, 237, 0.12);
    --primary-rgb: 124, 58, 237;
    --secondary: #6366f1;
    --accent: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;

    --bg-main: #060813;
    --bg-card: #0e1122;
    --bg-card-glass: rgba(14, 17, 34, 0.88);
    --bg-subtle: #151930;
    --border-color: #222642;
    --border-light: rgba(124, 58, 237, 0.25);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --header-bg: rgba(6, 8, 19, 0.92);
    --nav-bg: rgba(14, 17, 34, 0.95);
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 16px 36px -4px rgba(124, 58, 237, 0.35), 0 6px 14px -2px rgba(0, 0, 0, 0.4);
    --glow: 0 0 25px rgba(124, 58, 237, 0.45);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-retro: 'Press Start 2P', cursive;
}

/* Tema Neón / Cyberpunk (Oscuro) */
.theme-neon {
    --primary: #00f0ff;
    --primary-hover: #00c8d6;
    --primary-light: rgba(0, 240, 255, 0.15);
    --primary-rgb: 0, 240, 255;
    --secondary: #bd00ff;
    --accent: #ff007b;
    --accent-cyan: #00f0ff;
    --accent-emerald: #00ff88;
    --accent-amber: #ffe600;
    --accent-rose: #ff2a5f;

    --bg-main: #0a0b12;
    --bg-card: #121422;
    --bg-card-glass: rgba(18, 20, 34, 0.88);
    --bg-subtle: #191c30;
    --border-color: #272c4a;
    --border-light: rgba(0, 240, 255, 0.2);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0a0b12;

    --header-bg: rgba(10, 11, 18, 0.92);
    --nav-bg: rgba(18, 20, 34, 0.95);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --card-shadow-hover: 0 10px 30px rgba(0, 240, 255, 0.25), 0 0 15px rgba(189, 0, 255, 0.2);
    --glow: 0 0 25px rgba(0, 240, 255, 0.4);
}

/* Tema Claro Minimalista */
.theme-light {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-rgb: 37, 99, 235;
    --secondary: #4f46e5;
    --accent: #f43f5e;
    --accent-cyan: #0284c7;
    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;

    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-glass: rgba(255, 255, 255, 0.92);
    --bg-subtle: #e2e8f0;
    --border-color: #cbd5e1;
    --border-light: rgba(203, 213, 225, 0.7);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --header-bg: rgba(255, 255, 255, 0.95);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    --card-shadow-hover: 0 10px 25px rgba(37, 99, 235, 0.12);
    --glow: 0 0 15px rgba(37, 99, 235, 0.2);
}

/* Tema Retro Arcade 8-bit */
.theme-retro {
    --primary: #00ffaa;
    --primary-hover: #00cc88;
    --primary-light: rgba(0, 255, 170, 0.15);
    --primary-rgb: 0, 255, 170;
    --secondary: #00aaff;
    --accent: #ff0055;
    --accent-cyan: #00ffaa;
    --accent-emerald: #aaff00;
    --accent-amber: #ffcc00;
    --accent-rose: #ff0055;

    --bg-main: #050508;
    --bg-card: #0e1017;
    --bg-card-glass: rgba(14, 16, 23, 0.95);
    --bg-subtle: #161822;
    --border-color: #00ffaa;
    --border-light: rgba(0, 255, 170, 0.4);

    --text-primary: #00ffaa;
    --text-secondary: #00aaff;
    --text-muted: #5eead4;
    --text-inverse: #000000;

    --header-bg: #000000;
    --nav-bg: #000000;
    --card-shadow: 4px 4px 0px #aaff00;
    --card-shadow-hover: 6px 6px 0px #00aaff, 0 0 20px rgba(0, 255, 170, 0.5);
    --glow: 0 0 20px rgba(0, 255, 170, 0.6);
}

.theme-retro * {
    font-family: var(--font-retro), monospace !important;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.app {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-main);
    display: flex;
    position: relative;
    margin: 0;
}

/* ==========================================================================
   3. HEADER & CONTROLES SUPERIORES
   ========================================================================== */
.header {
    height: 70px;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hamburger-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hamburger-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.04);
}

.logo {
    font-size: 1.55rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    user-select: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Chips de Estadísticas del Usuario en Header */
.user-stats-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stat-chip:hover {
    transform: scale(1.08);
}

.stat-chip.level { color: var(--primary); }
.stat-chip.xp { color: var(--accent-cyan); }
.stat-chip.streak { color: var(--accent-amber); }

.header-action-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent-rose);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--header-bg);
}

.user-avatar-header {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar-header:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

/* ==========================================================================
   4. SCREENS & CONTENEDOR PRINCIPAL
   ========================================================================== */
.screens {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 90px; /* Espacio para bottom nav */
    scroll-behavior: smooth;
}

.screen {
    display: none;
    padding: 24px;
    animation: fadeInScreen 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
    display: block;
}

@keyframes fadeInScreen {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   5. DASHBOARD PRINCIPAL (HERO, RETO DIARIO, BUSCADOR)
   ========================================================================== */
/* Hero Banner Moderno */
.hero-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #db2777 100%);
    border-radius: var(--radius-xl);
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 12px 35px -5px rgba(79, 70, 229, 0.35);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-greeting {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 1rem;
    opacity: 0.92;
    max-width: 600px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hero-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-stat-box {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.hero-stat-box i {
    font-size: 1.3rem;
}

/* Buscador Global */
.search-container {
    position: relative;
    margin-bottom: 24px;
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 54px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 0 52px 0 52px;
    font-size: 1rem;
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light), var(--card-shadow-hover);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: none;
}

.search-results-overlay {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    max-height: 420px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    padding: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: var(--bg-subtle);
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.search-result-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.search-result-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Tarjeta de Reto del Día */
.daily-challenge-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.daily-challenge-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-amber), var(--accent-rose));
}

.challenge-badge {
    background: #fef3c7;
    color: #b45309;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.challenge-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.challenge-question {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.challenge-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.challenge-opt-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 7px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.challenge-opt-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Grid de Tarjetas Principales */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.card.pulse-hover {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.card.pulse-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary);
}

.card-icon {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.card.pulse-hover:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-icon.blue { background: #e0e7ff; color: #4f46e5; }
.card-icon.green { background: #dcfce7; color: #16a34a; }
.card-icon.red { background: #ffe4e6; color: #e11d48; }
.card-icon.gold { background: #fef3c7; color: #d97706; }
.card-icon.purple { background: #f3e8ff; color: #9333ea; }
.card-icon.cyan { background: #cffafe; color: #0891b2; }

.card-info h3 {
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.card-info p {
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* ==========================================================================
   6. VISOR DE CLASE & LECTOR DE CONTENIDOS
   ========================================================================== */
.class-reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 9px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.lesson-content-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--card-shadow);
    line-height: 1.75;
    margin-bottom: 28px;
}

.lesson-content-box h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.lesson-content-box p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 1.02rem;
}

.concept-highlight-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 20px 0;
}

.concept-highlight-box h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sección de Ejercicios Interactivos dentro de la Clase */
.interactive-quiz-section {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.quiz-question-card {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.quiz-question-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.quiz-question-title {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option-btn {
    text-align: left;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-option-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.quiz-option-btn.correct {
    background: #dcfce7 !important;
    border-color: #16a34a !important;
    color: #15803d !important;
    font-weight: 700;
}

.quiz-option-btn.wrong {
    background: #ffe4e6 !important;
    border-color: #e11d48 !important;
    color: #be123c !important;
}

.quiz-feedback {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}

.quiz-feedback.show-correct {
    display: block;
    background: #dcfce7;
    color: #15803d;
}

.quiz-feedback.show-wrong {
    display: block;
    background: #ffe4e6;
    color: #be123c;
}

/* Botón de Completar Clase */
.complete-lesson-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px 26px;
    box-shadow: var(--card-shadow);
}

.btn-complete-lesson {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    transition: all 0.25s ease;
}

.btn-complete-lesson:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   7. MINIJUEGOS EDUCATIVOS EN VIVO (LERNISY GAMES HUB)
   ========================================================================== */
.games-hub-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 22px;
    scrollbar-width: thin;
}

.game-tab-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
}

.game-tab-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.game-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

/* Contenedor del Juego Activo */
.playable-game-container {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--card-shadow-hover);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.game-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.game-hud-chip {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Juego 1: Trivia Flash */
.trivia-box {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.trivia-timer-bar-wrap {
    width: 100%;
    height: 8px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 20px;
}

.trivia-timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-emerald), var(--accent-amber), var(--accent-rose));
    transition: width 0.1s linear;
}

.trivia-question-text {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.4;
}

.trivia-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .trivia-options-grid {
        grid-template-columns: 1fr;
    }
}

.trivia-btn {
    background: var(--bg-subtle);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.trivia-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Juego 2: Ahorcado Científico */
.hangman-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hangman-drawing {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    white-space: pre;
    color: var(--text-primary);
    background: var(--bg-subtle);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.hangman-hint {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.hangman-word {
    display: flex;
    gap: 10px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 10px 0;
}

.hangman-keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 550px;
    justify-content: center;
}

.key-btn {
    width: 38px;
    height: 42px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.key-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: scale(1.08);
}

.key-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Juego 3: Memotest / Conectar Parejas */
.memotest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 500px) {
    .memotest-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.memotest-card {
    aspect-ratio: 1;
    background: var(--bg-subtle);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.memotest-card.flipped {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: rotateY(180deg);
}

.memotest-card.matched {
    background: #dcfce7;
    border-color: #16a34a;
    pointer-events: none;
    animation: popIn 0.3s ease;
}

/* Juego 4: Cálculo Mental Contrarreloj */
.math-sprint-box {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.math-problem {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 20px 0;
    color: var(--primary);
}

.math-input-wrapper {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.math-input {
    width: 140px;
    height: 58px;
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.math-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* ==========================================================================
   8. RANKING & PODIO
   ========================================================================== */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin: 30px 0 40px;
    padding: 0 10px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 110px;
}

.podium-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
}

.podium-place.first .podium-avatar {
    width: 76px;
    height: 76px;
    border: 4px solid #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

.crown-icon {
    position: absolute;
    top: -16px;
    color: #f59e0b;
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: bounceCrown 2s infinite ease-in-out;
}

@keyframes bounceCrown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.podium-block {
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    padding: 10px;
}

.podium-place.first .podium-block {
    height: 140px;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.podium-place.second .podium-block {
    height: 105px;
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

.podium-place.third .podium-block {
    height: 80px;
    background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
}

.ranking-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.ranking-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:hover {
    background: var(--bg-subtle);
}

.ranking-pos {
    width: 36px;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.ranking-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.ranking-row-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.ranking-xp-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
}

/* ==========================================================================
   9. PERFIL & LOGROS (ACHIEVEMENTS)
   ========================================================================== */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

@media (max-width: 600px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    position: relative;
    cursor: pointer;
}

.profile-avatar-large::after {
    content: '✏️';
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 1rem;
    background: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.achievement-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
    filter: grayscale(0.9) opacity(0.5);
}

.achievement-badge.unlocked {
    filter: none;
    border-color: var(--accent-amber);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
    transform: translateY(-2px);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.achievement-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.achievement-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   10. AULAS & FOROS DE DISCUSIÓN
   ========================================================================== */
.aula-header-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.forum-thread-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
}

.forum-thread-card:hover {
    border-color: var(--primary);
}

.forum-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.forum-title {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.forum-body {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.forum-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.forum-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.forum-action-btn:hover {
    color: var(--primary);
}

/* ==========================================================================
   11. BOTTOM NAVIGATION (MÓVIL & TABLET)
   ========================================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 72px;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
    z-index: 60;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-2px);
}

.nav-fab-wrap {
    position: relative;
    top: -14px;
}

.plus-circle {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plus-circle:hover {
    transform: scale(1.1) rotate(90deg);
}

/* ==========================================================================
   12. MODALES & OVERLAYS
   ========================================================================== */
.login-overlay,
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: scaleModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleModal {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.login-option {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--primary);
    color: white;
    border: none;
    font-size: 0.98rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 14px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.login-option:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Notificación Toast Flotante */
.notification {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   13. FORMULARIOS & CONTROLES
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==========================================================================
   14. CONFETTI ANIMATION
   ========================================================================== */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ffd300;
    top: -20px;
    opacity: 0.9;
    z-index: 999;
    animation: confettiFall 2.8s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(720deg);
        opacity: 0;
    }
}

/* ==========================================================================
   15. LERNISY CODE (IDE & DESAFÍOS INTERACTIVOS)
   ========================================================================== */
.code-ide-container {
    display: flex;
    flex-direction: column;
    background: #0f111a;
    border: 2px solid #232738;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    margin-bottom: 24px;
}

.ide-toolbar {
    background: #161826;
    border-bottom: 1px solid #272c40;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.ide-tabs {
    display: flex;
    gap: 4px;
}

.ide-tab-btn {
    background: #0f111a;
    border: 1px solid #2a304a;
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.ide-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ide-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-run-code {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}

.btn-run-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.ide-split-pane {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}

@media (max-width: 800px) {
    .ide-split-pane {
        grid-template-columns: 1fr;
    }
}

.ide-editor-area {
    display: flex;
    flex-direction: column;
    background: #0d0e17;
    border-right: 1px solid #232738;
}

.code-textarea {
    flex: 1;
    width: 100%;
    min-height: 360px;
    background: transparent;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    line-height: 1.6;
    padding: 18px;
    border: none;
    resize: vertical;
    outline: none;
    tab-size: 2;
}

.ide-preview-area {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
}

.preview-top-bar {
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ide-preview-iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: none;
    background: white;
}

.ide-console-output {
    background: #0a0b12;
    border-top: 1px solid #232738;
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: #38bdf8;
    max-height: 120px;
    overflow-y: auto;
}

.code-challenge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.code-challenge-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

/* ==========================================================================
   16. LERNISY IDIOMAS (ESTILO DUOLINGO)
   ========================================================================== */
.duo-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 14px 22px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.duo-hearts-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.25rem;
    color: var(--accent-rose);
    font-weight: 800;
}

.duo-progress-wrap {
    flex: 1;
    max-width: 400px;
    height: 12px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 16px;
}

.duo-progress-bar {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, #58cc02, #22c55e);
    transition: width 0.3s ease;
}

/* Árbol de Lecciones (Learning Path) */
.duo-path-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 20px 0 40px;
}

.duo-node-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

.duo-node-item:hover {
    transform: scale(1.08);
}

.duo-node-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #58cc02, #22c55e);
    border: 5px solid #46a302;
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 0 #3b8702, 0 12px 25px rgba(88, 204, 2, 0.35);
    position: relative;
}

.duo-node-circle.locked {
    background: #cbd5e1;
    border-color: #94a3b8;
    box-shadow: 0 6px 0 #64748b;
    color: #64748b;
    cursor: not-allowed;
}

.duo-node-crown {
    position: absolute;
    top: -12px;
    right: -6px;
    background: #f59e0b;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.duo-node-title {
    margin-top: 10px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
}

/* Ejercicio de Idiomas Activo */
.duo-exercise-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: var(--card-shadow-hover);
}

.duo-prompt-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.duo-speaker-btn {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: var(--primary);
    color: white;
    font-size: 1.4rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.duo-speaker-btn:hover {
    transform: scale(1.08);
}

.duo-sentence-target {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
}

.duo-assembly-area {
    min-height: 60px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 26px;
}

.duo-word-chip {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 18px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 3px 0 var(--border-color);
    user-select: none;
    transition: all 0.15s ease;
}

.duo-word-chip:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.duo-word-chip.used {
    opacity: 0.25;
    pointer-events: none;
    background: var(--bg-subtle);
}

.duo-word-bank {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

/* ==========================================================================
   17. LERNISY CLASSROOM (GOOGLE CLASSROOM STYLE)
   ========================================================================== */
.classroom-header-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    border-radius: var(--radius-xl);
    padding: 34px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}

.classroom-code-chip {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.classroom-nav-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 22px;
    gap: 8px;
}

.classroom-tab {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.classroom-tab:hover {
    color: var(--primary);
}

.classroom-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.classroom-announcement-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 18px;
    display: flex;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.classroom-announcement-box:hover {
    border-color: var(--primary);
}

.gradebook-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow-x: auto;
    box-shadow: var(--card-shadow);
}

.gradebook-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.gradebook-table th,
.gradebook-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.gradebook-table th {
    background: var(--bg-subtle);
    font-weight: 800;
    color: var(--text-secondary);
}

.grade-input-cell {
    width: 65px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 800;
    background: var(--bg-subtle);
    color: var(--text-primary);
}

/* ==========================================================================
   18. LERNISY FLASH / MICRO-LEARNING (MIMO STYLE)
   ========================================================================== */
.micro-card-deck {
    max-width: 580px;
    margin: 0 auto;
}

.micro-pill-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 10px;
}

.micro-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--card-shadow-hover);
    margin-bottom: 20px;
    position: relative;
    line-height: 1.7;
}

.micro-dots-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 18px 0;
}

.micro-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.micro-dot.active {
    width: 28px;
    border-radius: 999px;
    background: var(--primary);
}

/* ==========================================================================
   19. BADGES DE VERIFICACIÓN, ROLES & PERFILES FIRESTORE
   ========================================================================== */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.verified-badge.verified-profesor {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #f59e0b;
}

.verified-badge.verified-estudiante {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #6366f1;
}

.verified-badge.verified-particular {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #22c55e;
}

.user-nickname-tag {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
    font-weight: 700;
}

.role-pill {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.role-pill.estudiante {
    background: #e0e7ff;
    color: #4f46e5;
}

.role-pill.particular {
    background: #dcfce7;
    color: #16a34a;
}

.role-pill.profesor {
    background: #fef3c7;
    color: #d97706;
}

.logo-brand-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.logo-svg-icon {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 4px 10px rgba(99, 102, 241, 0.35));
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-brand-wrap:hover .logo-svg-icon {
    transform: scale(1.1) rotate(-6deg);
}

.logo-sub-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    line-height: 1;
}

/* Modal de Perfil y Nickname */
.profile-edit-modal-wrap {
    max-width: 520px;
    width: 100%;
}


/* ==========================================================================
   LERNISY PROFESIONAL · LAYOUT SERIO & ESTRUCTURADO (DESKTOP SIDEBAR + HEADER)
   ========================================================================== */

/* Layout Shell */
.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text-primary);
    position: relative;
}

/* Sidebar Desktop */
.app-sidebar {
    width: 250px;
    background: #0f172a;
    color: #f8fafc;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    height: 64px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1e293b;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

.sidebar-brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.sidebar-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.sidebar-brand-sub {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-user-card {
    padding: 14px 18px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-user-meta {
    flex: 1;
    overflow: hidden;
}

.sidebar-user-nick {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-user-role-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.25);
    color: #818cf8;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 10px;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 12px 4px 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: #94a3b8;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.sidebar-link i {
    width: 18px;
    font-size: 0.95rem;
    text-align: center;
}

.sidebar-link:hover {
    color: #f8fafc;
    background: #1e293b;
}

.sidebar-link.active {
    color: #ffffff;
    background: #4f46e5;
}

.sidebar-link .badge-count {
    margin-left: auto;
    background: #334155;
    color: #f8fafc;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #64748b;
}

/* Área de Contenido Principal (con margen izquierdo para el sidebar) */
.app-main {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

/* Topbar Superior Limpia */
.app-topbar {
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 14px;
    width: 380px;
    max-width: 100%;
    gap: 8px;
}

.topbar-search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.86rem;
    color: var(--text-primary);
    width: 100%;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Ocultar barra inferior en pantallas de escritorio */
@media (min-width: 901px) {
    .bottom-nav {
        display: none !important;
    }
    .fab-btn {
        display: none !important;
    }
}

/* Ajustes responsivos para móviles y tablets */
@media (max-width: 900px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
        padding-bottom: 70px;
    }
    .topbar-search-box {
        width: 200px;
    }
}

/* ==========================================================================
   MÓDULO: AULAS PRIVADAS
   ========================================================================== */
.aulas-header-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 26px 30px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.aula-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
}

.aula-card-modern:hover {
    border-color: var(--primary);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.aula-card-banner {
    height: 85px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white;
}

.aula-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aula-card-code-pill {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    color: #e0e7ff;
    letter-spacing: 0.5px;
}

.aula-card-teacher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.aula-detail-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.aula-top-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e293b 100%);
    color: white;
    padding: 30px;
}

.aula-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-subtle);
    padding: 0 20px;
    gap: 10px;
}

.aula-tab-item {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.15s ease;
}

.aula-tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.alumnos-table {
    width: 100%;
    border-collapse: collapse;
}

.alumnos-table th {
    text-align: left;
    padding: 12px 18px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.alumnos-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}

/* ==========================================================================
   MÓDULO: BANCO DE EXÁMENES & ACTIVIDADES
   ========================================================================== */
.banco-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.banco-tabs-group {
    display: flex;
    gap: 8px;
}

.banco-tab-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.banco-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.exam-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.exam-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
}

.exam-card-item:hover {
    border-color: var(--primary);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.exam-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.exam-type-badge.oficial {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.exam-type-badge.comunidad {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.exam-meta-pills {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 14px 0 20px 0;
}

.exam-actions-row {
    display: flex;
    gap: 10px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

/* Entorno de Examen Cronometrado */
.exam-runner-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 30px;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.exam-timer-badge {
    background: #fee2e2;
    color: #ef4444;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.exam-question-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    margin: 20px 0;
}

.exam-option-choice {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.15s ease;
}

.exam-option-choice:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.exam-option-choice.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    font-weight: 700;
}


/* ==========================================================================
   ENHANCED MODERN DASHBOARD & TOPBAR STYLES (v3.1)
   ========================================================================== */
.desktop-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
}

@media (min-width: 901px) {
    .hamburger-btn, .mobile-only-brand {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .desktop-header-title {
        display: none !important;
    }
}

.screen {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    padding: 28px 32px;
}

@media (max-width: 768px) {
    .screen {
        padding: 16px;
    }
}


/* ==========================================================================
   3. HERO STAGE ENVOLVENTE & BOTONES ORGÁNICOS (ESTILO LERNISY VANGUARDIA)
   ========================================================================== */
.lernisy-hero-stage {
    position: relative;
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at 15% 20%, rgba(124, 58, 237, 0.22) 0%, transparent 50%),
                radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.16) 0%, transparent 45%),
                linear-gradient(135deg, #0b0e1b 0%, #111427 45%, #181533 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 16px 45px -10px rgba(124, 58, 237, 0.25), 0 0 1px 1px rgba(255, 255, 255, 0.05) inset;
    padding: 36px 42px;
    margin-bottom: 32px;
    overflow: hidden;
    color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.lernisy-hero-stage:hover {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 22px 55px -8px rgba(124, 58, 237, 0.35);
}

.hero-stage-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero-stage-brand {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hero-stage-logo-wrap {
    flex-shrink: 0;
    width: 82px;
    height: 82px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: floatLogoSoft 4s ease-in-out infinite alternate;
}

.hero-stage-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(124, 58, 237, 0.7));
}

@keyframes floatLogoSoft {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-6px) scale(1.03); }
}

.hero-stage-text {
    flex: 1;
    min-width: 280px;
}

.hero-stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(124, 58, 237, 0.22);
    border: 1px solid rgba(168, 85, 247, 0.38);
    color: #e9d5ff;
    padding: 5px 16px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
}

.hero-stage-title {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 10%, #e2e8f0 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stage-desc {
    color: #cbd5e1;
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0;
    max-width: 760px;
    font-weight: 500;
}

/* BOTONES ORGÁNICOS EN FORMA DE PÍLDORA (PILLS) CON SENSACIÓN TÁCTIL VIVA */
.hero-stage-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    font-size: 0.96rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    position: relative;
    user-select: none;
}

.pill-btn:active {
    transform: scale(0.97);
}

.pill-btn.primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.pill-btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.65);
    filter: brightness(1.08);
}

.pill-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.pill-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pill-btn.accent {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.pill-btn.accent:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.6);
    filter: brightness(1.08);
}

.pill-btn.cyan {
    background: linear-gradient(135deg, #00d2ff 0%, #00f0ff 100%);
    color: #0b0e14;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.35);
}

.pill-btn.cyan:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 32px rgba(0, 240, 255, 0.55);
    filter: brightness(1.06);
}

@media (max-width: 768px) {
    .lernisy-hero-stage {
        padding: 24px 20px;
    }
    .hero-stage-title {
        font-size: 1.6rem;
    }
    .hero-stage-desc {
        font-size: 0.92rem;
    }
    .hero-stage-actions {
        width: 100%;
    }
    .pill-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   PORTAL DE BIENVENIDA DE LERNISY (ATMÓSFERA SERENA, LENTA Y ABRAZADORA)
   ========================================================================== */


/* ==========================================================================
   LERNISY SERENE & TRANQUIL ATMOSPHERE (SANCTUARY DESIGN)
   ========================================================================== */

/* Fondo Nocturno Envolvente & Lento */
body {
    background: radial-gradient(circle at 50% 0%, #151428 0%, #090a14 45%, #040509 100%) !important;
    background-attachment: fixed !important;
    color: #f8fafc;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.app, .app-shell {
    background: transparent !important;
    min-height: 100vh;
    width: 100%;
}

/* NAVEGACIÓN SUPERIOR FLOTANTE DE CRISTAL */
.lernisy-navbar {
    position: sticky;
    top: 14px;
    z-index: 1000;
    max-width: 1440px;
    margin: 12px auto 24px;
    padding: 0 16px;
    box-sizing: border-box;
    width: calc(100% - 32px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(14, 17, 30, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    padding: 8px 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 1px 1px rgba(255, 255, 255, 0.05) inset;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.nav-brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.45));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-brand:hover .nav-brand-logo {
    transform: scale(1.08) rotate(3deg);
}

.nav-brand-info {
    display: flex;
    flex-direction: column;
}

.nav-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.nav-brand-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: 1px;
    opacity: 0.85;
}

.nav-pills-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-pills-bar::-webkit-scrollbar { display: none; }

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-pill:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-pill.active {
    background: rgba(124, 58, 237, 0.22) !important;
    color: #ffffff !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.25) !important;
}

.nav-pill.code-pill {
    color: #38bdf8;
    border: 1px solid rgba(6, 182, 212, 0.25);
    background: rgba(6, 182, 212, 0.08);
}
.nav-pill.code-pill:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
    color: #ffffff;
}

.pill-badge {
    background: rgba(124, 58, 237, 0.4);
    color: #e9d5ff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-stats-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.user-stats-pill:hover {
    transform: scale(1.03);
    border-color: rgba(139, 92, 246, 0.4);
}
.stat-pill-item { display: flex; align-items: center; gap: 4px; color: #a78bfa; }
.stat-pill-item.xp { color: #38bdf8; }
.stat-pill-item.streak { color: #fbbf24; }
.stat-pill-sep { color: rgba(255, 255, 255, 0.2); }

.nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.nav-icon-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.35);
    transform: scale(1.05);
}

.nav-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    padding: 4px 12px 4px 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.nav-user-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(139, 92, 246, 0.35);
}
.nav-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}
.nav-user-details {
    display: flex;
    flex-direction: column;
}
.nav-user-nick {
    font-size: 0.84rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.1;
}
.nav-user-role {
    font-size: 0.68rem;
    color: #a78bfa;
    display: block;
}

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* CONTENEDOR PRINCIPAL FLUIDO Y ESPACIOSO */
.app-main.full-width {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px 80px;
    box-sizing: border-box;
}

/* HERO SANTUARIO LERNISY */
.lernisy-hero-stage {
    position: relative;
    border-radius: 28px;
    background: radial-gradient(circle at 50% -20%, rgba(124, 58, 237, 0.22) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(12, 15, 28, 0.65) 100%),
                rgba(12, 15, 28, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 1px 1px rgba(255, 255, 255, 0.05) inset;
    padding: 48px 40px;
    margin-bottom: 34px;
    overflow: hidden;
    color: #ffffff;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.lernisy-hero-stage:hover {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 35px rgba(124, 58, 237, 0.15);
}

.hero-stage-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-stage-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stage-logo-wrap {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.35);
    animation: gentleFloat 5s ease-in-out infinite;
}
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hero-stage-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

.hero-stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-stage-title {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.7px;
    margin-bottom: 10px;
}

.hero-stage-desc {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

.hero-stage-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    user-select: none;
}

.pill-btn.primary {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}
.pill-btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.55);
}

.pill-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
}
.pill-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.pill-btn.accent {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.35);
    color: #38bdf8;
}
.pill-btn.accent:hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: rgba(14, 165, 233, 0.6);
    transform: translateY(-3px);
    color: #ffffff;
}

.pill-btn.cyan {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: #030712;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3);
}
.pill-btn.cyan:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.5);
}

/* TARJETAS SERENAS Y ORGÁNICAS */
.card {
    background: rgba(14, 17, 30, 0.7) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 20px !important;
    padding: 24px !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}

.card:hover, .card.pulse-hover:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 25px rgba(124, 58, 237, 0.15) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

/* AJUSTES RESPONSIVOS */
@media (max-width: 900px) {
    .nav-pills-bar {
        display: none;
    }
    .user-stats-pill {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .hero-stage-title {
        font-size: 1.7rem;
    }
    .hero-stage-desc {
        font-size: 0.92rem;
    }
    .lernisy-hero-stage {
        padding: 32px 20px;
    }
}


/* ==========================================================================
   FULL-WIDTH PANORAMIC FIX FOR LERNISY (NO SIDEBAR, CENTRED ECOSYSTEM)
   ========================================================================== */
html, body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 0%, #151428 0%, #090a14 45%, #040509 100%) !important;
    background-attachment: fixed !important;
}

.app, .app-shell, #app {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-height: 100vh !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.lernisy-navbar {
    position: sticky !important;
    top: 14px !important;
    z-index: 1000 !important;
    width: calc(100% - 32px) !important;
    max-width: 1440px !important;
    margin: 14px auto 26px auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.app-main, .app-main.full-width {
    flex: 1 1 auto !important;
    margin: 0 auto !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 1440px !important;
    padding: 0 16px 80px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.screen {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.screen.active {
    display: block !important;
}

.lernisy-hero-stage {
    width: 100% !important;
    box-sizing: border-box !important;
}


/* ==========================================================================
   LERNISY PORTAL SERENO (EMPEZAR CHICO · vB1.01)
   ========================================================================== */
.lernisy-portal-container {
    max-width: 860px;
    margin: 20px auto 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: fadeInPortal 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInPortal {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.portal-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.portal-logo-glow {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, rgba(124, 58, 237, 0.05) 70%, transparent 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 0 35px rgba(124, 58, 237, 0.4);
    animation: gentleFloat 5s ease-in-out infinite;
}

.portal-logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
}

.portal-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.portal-subtitle {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #a78bfa;
    margin-top: 6px;
    opacity: 0.9;
}

/* 4 BOTONES PRINCIPALES */
.portal-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 32px;
}

.portal-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 20px;
    background: rgba(14, 17, 30, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    user-select: none;
}

.portal-btn i {
    font-size: 1.8rem;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-btn.primary i {
    background: rgba(124, 58, 237, 0.18);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.portal-btn.accent-cyan i {
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.portal-btn.accent-code i {
    background: rgba(6, 182, 212, 0.18);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.portal-btn.secondary i {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.portal-btn .btn-text {
    display: flex;
    flex-direction: column;
}

.portal-btn .btn-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.portal-btn .btn-sub {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.3;
}

.portal-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 25px rgba(124, 58, 237, 0.2);
}

/* SECCIÓN INSPIRACIÓN */
.portal-inspo-section {
    width: 100%;
    margin-bottom: 34px;
}

.portal-inspo-header {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 14px;
    opacity: 0.8;
}

.portal-inspo-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.portal-inspo-card {
    background: rgba(14, 17, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.portal-inspo-card:hover {
    transform: translateY(-3px);
    background: rgba(20, 24, 42, 0.85);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.inspo-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 8px;
}
.inspo-badge.math { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.inspo-badge.code { background: rgba(124, 58, 237, 0.15); color: #c4b5fd; }
.inspo-badge.phys { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.inspo-badge.lang { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.portal-inspo-card h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0 0 4px 0;
}

.portal-inspo-card p {
    font-size: 0.76rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.3;
}

/* FOOTER */
.portal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 10px;
}

.portal-version {
    font-weight: 800;
    letter-spacing: 1px;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.portal-brand-footer {
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .portal-actions-grid {
        grid-template-columns: 1fr;
    }
    .portal-inspo-scroll {
        grid-template-columns: repeat(2, 1fr);
    }
    .portal-title {
        font-size: 2.2rem;
    }
}
