/* ============================================
   HistoryAI Gamification — CSS
   Add to style.css or load as separate file
   ============================================ */

/* --- Arena Immersive Mode --- */
body.arena-mode {
    background: linear-gradient(160deg, #120E29 0%, #1E1745 50%, #15112E 100%);
    padding: 0;
}
body.arena-mode .container {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    min-height: 100vh;
}
body.arena-mode .header {
    display: none;
}
body.arena-mode .content {
    padding: 0;
}
body.arena-mode .main-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: none;
}
body.arena-mode .step-indicator,
body.arena-mode .mobile-progress,
body.arena-mode #site-footer,
body.arena-mode #btn-start,
body.arena-mode #mode-selector-container {
    display: none !important;
}
body.arena-mode #btn-next {
    display: none !important;
}

/* Arena Layout — sidebar + main */
.arena-layout {
    display: flex;
    min-height: calc(100vh - 54px);
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,0.06);
    border-right: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.015);
}
.arena-sidebar {
    width: 180px;
    flex-shrink: 0;
    padding: 16px 10px;
    background: rgba(255,255,255,0.03);
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.arena-main {
    flex: 1;
    padding: 8px 16px 16px;
    min-height: 100%;
}
.arena-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.arena-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
}
.arena-nav-item.active {
    background: rgba(91,82,196,0.25);
    color: #FFF;
}
.arena-nav-item.locked {
    cursor: default;
    opacity: 0.4;
}
.arena-nav-item.locked:hover {
    background: none;
    color: rgba(255,255,255,0.5);
}
.arena-nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.arena-nav-label {
    white-space: nowrap;
}
.arena-nav-soon {
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 6px;
    margin-right: auto;
}
.arena-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 8px 6px;
}

/* Arena Help Cards */
.arena-help-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
}
.arena-help-step {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91,82,196,0.3);
    border-radius: 10px;
    color: #FFF;
    font-size: 16px;
    font-weight: 800;
}

.arena-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-left: 1px solid rgba(255,255,255,0.06);
    border-right: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
}
.arena-menu-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    cursor: pointer;
    color: #FFF;
    transition: background 0.2s, transform 0.15s;
}
.arena-menu-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}
.arena-menu-card:active {
    transform: scale(0.98);
}
.arena-join-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    transition: background 0.2s;
}
.arena-join-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Arena Hero Cards */
/* Arena Hero Cards */
.arena-subject-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.arena-subject-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 10px 16px;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.2s;
}
.arena-subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.arena-subject-card:active {
    transform: scale(0.97);
}
.arena-random-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(127,119,221,0.12);
    border: 1.5px solid rgba(127,119,221,0.35);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
}
.arena-random-btn:hover {
    background: rgba(127,119,221,0.2);
    transform: translateY(-1px);
}
.arena-random-btn:active {
    transform: scale(0.98);
}

.arena-hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.arena-hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 14px 22px;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.arena-hero-card:hover {
    transform: translateY(-3px);
}
.arena-hero-card:active {
    transform: scale(0.97);
}
.arena-hero-1v1 {
    background: linear-gradient(135deg, rgba(93,202,165,0.15), rgba(93,202,165,0.05));
    border: 1.5px solid rgba(93,202,165,0.3);
}
.arena-hero-1v1:hover {
    box-shadow: 0 6px 24px rgba(93,202,165,0.15);
}
.arena-hero-class {
    background: linear-gradient(135deg, rgba(127,119,221,0.2), rgba(127,119,221,0.08));
    border: 1.5px solid rgba(127,119,221,0.35);
}
.arena-hero-class:hover {
    box-shadow: 0 6px 24px rgba(127,119,221,0.15);
}
.arena-hero-title {
    font-size: 18px;
    font-weight: 800;
    color: #FFF;
}
.arena-hero-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
}

/* Arena Demo Animation */
.arena-demo {
    margin-bottom: 24px;
}
.arena-demo-screen {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 14px 18px;
    position: relative;
    overflow: hidden;
}
.arena-demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.arena-demo-progress {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
}
.arena-demo-score {
    font-size: 13px;
    font-weight: 700;
    color: #5DCAA5;
    transition: color 0.3s;
}
.arena-demo-timer {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-bottom: 12px;
    overflow: hidden;
}
.arena-demo-timer-fill {
    height: 100%;
    background: #7F77DD;
    border-radius: 2px;
}
.arena-demo-content {
    transition: opacity 0.3s ease;
    opacity: 1;
}
.arena-demo-card {
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
}
.arena-demo-q {
    font-size: 15px;
    font-weight: 600;
    color: #FFF;
    text-align: center;
    line-height: 1.6;
}
.arena-demo-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.arena-demo-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    transition: background 0.3s, border-color 0.3s;
}
.arena-demo-opt {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-align: right;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.arena-demo-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 42px;
    opacity: 0;
    pointer-events: none;
}
.arena-demo-label {
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-top: 10px;
    font-weight: 600;
}

@keyframes arenaFlashPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    25% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}
@keyframes arenaCountPop {
    0% { transform: scale(1.5); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.9; }
}
@keyframes arenaResultSlide {
    0% { transform: translateX(30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes arenaTrophyBounce {
    0% { transform: scale(0) rotate(-20deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes arenaConfettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@media (max-width: 480px) {
    body.arena-mode {
        padding: 0;
    }
    .arena-top-bar {
        padding: 12px 14px;
        border-left: none;
        border-right: none;
    }
    /* Sidebar → horizontal strip */
    .arena-layout {
        flex-direction: column;
        min-height: auto;
        border: none;
        background: none;
    }
    .arena-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px 10px;
        gap: 2px;
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .arena-sidebar::-webkit-scrollbar {
        display: none;
    }
    .arena-nav-item {
        padding: 8px 12px;
        flex-shrink: 0;
        font-size: 12px;
        gap: 6px;
    }
    .arena-nav-icon {
        font-size: 14px;
        width: auto;
    }
    .arena-nav-soon {
        display: none;
    }
    .arena-nav-divider {
        width: 1px;
        height: 24px;
        margin: 0 4px;
    }
    .arena-main {
        padding: 4px 10px 10px;
    }
    .arena-hero-card {
        padding: 20px 10px 16px;
    }
    .arena-hero-title {
        font-size: 16px;
    }
    .arena-demo-q {
        font-size: 14px;
    }
    .arena-demo-screen {
        padding: 12px 14px;
    }
    .arena-subject-card {
        padding: 14px 8px 12px;
    }
    .arena-subject-card div[style*="font-size:28px"] {
        font-size: 24px !important;
    }
}

/* --- Home Action Cards (Homepage) --- */
.home-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 500px;
    margin: 0 auto;
}
.home-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px 22px;
    border-radius: 18px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.home-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.home-action-card:active {
    transform: scale(0.98);
}
.home-card-practice {
    background: #FFF;
    border: 1.5px solid #D5D0F5;
}
.home-card-arena {
    background: linear-gradient(135deg, #5B52C4, #7F77DD);
    border: 1.5px solid transparent;
}
.home-card-icon-wrap {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}
.home-icon-practice {
    background: #EEEDFE;
}
.home-icon-arena {
    background: rgba(255,255,255,0.15);
}
.home-card-practice .home-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #1A1A1A;
    line-height: 1.3;
}
.home-card-arena .home-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #FFF;
    line-height: 1.3;
}
.home-card-practice .home-card-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.5;
    flex: 1;
}
.home-card-arena .home-card-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
    flex: 1;
}
.home-card-cta {
    margin-top: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    width: 100%;
    text-align: center;
    transition: opacity 0.15s;
}
.home-cta-practice {
    background: #1D9E75;
    color: #FFF;
}
.home-cta-arena {
    background: rgba(255,255,255,0.18);
    color: #FFF;
    border: 1.5px solid rgba(255,255,255,0.35);
}

/* --- Mode Selector (Step 0) --- */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 460px;
    margin: 20px auto;
}
.mode-cards-row {
    display: flex;
    gap: 10px;
}
.mode-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: #fff;
    border: 0.5px solid #E0E0E0;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    text-align: center;
}
.mode-card:hover {
    border-color: #7F77DD;
    transform: translateY(-1px);
}
.mode-card.selected {
    border-color: #7F77DD;
    border-width: 2px;
    background: #FAFAFF;
}
.mode-card-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.mode-card-icon.game { background: #E1F5EE; }
.mode-card-icon.mixed { background: #EEEDFE; }
.mode-card-icon.focus { background: #E6F1FB; }
.mode-card-text h3 {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
}
.mode-card-text p {
    margin: 0;
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    font-weight: 500;
}

/* --- Subject Selector --- */
.subject-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 420px;
    margin: 16px auto;
}
.subject-card {
    padding: 14px 12px;
    background: #fff;
    border: 0.5px solid #E0E0E0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: border-color 0.2s, background 0.2s;
}
.subject-card:hover {
    border-color: #7F77DD;
    background: #FAFAFF;
}
.subject-card.selected {
    border-color: #7F77DD;
    border-width: 2px;
    background: #EEEDFE;
    color: #5B52C4;
}

/* --- Game Container --- */
.game-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 4px;
    direction: rtl;
}
.game-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    margin-bottom: 8px;
}
.game-progress {
    font-size: 14px;
    font-weight: 600;
    color: #888;
}
.game-xp-live {
    font-size: 14px;
    font-weight: 700;
    color: #7F77DD;
}

/* --- Timer --- */
.game-timer-track {
    height: 6px;
    border-radius: 3px;
    background: #EEEDFE;
    margin-bottom: 20px;
    position: relative;
    overflow: visible;
}
.game-timer-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.1s linear, background-color 0.3s;
}
.game-timer-text {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 700;
}

/* --- Card --- */
.game-card {
    background: #FFF;
    border: 0.5px solid #E0E0E0;
    border-radius: 16px;
    padding: 32px 20px 20px;
    text-align: center;
    margin-top: 16px;
    animation: gamePopIn 0.3s ease-out;
}
.game-claim-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    color: #1A1A1A;
    margin: 0 0 20px;
}
.game-hints {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #BBB;
    padding: 0 8px;
}

/* --- Swipe Buttons --- */
.game-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.game-btn-false, .game-btn-true {
    flex: 1;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    background: #FFF;
    cursor: pointer;
    transition: transform 0.1s;
}
.game-btn-false:active, .game-btn-true:active {
    transform: scale(0.96);
}
.game-btn-false {
    border: 2px solid #F09595;
    color: #D64545;
}
.game-btn-true {
    border: 2px solid #5DCAA5;
    color: #1D9E75;
}

/* --- Multiple Choice (Blitz) --- */
.game-question-text {
    font-size: 17px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 18px;
    line-height: 1.5;
}
.game-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.game-option {
    padding: 14px 16px;
    background: #FFF;
    border: 1.5px solid #E0E0E0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    text-align: right;
    transition: border-color 0.15s, background 0.15s;
}
.game-option:hover {
    border-color: #7F77DD;
    background: #FAFAFF;
}
.game-option.correct {
    border-color: #5DCAA5;
    background: #E1F5EE;
    color: #1D9E75;
}
.game-option.wrong {
    border-color: #F09595;
    background: #FCEBEB;
    color: #D64545;
}
.game-option.disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* --- Concept Match --- */
.match-pairs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.match-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.match-concept {
    flex: 1;
    padding: 10px 12px;
    background: #EEEDFE;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #5B52C4;
    text-align: center;
}
.match-definition {
    flex: 2;
    padding: 10px 12px;
    background: #FFF;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    text-align: right;
    transition: border-color 0.15s;
}
.match-definition.selected {
    border-color: #7F77DD;
    background: #FAFAFF;
}
.match-definition.correct {
    border-color: #5DCAA5;
    background: #E1F5EE;
}
.match-definition.wrong {
    border-color: #F09595;
    background: #FCEBEB;
}

/* --- Feedback Card --- */
.game-feedback {
    border: 2px solid;
    border-radius: 16px;
    padding: 22px 18px;
    margin-top: 16px;
    text-align: center;
    animation: gamePopIn 0.25s ease-out;
}
.game-feedback.correct {
    border-color: #5DCAA5;
    background: #E1F5EE;
}
.game-feedback.wrong {
    border-color: #F09595;
    background: #FCEBEB;
}
.game-feedback.timeout {
    border-color: #EF9F27;
    background: #FFF8E8;
}
.game-feedback-icon {
    font-size: 32px;
}
.game-feedback-label {
    font-size: 20px;
    font-weight: 700;
    margin-right: 8px;
}
.game-feedback-explain {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.6;
    margin: 10px 0 16px;
}
.game-next-btn {
    padding: 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: #FFF;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
}

/* --- End Screen --- */
.game-end {
    background: #FFF;
    border: 0.5px solid #E0E0E0;
    border-radius: 20px;
    padding: 24px 18px;
    text-align: center;
    margin-top: 16px;
    animation: gamePopIn 0.4s ease-out;
}
.game-end-emoji {
    font-size: 52px;
    margin-bottom: 4px;
}
.game-end-title {
    font-size: 24px;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 4px;
}
.game-end-score {
    font-size: 38px;
    font-weight: 800;
    color: #1D9E75;
    margin: 0 0 10px;
}
.game-end-icons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 22px;
}
.game-end-xp {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.xp-badge {
    background: #EEEDFE;
    color: #7F77DD;
    font-weight: 700;
    font-size: 15px;
    padding: 5px 14px;
    border-radius: 20px;
}
.fire-badge {
    background: #FFF3E0;
    color: #E67E22;
    font-weight: 700;
    font-size: 15px;
    padding: 5px 14px;
    border-radius: 20px;
}
.game-end-stats {
    border-top: 0.5px solid #EEE;
    padding-top: 12px;
    margin-bottom: 14px;
}
.game-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 12px;
    font-size: 14px;
}
.game-stat-label { color: #888; }
.game-stat-value { font-weight: 700; color: #333; }
.game-share-msg {
    font-size: 13px;
    color: #AAA;
    background: #F8F8F8;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
    line-height: 1.5;
    direction: ltr;
    text-align: center;
}
.game-end-buttons {
    display: flex;
    gap: 10px;
}
.game-share-btn {
    flex: 1;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid #1D9E75;
    border-radius: 10px;
    background: #FFF;
    color: #1D9E75;
    cursor: pointer;
}
.game-retry-btn {
    flex: 1;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: #1D9E75;
    color: #FFF;
    cursor: pointer;
}

/* --- XP Popup --- */
.xp-popup {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    font-weight: 800;
    color: #7F77DD;
    animation: gameFloatUp 1.2s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

/* --- Profile Panel --- */
.profile-panel {
    max-width: 420px;
    margin: 0 auto;
    direction: rtl;
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #FFF;
    border: 0.5px solid #E0E0E0;
    border-radius: 16px;
    margin-bottom: 12px;
}
.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #EEEDFE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.profile-info h2 {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 700;
}
.profile-info p {
    margin: 0;
    font-size: 13px;
    color: #888;
}
.profile-xp-bar {
    height: 8px;
    background: #EEEDFE;
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}
.profile-xp-fill {
    height: 100%;
    background: #7F77DD;
    border-radius: 4px;
    transition: width 0.5s;
}

/* Skills radar / bars */
.profile-section {
    background: #FFF;
    border: 0.5px solid #E0E0E0;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.profile-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
}
.skill-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.skill-name {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    width: 100px;
    flex-shrink: 0;
}
.skill-bar {
    flex: 1;
    height: 8px;
    background: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
}
.skill-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s;
}
.skill-score {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    width: 30px;
    text-align: left;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.achievement-badge {
    text-align: center;
    padding: 10px 4px;
    background: #FAFAFA;
    border-radius: 10px;
}
.achievement-badge.earned {
    background: #FFF8E8;
    border: 1px solid #EFD68D;
}
.achievement-badge.locked {
    opacity: 0.35;
}
.achievement-icon {
    font-size: 24px;
    margin-bottom: 2px;
}
.achievement-name {
    font-size: 10px;
    color: #666;
    line-height: 1.2;
}

/* World map */
.world-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #FAFAFA;
    border-radius: 10px;
    margin-bottom: 8px;
}
.world-progress {
    flex: 1;
}
.world-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.world-bar {
    height: 6px;
    background: #E8E8E8;
    border-radius: 3px;
    overflow: hidden;
}
.world-bar-fill {
    height: 100%;
    background: #7F77DD;
    border-radius: 3px;
}
.world-stats {
    font-size: 12px;
    color: #888;
    text-align: left;
    white-space: nowrap;
}

/* --- Animations --- */
@keyframes gamePopIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes gameSlideRight {
    to { transform: translateX(120%) rotate(15deg); opacity: 0; }
}
@keyframes gameSlideLeft {
    to { transform: translateX(-120%) rotate(-15deg); opacity: 0; }
}
@keyframes gameFadeOut {
    to { opacity: 0; transform: scale(0.9); }
}
@keyframes gameFloatUp {
    0% { transform: translateX(-50%) translateY(0) scale(0.7); opacity: 0; }
    30% { transform: translateX(-50%) translateY(-10px) scale(1.1); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-50px); opacity: 0; }
}
@keyframes gameShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* --- RTL fix for timer text --- */
.game-timer-text {
    direction: ltr;
    unicode-bidi: isolate;
}

/* --- Mobile Optimization --- */
@media (max-width: 480px) {
    /* Home action cards — stack vertically */
    .home-actions {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 100%;
    }
    .home-action-card {
        padding: 20px 14px 16px;
        border-radius: 14px;
    }
    .home-card-icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 26px;
        border-radius: 12px;
    }
    .home-card-practice .home-card-title,
    .home-card-arena .home-card-title {
        font-size: 15px;
    }
    .home-card-cta {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Mode cards — slightly smaller */
    .mode-card {
        padding: 10px 6px;
    }
    .mode-card-icon {
        font-size: 24px;
        width: 38px;
        height: 38px;
    }
    .mode-card-text h3 {
        font-size: 13px;
    }
    .mode-card-text p {
        font-size: 10px;
    }

    /* Subject grid */
    .subject-card {
        padding: 12px 8px;
        font-size: 13px;
    }

    /* Game container */
    .game-container {
        padding: 0 2px;
    }
    .game-card {
        padding: 20px 14px 16px;
        border-radius: 14px;
    }
    .game-claim-text {
        font-size: 16px;
    }
    .game-question-text {
        font-size: 15px;
    }

    /* Options — bigger touch targets */
    .game-option {
        padding: 14px 14px;
        font-size: 14px;
        min-height: 44px;
    }

    /* Swipe buttons */
    .game-btn-false, .game-btn-true {
        padding: 12px 0;
        font-size: 15px;
    }

    /* Feedback */
    .game-feedback {
        padding: 18px 14px;
    }
    .game-feedback-icon {
        font-size: 28px;
    }
    .game-feedback-label {
        font-size: 18px;
    }
    .game-feedback-explain {
        font-size: 14px;
    }

    /* End screen */
    .game-end {
        padding: 20px 14px;
    }
    .game-end-emoji {
        font-size: 44px;
    }
    .game-end-title {
        font-size: 20px;
    }
    .game-end-score {
        font-size: 32px;
    }
    .game-end-buttons {
        flex-direction: column;
        gap: 8px;
    }

    /* Achievements grid — 4 columns still ok but smaller */
    .achievements-grid {
        gap: 6px;
    }
    .achievement-icon {
        font-size: 20px;
    }
    .achievement-name {
        font-size: 9px;
    }

    /* Profile */
    .profile-panel {
        padding: 0 4px;
    }

    /* XP popup */
    .xp-popup {
        font-size: 24px;
    }
}
/* ============================================
   Catalog Wizard Redesign (#7) — 01.04.26
   Add this to the END of games-style.css
   ============================================ */

.catalog-wrap {
    max-width: 460px;
    margin: 12px auto;
    direction: rtl;
    padding: 0 4px;
}
.catalog-header {
    text-align: center;
    margin-bottom: 20px;
}
.catalog-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 4px;
}
.catalog-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* Wizard steps */
.wiz-step {
    margin-bottom: 16px;
    animation: wizFade 0.25s ease-out;
}
@keyframes wizFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wiz-step-label {
    font-size: 13px;
    font-weight: 700;
    color: #5B52C4;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wiz-step-num {
    width: 22px;
    height: 22px;
    background: #EEEDFE;
    color: #5B52C4;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}
.wiz-done { color: #1D9E75; }
.wiz-done .wiz-step-num {
    background: #1D9E75;
    color: #FFF;
}

/* Summary row (completed step) */
.wiz-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #E8F8F0;
    border: 1px solid #C5EDDA;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1D9E75;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.wiz-summary:hover {
    background: #D4F3E5;
}
.wiz-edit {
    margin-right: auto;
    font-size: 12px;
    opacity: 0.6;
}

/* Subject cards */
.cat-subjects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.cat-subjects .cat-subj-card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
}
.cat-subj-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    border: 1.5px solid;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.cat-subj-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.cat-subj-card:active {
    transform: scale(0.97);
}
.cat-subj-icon {
    font-size: 26px;
    flex-shrink: 0;
}
.cat-subj-name {
    font-size: 15px;
    font-weight: 700;
}

/* Random subject button */
.cat-random-subj {
    margin-top: 10px;
    width: 100%;
    padding: 14px;
    background: #FFF;
    border: 1.5px dashed #B0AAE8;
    border-radius: 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #7F77DD;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}
.cat-random-subj:hover {
    background: #EEEDFE;
    border-color: #7F77DD;
}

/* Challenge types container */
.cat-types-wrap {
    background: #FFF;
    border: 0.5px solid #E0E0E0;
    border-radius: 14px;
    padding: 14px;
}

/* Skill group */
.cat-skill-group {
    margin-bottom: 12px;
}
.cat-skill-group:last-child {
    margin-bottom: 0;
}
.cat-skill-label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Challenge chips */
.cat-skill-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 11px;
    background: #F8F8FF;
    border: 1px solid #ECECF5;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.cat-chip:hover {
    border-color: var(--chip-color, #7F77DD);
    background: #F0EEFF;
    color: #333;
}
.cat-chip:active {
    transform: scale(0.95);
}
.cat-chip-icon {
    font-size: 14px;
}

/* Random type button */
.cat-random-type {
    margin-top: 8px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed #C8C4E8;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #7F77DD;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}
.cat-random-type:hover {
    background: #F8F7FF;
}

/* Difficulty row */
.diff-row {
    display: flex;
    gap: 8px;
}
.diff-btn {
    flex: 1;
    text-align: center;
    padding: 12px 6px;
    background: #FFF;
    border: 1.5px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.diff-btn:hover {
    border-color: #B0AAE8;
}
.diff-sel {
    background: #5B52C4;
    border-color: #5B52C4;
}
.diff-stars {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}
.diff-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}
.diff-sub {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 1px;
}
.diff-sel .diff-label { color: #FFF; }
.diff-sel .diff-sub { color: rgba(255,255,255,0.7); }

/* Start button */
.cat-start-btn {
    width: 100%;
    padding: 16px;
    background: #1D9E75;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    color: #FFF;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.cat-start-btn:hover {
    background: #178C66;
    transform: translateY(-1px);
}
.cat-start-btn:active {
    transform: scale(0.98);
}

/* Bottom row */
.cat-bottom-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 16px;
}
.cat-btn-profile {
    flex: 1;
    padding: 12px;
    background: #FFF;
    border: 1.5px solid #7F77DD;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #7F77DD;
    cursor: pointer;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.cat-btn-back {
    flex: 1;
    padding: 12px;
    background: #FFF;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .cat-subj-card {
        padding: 14px 12px;
    }
    .cat-subj-name {
        font-size: 14px;
    }
    .cat-subj-icon {
        font-size: 22px;
    }
    .cat-subjects .cat-subj-card:nth-child(5) {
        max-width: 60%;
    }
    .cat-chip {
        padding: 6px 9px;
        font-size: 11px;
    }
    .cat-chip-icon {
        font-size: 13px;
    }
    .cat-random-subj {
        padding: 12px;
        font-size: 13px;
    }
    .diff-btn {
        padding: 10px 4px;
    }
    .diff-label {
        font-size: 13px;
    }
    .diff-sub {
        font-size: 10px;
    }
    .wiz-summary {
        padding: 10px 12px;
        font-size: 13px;
    }
    .cat-start-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* ============================================
   Arena Help Redesign (#6) — 01.04.26
   ============================================ */
.arena-help-col {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px 14px;
    transition: border-color 0.25s, transform 0.2s, background 0.25s;
}
.arena-help-col:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    transform: translateY(-3px);
}
.arena-help-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}
.arena-help-item:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .arena-help-col {
        padding: 14px 12px;
    }
    .arena-help-grid {
        grid-template-columns: 1fr;
    }
}

/* Arena help grid */
.arena-help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

/* Arena webkit fixes for inline buttons */
body.arena-mode button {
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}
body.arena-mode input {
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}

/* ── Catalog Stepper (04.04.26) ── */
.cat-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 20px;
    padding: 16px 12px;
    max-width: 500px;
    direction: rtl;
}
.cat-st {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.cat-st-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid #E5E7EB;
    background: #F9FAFB;
    color: #9CA3AF;
    transition: all 0.3s;
}
.cat-st-label {
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
}
.cat-st-line {
    flex: 1;
    height: 2px;
    background: #E5E7EB;
    min-width: 24px;
    margin: 0 4px;
    margin-bottom: 20px;
    transition: background 0.3s;
}
.cat-st-active .cat-st-circle {
    border-color: #667eea;
    background: #EEF2FF;
    color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.cat-st-active .cat-st-label {
    color: #667eea;
    font-weight: 700;
}
.cat-st-done .cat-st-circle {
    border-color: #10B981;
    background: #ECFDF5;
    color: #10B981;
    font-size: 14px;
    font-weight: 700;
}
.cat-st-done .cat-st-label {
    color: #10B981;
    font-weight: 600;
}
.cat-st-line-done {
    background: #10B981;
}

@media (max-width: 480px) {
    .cat-stepper { padding: 12px 8px; }
    .cat-st-circle { width: 32px; height: 32px; font-size: 13px; }
    .cat-st-label { font-size: 10px; }
    .cat-st-line { min-width: 16px; }
}

/* ═══ NAV BAR ═══ */
.hai-nav { background: #1a1a2e; direction: rtl; font-family: 'Heebo', sans-serif; }
.hai-nav-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; }
.hai-nav-logo { color: white; font-weight: 700; font-size: 18px; cursor: pointer; letter-spacing: 0.5px; }
.hai-nav-logo span { color: rgba(255,255,255,0.7); }
.hai-nav-teacher { color: rgba(255,255,255,0.6); font-size: 13px; cursor: pointer; background: rgba(255,255,255,0.08); padding: 5px 14px; border-radius: 8px; text-decoration: none; user-select: none; }
.hai-nav-teacher:hover { background: rgba(255,255,255,0.14); color: white; }
.hai-teacher-wrap { position: relative; }
.hai-teacher-dropdown { display: none; position: absolute; left: 0; top: 34px; background: white; border-radius: 10px; padding: 6px 0; min-width: 180px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); z-index: 100; }
.hai-teacher-wrap.open .hai-teacher-dropdown { display: block; }
.hai-teacher-dropdown a { display: block; padding: 9px 16px; font-size: 13px; color: #333; cursor: pointer; text-decoration: none; text-align: right; direction: rtl; }
.hai-teacher-dropdown a:hover { background: #f5f3ff; color: #7c5cbf; }
.hai-nav-tabs { display: flex; gap: 0; padding: 0 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hai-nav-tabs::-webkit-scrollbar { display: none; }
.hai-tab { font-size: 14px; padding: 8px 12px; color: rgba(255,255,255,0.5); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: color 0.15s; user-select: none; }
.hai-tab:hover { color: rgba(255,255,255,0.8); }
.hai-tab.active { color: white; border-bottom-color: #7c5cbf; }

/* ═══ HOME PAGE CARDS ═══ */
.hai-home { direction: rtl; padding: 20px 16px; max-width: 600px; margin: 0 auto; }
.hai-home-title { text-align: center; margin-bottom: 16px; }
.hai-home-title h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.hai-home-title p { font-size: 14px; color: #666; margin: 0; }

.hai-hero-card { background: white; border: 2px solid #7c5cbf; border-radius: 14px; padding: 16px; cursor: pointer; display: flex; gap: 14px; align-items: center; margin-bottom: 10px; position: relative; transition: border-color 0.15s; }
.hai-hero-card:hover { border-color: #6a4dab; }
.hai-hero-badge { position: absolute; top: -8px; right: 14px; background: #7c5cbf; color: white; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.hai-hero-card .hai-card-icon { font-size: 32px; flex-shrink: 0; }
.hai-hero-card .hai-card-title { font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.hai-hero-card .hai-card-desc { font-size: 13px; color: #555; line-height: 1.5; }

.hai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hai-card { background: white; border: 0.5px solid #e4e6ec; border-radius: 14px; padding: 14px; cursor: pointer; text-align: center; transition: border-color 0.15s; display: flex; flex-direction: column; }
.hai-card:hover { border-color: #7c5cbf; }
.hai-card.hai-card-gold { border: 2px solid #e8b931; position: relative; }
.hai-card-new { position: absolute; top: -7px; left: 10px; background: #e8b931; color: #412402; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.hai-card-head { display: flex; flex-direction: column; align-items: center; }
.hai-card .hai-card-icon { font-size: 28px; margin-bottom: 6px; }
.hai-card .hai-card-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.hai-card .hai-card-desc { font-size: 13px; color: #555; line-height: 1.5; margin-top: 6px; }
.hai-card-sub { font-size: 11px; color: #999; margin-top: auto; padding-top: 8px; text-align: right; }
.hai-tag { font-size: 11px; padding: 2px 7px; border-radius: 10px; display: inline-block; margin-top: 8px; }
.hai-tag-student { background: #f3eeff; color: #534AB7; }
.hai-tag-teacher { background: #e8f5e9; color: #2e7d32; }

.hai-home-footer { text-align: center; margin-top: 24px; font-size: 12px; color: #bbb; line-height: 1.6; }
.hai-home-footer a { color: #888; text-decoration: none; }

/* ═══ MODE INTRO ═══ */
.hai-mode-intro { text-align: center; padding: 16px 20px 20px; max-width: 480px; margin: 0 auto; }
.hai-mode-intro .hai-card-icon { font-size: 32px; margin-bottom: 8px; }
.hai-mode-intro h2 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.hai-mode-intro p { font-size: 12px; color: #888; line-height: 1.7; margin: 0; }

/* ═══ HAMBURGER MENU ═══ */
.hai-hamburger { display: none; background: none; border: none; color: rgba(255,255,255,0.7); font-size: 24px; cursor: pointer; padding: 4px 8px; line-height: 1; }
.hai-hamburger:hover { color: white; }
.hai-tab-teacher { display: none; text-decoration: none; }

@media (max-width: 600px) {
  .hai-hamburger { display: block; }
  .hai-teacher-wrap { display: none; }
  .hai-tab-teacher { display: block; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 4px; padding-top: 10px; color: rgba(255,255,255,0.6); }
  .hai-nav-tabs { display: none; flex-direction: column; padding: 0; border-top: 1px solid rgba(255,255,255,0.08); }
  .hai-nav-tabs.open { display: flex; }
  .hai-tab { padding: 13px 18px; border-bottom: none; border-right: 3px solid transparent; text-align: right; font-size: 14px; }
  .hai-tab.active { border-bottom: none; border-right-color: #7c5cbf; background: rgba(255,255,255,0.05); }
  .hai-nav-top { padding: 10px 14px; }
  .hai-home { padding: 16px 12px; }
  .hai-grid { grid-template-columns: 1fr; gap: 10px; }
  .hai-card { padding: 16px; text-align: right; display: flex; gap: 16px; align-items: center; }
  .hai-card-head { flex-shrink: 0; align-items: center; min-width: 90px; }
  .hai-card .hai-card-icon { font-size: 32px; margin-bottom: 4px; }
  .hai-card .hai-card-title { font-size: 14px; text-align: center; }
  .hai-card .hai-card-desc { font-size: 13px; text-align: center; margin-top: 0; flex: 1; }
  .hai-hero-card { padding: 18px 14px; }
  .hai-hero-card .hai-card-icon { font-size: 40px; }
  .hai-hero-badge { font-size: 11px; }
  .hai-card-new { font-size: 10px; }
  .hai-tag { font-size: 10px; }
}
