 /* ==========================================================================
       1. CORE LAYOUT & SWITCHING MECHANISM
       ========================================================================== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html.lenis, html.lenis body {
      height: auto;
    }
    
    .lenis.lenis-smooth {
      scroll-behavior: auto !important; /* Tắt scroll native */
    }
    
    .lenis.lenis-smooth [data-lenis-prevent] {
      overscroll-behavior: contain;
    }
    
    .lenis.lenis-stopped {
      overflow: hidden;
    }
    
    .lenis.lenis-scrolling iframe {
      pointer-events: none;
    }
    body { background-color: #050505; }
    
    /* Canvas chung cho cả 3 chế độ, nằm dưới cùng */
    #canvas1 {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        z-index: -1; pointer-events: none;
    }

    /* Quản lý hiển thị các màn hình */
    #landing-wrapper {
        display: block; width: 100%; height: 100vh; position: absolute; top: 0; left: 0; z-index: 9999;
        background-color: transparent; 
        transition: opacity 0.5s ease;
    }
    #main-app-wrapper {
        display: none; opacity: 0; transition: opacity 0.5s ease;
    }

    /* Class hỗ trợ ẩn hiện */
    body.mode-active #landing-wrapper { display: none; }
    body.mode-active #main-app-wrapper { display: block; opacity: 1; }

    /* ==========================================================================
       2. STYLE TỪ INDEX.HTML (LANDING PAGE)
       ========================================================================== */
    #landing-wrapper {
        font-family: 'Inter', sans-serif;
        color: #ffffff;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        --light-color: #a9051f; 
        --light-glow: rgba(169, 5, 31, 0.6);
        --dark-color: #00f2ff;
        --dark-glow: rgba(0, 242, 255, 0.6);
        --bg-deep: #050505;
        --text-main: #ffffff;
        --card-glass: rgba(255, 255, 255, 0.05);
        --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    #landing-wrapper .container { text-align: center; z-index: 10; width: 100%; max-width: 1200px; padding: 20px; }

    #landing-wrapper .main-title {
        font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(3rem, 8vw, 6rem);
        line-height: 1.1; margin-bottom: 10px; letter-spacing: -2px;
        background: linear-gradient(90deg, #ff2a2a 0%, #ff2a2a 40%, #013ff6 50%, #ff2a2a 60%, #ff2a2a 100%);
        background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent; color: transparent;
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
        animation: spotlight 6s ease-in-out infinite alternate;
    }
    @keyframes spotlight { 0% { background-position: 0% center; } 100% { background-position: 100% center; } }

    #landing-wrapper .subtitle { font-size: 1.2rem; color: #888; margin-bottom: 60px; font-weight: 300; letter-spacing: 2px; text-transform: uppercase; }
    #landing-wrapper .mode-selector { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }

    #landing-wrapper .mode-card {
        position: relative; width: 300px; height: 380px; background: rgba(10, 10, 10, 0.7);
        border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(5px); border-radius: 24px;
        text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
        transition: var(--transition); overflow: hidden; cursor: pointer;
    }
    #landing-wrapper .mode-card h2 { font-family: 'Poppins', sans-serif; font-size: 2rem; margin-bottom: 10px; z-index: 2; transition: var(--transition); color: #fff; }
    #landing-wrapper .mode-card p { color: #aaa; font-size: 0.9rem; z-index: 2; padding: 0 20px; }
    #landing-wrapper .icon-wrapper { font-size: 3rem; margin-bottom: 20px; z-index: 2; transition: var(--transition); }

    #landing-wrapper .mode-card.light-mode { border-color: rgba(255, 255, 255, 0.1); }
    #landing-wrapper .mode-card.light-mode:hover { transform: translateY(-10px) scale(1.02); background: rgba(255, 255, 255, 0.9); box-shadow: 0 0 30px var(--light-glow); border-color: var(--light-color); }
    #landing-wrapper .mode-card.light-mode:hover h2 { color: #000; }
    #landing-wrapper .mode-card.light-mode:hover p { color: #444; }
    #landing-wrapper .mode-card.light-mode:hover .icon-wrapper { transform: scale(1.2); color: var(--light-color); }

    #landing-wrapper .mode-card.dark-mode { border-color: rgba(0, 242, 255, 0.1); }
    #landing-wrapper .mode-card.dark-mode:hover { transform: translateY(-10px) scale(1.02); background: rgba(0, 0, 0, 0.8); box-shadow: 0 0 30px var(--dark-glow); border-color: var(--dark-color); }
    #landing-wrapper .mode-card.dark-mode:hover h2 { color: var(--dark-color); text-shadow: 0 0 10px var(--dark-glow); }
    #landing-wrapper .mode-card.dark-mode:hover .icon-wrapper { transform: scale(1.2) rotate(10deg); color: var(--dark-color); text-shadow: 0 0 15px var(--dark-glow); }

    #landing-wrapper .glow-circle { position: absolute; width: 150px; height: 150px; border-radius: 50%; filter: blur(60px); opacity: 0.4; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: var(--transition); }
    #landing-wrapper .mode-card.light-mode .glow-circle { background: var(--light-color); }
    #landing-wrapper .mode-card.dark-mode .glow-circle { background: var(--dark-color); }
    #landing-wrapper .mode-card:hover .glow-circle { width: 300px; height: 300px; opacity: 0.2; }
    #landing-wrapper .footer-text { margin-top: 50px; font-size: 0.8rem; color: #444; }

    @media (max-width: 768px) {
        #landing-wrapper .mode-selector { flex-direction: column; align-items: center; gap: 20px; }
        #landing-wrapper .mode-card { width: 100%; max-width: 320px; height: 200px; flex-direction: row; padding: 20px; text-align: left; justify-content: flex-start; }
        #landing-wrapper .icon-wrapper { margin-bottom: 0; margin-right: 20px; font-size: 2.5rem; }
        #landing-wrapper .mode-card p { padding: 0; }
        #landing-wrapper .glow-circle { display: none; }
    }

    /* ==========================================================================
       3. STYLE TỪ INDEX-LIGHT.HTML (LIGHT MODE)
       ========================================================================== */
    body.app-light {
        --color-primary: #a9051f;
        --color-primary-light: #fceeb5;
        --color-primary-glow: rgba(169, 5, 31, 0.15);
        --color-primary-gradient-start: #e8273e;
        --color-primary-gradient-end: #a9051f;
        --font-main: 'Inter', sans-serif;
        --text-primary: #111827;
        --text-secondary: #6b7280;
        --text-on-primary: #ffffff;
        --bg-body: #fafafa; 
        --card-bg: #ffffff;
        --card-border: 1px solid rgba(0, 0, 0, 0.04);
        --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
        --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.01);
        --border-radius: 16px;
        --transition-speed: 0.2s;
        
        font-family: var(--font-main); color: var(--text-primary); background-color: var(--bg-body);
        line-height: 1.6; -webkit-font-smoothing: antialiased;
        background-image: radial-gradient(#e5e7eb 1px, transparent 1px); background-size: 24px 24px; 
    }

    body.app-light.listening-active, body.app-light.speaking-active, body.app-light.grammar-active, body.app-light.lessons-active {
        --color-primary: #013ff6; --color-primary-glow: rgba(1, 63, 246, 0.15); --color-primary-gradient-start: #3b82f6; --color-primary-gradient-end: #013ff6;
    }

    body.app-light h1, body.app-light h2, body.app-light h3, body.app-light h4, body.app-light .nav-button { font-family: var(--font-main); font-weight: 700; color: var(--text-primary); letter-spacing: -0.025em; }
    body.app-light .section-subtitle, body.app-light .card-description, body.app-light .skill-description { color: var(--text-secondary); font-weight: 200; }
    
    body.app-light .main-header { padding: 12px 20px; display: flex; justify-content: center; align-items: center; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
    body.app-light .nav-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
    body.app-light .nav-button { background: transparent; border: none; color: var(--text-secondary); padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all var(--transition-speed) ease; }
    body.app-light .nav-button:hover { color: var(--color-primary); background-color: rgba(0,0,0,0.03); }
    body.app-light .nav-button.active { color: var(--color-primary); background-color: rgba(255,255,255,1); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
    
    body.app-light .nav-logo-link { margin: 0 15px; }
    body.app-light .nav-logo-img { height: 65px; width: auto; transition: transform 0.3s ease; }
    body.app-light .nav-logo-img:hover { transform: scale(1.05); }
    body.app-light .nav-button svg { display: block; fill: currentColor; }

    body.app-light main { padding: 40px 0; max-width: 1440px; margin: 0 auto; }
    body.app-light .content-pane { display: none; animation: fadeIn 0.4s ease-out; }
    body.app-light .content-pane.active { display: block; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

    body.app-light .section { padding: 60px 20px; text-align: center; max-width: 1200px; margin: 0 auto; }
    body.app-light .section-title { font-size: 2.25rem; margin-bottom: 16px; }
    body.app-light .section-subtitle { font-size: 1.125rem; max-width: 500px; margin: 0 auto 40px auto; line-height: 1.6; }
    body.app-light .hero-section { padding-top: 80px; padding-bottom: 80px; }
    body.app-light .hero-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: clamp(3rem, 7vw, 4.5rem); line-height: 1.2; margin-bottom: 20px; background: linear-gradient(135deg, var(--color-primary-gradient-start), var(--color-primary-gradient-end)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.04em; }
    body.app-light .hero-cta { background: var(--color-primary); color: var(--text-on-primary); padding: 16px 40px; border-radius: 40px; font-size: 1rem; font-weight: 600; text-decoration: none; display: inline-block; transition: all var(--transition-speed) ease; box-shadow: 0 4px 12px var(--color-primary-glow); }
    body.app-light .hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--color-primary-glow); filter: brightness(1.1); }

    body.app-light .skills-grid, body.app-light .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding: 10px; }
    body.app-light .skill-card, body.app-light .test-card, body.app-light .info-card, body.app-light .quick-vocab-card { background: var(--card-bg); border: var(--card-border); border-radius: var(--border-radius); padding: 30px; display: flex; flex-direction: column; text-decoration: none; color: var(--text-primary); transition: all var(--transition-speed) ease; box-shadow: var(--card-shadow); position: relative; overflow: hidden; }
    body.app-light .skill-card:hover, body.app-light .test-card:hover, body.app-light .info-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); border-color: rgba(0,0,0,0.08); }
    
    body.app-light .skill-icon { font-size: 2rem; margin-bottom: 16px; background: #f3f4f6; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
    body.app-light .skill-title, body.app-light .card-title { font-size: 1.25rem; margin-bottom: 10px; font-weight: 700; }
    body.app-light .skill-description, body.app-light .card-description { font-size: 0.95rem; margin-bottom: 24px; flex-grow: 1; color: var(--text-secondary); }
    
    body.app-light .skill-button, body.app-light .card-button { margin-top: auto; padding: 10px 20px; border-radius: 10px; font-size: 0.9rem; font-weight: 600; text-align: center; text-decoration: none; transition: all 0.2s; cursor: pointer; background-color: #f3f4f6; color: var(--text-primary); border: 1px solid transparent; }
    body.app-light .skill-button:hover, body.app-light .card-button:hover { background-color: var(--color-primary); color: var(--text-on-primary); }
    body.app-light .card-difficulty { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 20px; }
    body.app-light .card-difficulty .stars { display: block; color: #f59e0b; margin-top: 4px; letter-spacing: 2px; }

    body.app-light .vocab-page-layout { display: grid; grid-template-columns: 340px 1fr; gap: 40px; max-width: 1280px; margin: 0 auto; padding: 20px 20px 60px 20px; align-items: start; }
    body.app-light .quick-vocab-widget-wrapper { width: 100%; position: sticky; top: 100px; z-index: 10; }
    body.app-light .quick-vocab-card { background: #ffffff; border: 1px solid rgba(0,0,0,0.08); border-radius: 20px; padding: 25px; box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1); }
    body.app-light #quick-vocab-question { font-size: 1.1rem; font-weight: 600; margin: 20px 0; min-height: 60px; display: flex; align-items: center; justify-content: center; }
    body.app-light .quick-vocab-card h3.card-title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid #f3f4f6; padding-bottom: 15px; margin-bottom: 15px; }
    body.app-light .quick-vocab-option { background-color: #fff; border: 1px solid #e5e7eb; padding: 12px; border-radius: 8px; width: 100%; text-align: left; margin-bottom: 8px; cursor: pointer; font-family: var(--font-main); transition: all 0.2s; color: var(--text-secondary); }
    body.app-light .quick-vocab-option:hover { border-color: var(--color-primary); color: var(--color-primary); background: #fffafa; }
    body.app-light .quick-vocab-option.correct { background-color: #10b981; color: white; border-color: #10b981; }
    body.app-light .quick-vocab-option.incorrect { background-color: #ef4444; color: white; border-color: #ef4444; }
    body.app-light #quick-vocab-controls { display: none; gap: 10px; margin-top: 15px; justify-content: center; }
    body.app-light .quick-vocab-card.answered #quick-vocab-controls { display: flex; }
    body.app-light #quick-vocab-explanation { margin-top: 15px; font-size: 0.9rem; color: var(--text-secondary); background: #f9fafb; padding: 10px; border-radius: 8px; display: none; }
    body.app-light #quick-vocab-explanation.visible { display: block; }

    body.app-light .test-card-vocab-special, body.app-light .test-card-vocab-regular { background-size: cover; background-position: center; position: relative; color: white; justify-content: flex-end; padding-top: 150px; }
    body.app-light .test-card-vocab-special::before, body.app-light .test-card-vocab-regular::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%); border-radius: var(--border-radius); }
    body.app-light .test-card-vocab-special .card-title, body.app-light .test-card-vocab-regular .card-title { position: relative; z-index: 1; text-shadow: 0 2px 4px rgba(0,0,0,0.3); display: block !important; }
    body.app-light .test-card-vocab-special .card-button, body.app-light .test-card-vocab-regular .card-button { position: relative; z-index: 1; background: rgba(255,255,255,0.2); backdrop-filter: blur(5px); color: white; border: 1px solid rgba(255,255,255,0.3); }
    body.app-light .test-card-vocab-special .card-button:hover, body.app-light .test-card-vocab-regular .card-button:hover { background: white; color: black; }

    body.app-light .main-footer { padding: 40px 20px; text-align: center; color: var(--text-secondary); font-size: 0.9rem; border-top: 1px solid #e5e7eb; margin-top: 60px; }
    body.app-light .info-grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 20px; }
    body.app-light .info-card { height: 100%; }
    body.app-light .info-card.span-col-2 { grid-column: span 2; background: linear-gradient(135deg, #fef2f2 0%, #fff 100%); }
    body.app-light .info-card.span-col-3 { grid-column: span 3; background: #111827; color: white; }
    body.app-light .info-card.span-col-3 h2, body.app-light .info-card.span-col-3 p, body.app-light .info-card.span-col-3 li { color: white; }
    body.app-light .info-card h3 { color: var(--color-primary); margin-bottom: 15px; }
    body.app-light .info-list { list-style: none; text-align: left; }
    body.app-light .info-list li { padding-left: 25px; position: relative; margin-bottom: 10px; color: var(--text-secondary); }
    body.app-light .info-list li::before { content: '•'; position: absolute; left: 0; color: var(--color-primary); font-weight: bold; font-size: 1.2em; line-height: 1; }

    body.app-light #random-test-card, body.app-light #random-passage-card, body.app-light #random-lesson-card { background: linear-gradient(135deg, var(--color-primary), #d90429); color: white; border: none; }
    body.app-light #random-test-card *, body.app-light #random-passage-card *, body.app-light #random-lesson-card * { color: white !important; }
    body.app-light #random-test-card .card-button, body.app-light #random-passage-card .card-button, body.app-light #random-lesson-card .card-button { background: white; color: var(--color-primary) !important; }

    body.app-light .reading-mode-switcher { background-color: #e5e7eb; border-radius: 50px; padding: 5px; display: inline-flex; position: relative; box-shadow: inset 0 2px 4px rgba(0,0,0,0.06); margin-bottom: 30px; }
    body.app-light .mode-btn { border: none; background: transparent; color: var(--text-secondary); padding: 10px 30px; border-radius: 40px; font-size: 0.95rem; font-weight: 600; font-family: var(--font-main); cursor: pointer; transition: all 0.3s ease; min-width: 130px; }
    body.app-light .mode-btn:hover:not(.active) { color: var(--text-primary); }
    body.app-light .mode-btn.active { background-color: #ffffff; color: var(--color-primary); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }

        body.app-light #vocab-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; width: 100%; }
    body.app-light .vocab-card-image-only {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    
    /* --- SỬA Ở ĐÂY --- */
    background-size: contain; /* Đổi cover -> contain để hiện full ảnh */
    background-position: center bottom; /* Đẩy ảnh xuống đáy hoặc giữa tùy ý */
    background-repeat: no-repeat;
    /* ---------------- */
    
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Thêm màu nền nhẹ để nếu ảnh không khít thì vẫn đẹp */
    background-color: #fff; 
}
    body.app-light .vocab-card-image-only:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px -5px rgba(0,0,0,0.2); z-index: 2; }
    body.app-light .vocab-card-image-only::after { content: 'Làm ngay'; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2)); color: #fff; font-weight: 500; font-size: 1.1rem; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 30px; opacity: 0; transition: opacity 0.2s ease; }
    body.app-light .vocab-card-image-only:hover::after { opacity: 1; }

    @media (max-width: 1024px) { body.app-light .vocab-page-layout { grid-template-columns: 1fr; } body.app-light .info-grid-container { grid-template-columns: 1fr; } body.app-light .info-card.span-col-2, body.app-light .info-card.span-col-3 { grid-column: span 1; } }
    @media (max-width: 992px) { body.app-light #home .skills-grid { grid-template-columns: repeat(2, 1fr); } body.app-light .vocab-page-layout { grid-template-columns: 1fr; gap: 30px; } body.app-light .quick-vocab-widget-wrapper { position: static; max-width: 600px; margin: 0 auto; } body.app-light #vocab-container { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
    @media (max-width: 768px) { 
        body.app-light .nav-buttons { gap: 5px; } 
        body.app-light .nav-button { font-size: 13px; padding: 6px 10px; } 
        body.app-light .hero-title { font-size: 2.5rem; } 
        body.app-light .section-title { font-weight: 400; font-style: normal; font-size: clamp(3.5rem, 6vw, 4.5rem); color: var(--text-primary); margin-bottom: 10px; line-height: 1.1; padding: 10px 0; display: block; } 
    }
    @media (max-width: 576px) { body.app-light #home .skills-grid { grid-template-columns: 1fr; } }

    /* ==========================================================================
       4. STYLE TỪ INDEX-DARK.HTML (DARK MODE)
       ========================================================================== */
    body.app-dark {
        --neon-blue: #00f2ff;
        --neon-red: #ff0055;
        --neon-blue-glow: rgba(0, 242, 255, 0.4);
        --neon-red-glow: rgba(255, 0, 85, 0.4);
        --font-main: 'Inter', sans-serif;
        --text-page-title: #ffffff;
        --text-page-subtitle: #b0b8c4;
        --text-card-heading: #111827;
        --text-card-body: #374151;
        --text-card-muted: #6b7280;
        --card-bg: rgba(254, 255, 255, 0.75); 
        --card-border: 1px solid rgba(255, 255, 255, 0.9);
        --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        --card-shadow-hover: 0 15px 40px -5px rgba(0, 242, 255, 0.3); 
        --border-radius: 16px;
        --transition-speed: 0.3s;

        font-family: var(--font-main); color: var(--text-page-title); line-height: 1.6;
        -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
        background-color: #0b0e14;
    }

    body.app-dark h1, body.app-dark h2, body.app-dark h3, body.app-dark h4, body.app-dark .nav-button { font-family: var(--font-main); font-weight: 700; letter-spacing: -0.025em; }

    body.app-dark .main-header { padding: 12px 20px; display: flex; justify-content: center; align-items: center; background: rgba(10, 15, 20, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.1); position: sticky; top: 0; z-index: 100; }
    body.app-dark .nav-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
    body.app-dark .nav-button { background: transparent; border: 1px solid transparent; color: #9ca3af; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all var(--transition-speed) ease; }
    body.app-dark .nav-button:hover { color: var(--neon-blue); background-color: rgba(0, 242, 255, 0.05); border-color: rgba(0, 242, 255, 0.2); text-shadow: 0 0 8px var(--neon-blue-glow); }
    body.app-dark .nav-button.active { color: #fff; background: linear-gradient(45deg, var(--neon-blue), #0099ff); box-shadow: 0 0 15px var(--neon-blue-glow); border-color: transparent; color: #000; }
    
    body.app-dark .nav-logo-link { margin: 0 15px; }
    body.app-dark .nav-logo-img { height: 65px; width: auto; transition: transform 0.3s ease; filter: drop-shadow(0 0 5px rgba(255,255,255,0.5)); }
    body.app-dark .nav-logo-img:hover { transform: scale(1.05); }
    body.app-dark .nav-button svg { display: block; fill: currentColor; }

    body.app-dark main { padding: 40px 0; max-width: 1440px; margin: 0 auto; }
    body.app-dark .content-pane { display: none; animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
    body.app-dark .content-pane.active { display: block; }
    
    body.app-dark .section { padding: 60px 20px; text-align: center; max-width: 1200px; margin: 0 auto; }
    body.app-dark .section-title { font-size: 2.5rem; margin-bottom: 16px; color: var(--text-page-title); text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
    body.app-dark .section-subtitle { font-size: 1.125rem; max-width: 600px; margin: 0 auto 40px auto; line-height: 1.6; color: var(--text-page-subtitle); }

    body.app-dark .hero-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 7vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(90deg, 
        #ed2444 30%,      
        var(--neon-blue) 50%, 
        #ed2444 70%       
    );
    background-size: 200% auto;
    animation: spotlight 5s linear infinite; 
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent; 
    letter-spacing: -0.04em;
    filter: drop-shadow(0 0 20px var(--neon-blue-glow)); 
}
    body.app-dark .hero-cta { background: transparent; color: #fff; padding: 16px 40px; border-radius: 40px; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; text-decoration: none; display: inline-block; transition: all var(--transition-speed) ease; border: 2px solid var(--neon-red); box-shadow: 0 0 12px var(--neon-blue-glow), inset 0 0 10px var(--neon-blue-glow); letter-spacing: 1px; }
    body.app-dark .hero-cta:hover { background: var(--neon-red); border-color: var(--neon-red); box-shadow: 0 0 30px var(--neon-red-glow), 0 0 60px var(--neon-red-glow); transform: translateY(-3px); }

    body.app-dark .skills-grid, body.app-dark .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding: 10px; }
    body.app-dark .skill-card, body.app-dark .test-card, body.app-dark .info-card, body.app-dark .quick-vocab-card { background: var(--card-bg); border: var(--card-border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: var(--border-radius); padding: 30px; display: flex; flex-direction: column; text-decoration: none; color: var(--text-card-body); transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: var(--card-shadow); position: relative; overflow: hidden; }
    body.app-dark .skill-card:hover, body.app-dark .test-card:hover, body.app-dark .info-card:hover { transform: translateY(-8px); box-shadow: var(--card-shadow-hover); background: rgba(255, 255, 255, 0.95); border-color: var(--neon-blue); }
    
    body.app-dark .skill-icon { font-size: 2rem; margin-bottom: 16px; background: rgba(0, 242, 255, 0.1); color: #000; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--neon-blue); }
    body.app-dark .skill-title, body.app-dark .card-title { font-size: 1.35rem; margin-bottom: 10px; font-weight: 700; color: var(--text-card-heading); }
    body.app-dark .skill-description, body.app-dark .card-description { font-size: 0.95rem; margin-bottom: 24px; flex-grow: 1; color: var(--text-card-muted); font-weight: 300; }
    
    body.app-dark .skill-button, body.app-dark .card-button { margin-top: auto; padding: 12px 20px; border-radius: 12px; font-size: 0.95rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; transition: all 0.3s ease; background-color: var(--neon-red); color: #f6f6f6; border: 2px solid var(--neon-red); box-shadow: 0 0 5px rgba(0, 242, 255, 0.3); }
    body.app-dark .skill-button:hover, body.app-dark .card-button:hover { background-color: var(--neon-red); border-color: var(--neon-red); color: #ffffff; box-shadow: 0 5px 20px var(--neon-red-glow); transform: scale(1.02); }
    body.app-dark .card-difficulty { font-size: 0.9rem; color: var(--text-card-muted); margin-bottom: 20px; }
    body.app-dark .card-difficulty .stars { display: block; color: #f59e0b; margin-top: 4px; letter-spacing: 2px; }

    body.app-dark .vocab-page-layout { display: grid; grid-template-columns: 340px 1fr; gap: 40px; max-width: 1280px; margin: 0 auto; padding: 20px 20px 60px 20px; align-items: start; }
    body.app-dark .quick-vocab-widget-wrapper { width: 100%; position: sticky; top: 100px; z-index: 10; }
    body.app-dark #quick-vocab-question { font-size: 1.1rem; font-weight: 700; margin: 20px 0; min-height: 60px; display: flex; align-items: center; justify-content: center; color: var(--text-card-heading); }
    body.app-dark .quick-vocab-card h3.card-title { color: var(--neon-blue); text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid rgba(0,0,0,0.1); padding-bottom: 15px; }
    body.app-dark .quick-vocab-option { background-color: #f3f4f6; border: 1px solid #e5e7eb; padding: 12px; border-radius: 8px; width: 100%; text-align: left; margin-bottom: 8px; cursor: pointer; font-family: var(--font-main); transition: all 0.2s; color: #374151; font-weight: 500; }
    body.app-dark .quick-vocab-option:hover { border-color: var(--neon-blue); color: #000; background: rgba(0,242,255,0.1); }
    body.app-dark .quick-vocab-option.correct { background-color: #10b981; color: white; border-color: #10b981; }
    body.app-dark .quick-vocab-option.incorrect { background-color: var(--neon-red); color: white; border-color: var(--neon-red); }
    body.app-dark #quick-vocab-controls { display: none; gap: 10px; margin-top: 15px; justify-content: center; }
    body.app-dark .quick-vocab-card.answered #quick-vocab-controls { display: flex; }
    body.app-dark #quick-vocab-explain-btn { flex:1; padding: 10px; border: 1px solid #ccc; background: #fff; border-radius: 8px; color: #333; cursor: pointer; font-weight: 600;}
    body.app-dark #quick-vocab-explain-btn:hover { background: #f9fafb; }
    body.app-dark #quick-vocab-next-btn { flex:1; padding: 10px; border: none; background: var(--neon-blue); color: #000; border-radius: 8px; font-weight: 700; cursor: pointer; box-shadow: 0 0 10px var(--neon-blue-glow); }
    body.app-dark #quick-vocab-next-btn:hover { background: #00d0dd; }
    body.app-dark #quick-vocab-explanation { margin-top: 15px; font-size: 0.9rem; color: #4b5563; background: #f3f4f6; padding: 10px; border-radius: 8px; display: none; border-left: 3px solid var(--neon-blue);}
    body.app-dark #quick-vocab-explanation.visible { display: block; }

    body.app-dark .test-card-vocab-special, body.app-dark .test-card-vocab-regular { background-size: cover; background-position: center; position: relative; color: white; justify-content: flex-end; padding-top: 150px; }
    body.app-dark .vocab-card-image-only h2, body.app-dark .vocab-card-image-only p { color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

    body.app-dark .main-footer { padding: 40px 20px; text-align: center; color: #9ca3af; font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 60px; }
    body.app-dark .info-grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 20px; }
    body.app-dark .info-card { height: 100%; }
    body.app-dark .info-card.span-col-2 { grid-column: span 2; background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(230,240,255,0.9)); }
    body.app-dark .info-card.span-col-3 { grid-column: span 3; background: rgba(0,0,0,0.6); border: 1px solid var(--neon-blue); color: #fff !important; }
    body.app-dark .info-card.span-col-3 h2 { color: var(--neon-blue); }
    body.app-dark .info-card.span-col-3 ul li { color: #d1d5db; }
    body.app-dark .info-card h3 { color: var(--neon-red); margin-bottom: 15px; text-transform: uppercase; }
    body.app-dark .info-list { list-style: none; text-align: left; }
    body.app-dark .info-list li { padding-left: 25px; position: relative; margin-bottom: 10px; color: var(--text-card-body); }
    body.app-dark .info-list li::before { content: '★'; position: absolute; left: 0; color: var(--neon-blue); font-size: 1em; }

    body.app-dark #random-test-card, body.app-dark #random-passage-card, body.app-dark #random-lesson-card { background: linear-gradient(135deg, #1e293b, #0f172a); color: white !important; border: 1px solid var(--neon-blue); }
    body.app-dark #random-test-card .card-title, body.app-dark #random-passage-card .card-title, body.app-dark #random-lesson-card .card-title { color: var(--neon-blue); }
    body.app-dark #random-test-card .card-description, body.app-dark #random-passage-card .card-description, body.app-dark #random-lesson-card .card-description { color: #cbd5e1; }
    body.app-dark #random-test-card .card-button, body.app-dark #random-passage-card .card-button, body.app-dark #random-lesson-card .card-button { background: var(--neon-blue); color: black !important; border: none; }
    body.app-dark #random-test-card .card-button:hover, body.app-dark #random-passage-card .card-button:hover, body.app-dark #random-lesson-card .card-button:hover { background: #fff; box-shadow: 0 0 20px #fff; }

    @media (max-width: 1024px) { body.app-dark .vocab-page-layout { grid-template-columns: 1fr; } body.app-dark .info-grid-container { grid-template-columns: 1fr; } body.app-dark .info-card.span-col-2, body.app-dark .info-card.span-col-3 { grid-column: span 1; } }
    @media (max-width: 768px) { body.app-dark .nav-buttons { gap: 5px; } body.app-dark .nav-button { font-size: 13px; padding: 6px 10px; } body.app-dark .hero-title { font-size: 2.5rem; } body.app-dark .section-title { font-size: clamp(3.5rem, 6vw, 4.5rem); color: var(--neon-blue); text-shadow: 0 0 15px var(--neon-blue-glow); } }

    body.app-dark .reading-mode-switcher { background-color: rgba(255,255,255,0.1); border-radius: 50px; padding: 5px; display: inline-flex; position: relative; margin-bottom: 30px; border: 1px solid rgba(255,255,255,0.2); }
    body.app-dark .mode-btn { border: none; background: transparent; color: #9ca3af; padding: 10px 30px; border-radius: 40px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; min-width: 130px; }
    body.app-dark .mode-btn:hover:not(.active) { color: #fff; }
    body.app-dark .mode-btn.active { background-color: var(--neon-blue); color: #000; box-shadow: 0 0 15px var(--neon-blue-glow) !important; }

    body.app-dark #home .skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1300px; margin: 0 auto; }
    body.app-dark #home .skill-card { padding: 25px 20px; min-height: 280px; }
    body.app-dark #home .skill-icon { width: 50px; height: 50px; font-size: 1.8rem; margin-bottom: 15px; }
    body.app-dark #home .skill-title { font-size: 1.2rem; }
    body.app-dark #home .skill-description { font-size: 0.9rem; line-height: 1.5; }
    body.app-dark #home .skill-button { padding: 10px 15px; font-size: 0.9rem; }

    body.app-dark #vocab-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; width: 100%; }
    body.app-dark .vocab-card-image-only { display: block; width: 100%; aspect-ratio: 3 / 4; background-size: cover; background-position: center; background-repeat: no-repeat; border-radius: 16px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
    body.app-dark .vocab-card-image-only:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 0 25px var(--neon-blue-glow); z-index: 2; border-color: var(--neon-blue); }
    body.app-dark .vocab-card-image-only::after { content: 'Làm ngay'; position: absolute; inset: 0; background: linear-gradient(to top, var(--neon-red) 0%, transparent 50%); color: #fff; font-weight: 700; font-size: 1.2rem; text-transform: uppercase; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 30px; opacity: 0; transition: opacity 0.3s ease; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
    body.app-dark .vocab-card-image-only:hover::after { opacity: 1; }
    @media (max-width: 992px) { body.app-dark .vocab-page-layout { grid-template-columns: 1fr; gap: 30px; } body.app-dark .quick-vocab-widget-wrapper { position: static; max-width: 600px; margin: 0 auto; } body.app-dark #vocab-container { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
    @media (max-width: 576px) { body.app-dark #home .skills-grid { grid-template-columns: 1fr; } }

    /* Common Button Toggle */
    #theme-toggle-btn { margin-left: 10px; font-size: 1.2rem; }
    .button-group {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
        margin-top: 20px;
    }

  
    /* 2. Widget Button ở trang Vocab (Chung) */
    .vocab-game-widget-btn {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 20px; /* Cách widget trên 20px */
        padding: 20px;
        border-radius: 20px;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        cursor: pointer;
    }
    .vocab-game-widget-btn .game-icon {
        font-size: 2rem;
    }
    .vocab-game-widget-btn .game-text {
        display: flex;
        flex-direction: column;
    }
    .vocab-game-widget-btn .game-text strong {
        font-size: 1.1rem;
        font-weight: 700;
    }
    .vocab-game-widget-btn .game-text span {
        font-size: 0.85rem;
        margin-top: 2px;
    }

    /* ==================== LIGHT MODE SPECIFIC ==================== */
    
       /* Widget Button ở Vocab (Light) */
    body.app-light .vocab-game-widget-btn {
        background: #ffffff;
        border: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
        color: var(--text-primary);
    }
    body.app-light .vocab-game-widget-btn .game-text span {
        color: var(--text-secondary);
    }
    body.app-light .vocab-game-widget-btn:hover {
        transform: translateY(-5px);
        border-color: #833ab4;
        background: linear-gradient(to right, #fff, #fffafa);
        box-shadow: 0 15px 30px -5px rgba(131, 58, 180, 0.15);
    }
    body.app-light .vocab-game-widget-btn:hover .game-text strong {
        background: linear-gradient(135deg, #833ab4, #fd1d1d);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* ==================== DARK MODE SPECIFIC ==================== */

    /* Nút Game ở Home (Dark) */
    body.app-dark .hero-cta.game-btn {
         background: #1877f2;
        border: 2px solid #1877f2; 
        color: #fff;
        box-shadow: 0 0 15px rgba(217, 70, 239, 0.4), inset 0 0 10px rgba(217, 70, 239, 0.2);
    }
    body.app-dark .hero-cta.game-btn:hover {
        background: #1877f2;
        box-shadow: 0 0 30px rgba(217, 70, 239, 0.6), 0 0 60px rgba(217, 70, 239, 0.6);
        transform: translateY(-3px);
        border-color: #1877f2;
    }

    /* Widget Button ở Vocab (Dark) */
    body.app-dark .vocab-game-widget-btn {
        background: transparent;
        border: 1px solid #d946ef;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: var(--card-shadow);
    }
    body.app-dark .vocab-game-widget-btn .game-text strong {
        color: #d946ef; /* Tím Neon */
        text-shadow: 0 0 5px rgba(217, 70, 239, 0.5);
    }
    body.app-dark .vocab-game-widget-btn .game-text span {
        color: #9ca3af;
    }
    body.app-dark .vocab-game-widget-btn:hover {
        border-color: transparent;
        background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
        transform: translateY(-5px);
        box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
    }
    body.app-dark .vocab-game-widget-btn:hover .game-text span {
        color: #fff;
    }
    #quick-vocab-controls button {
        flex: 1; /* Chia đều chiều rộng */
        padding: 12px 15px; /* Bằng padding của option */
        border-radius: 8px; /* Bo góc giống option */
        font-family: var(--font-main);
        font-size: 0.95rem;
        font-weight: 700; /* Chữ đậm hơn (Bold) */
        cursor: pointer;
        transition: all 0.2s ease;
        text-transform: uppercase; /* Viết hoa cho "mạnh" hơn */
        letter-spacing: 0.5px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ==================== LIGHT MODE ==================== */
    /* Style giống option nhưng viền dày hơn */
    body.app-light #quick-vocab-controls button {
        background-color: #ffffff;
        border: 2px solid #e5e7eb; /* Viền dày 2px cho đậm đà */
        color: var(--text-secondary);
    }

    /* Hover chung Light Mode */
    body.app-light #quick-vocab-controls button:hover {
        background-color: #fffafa;
        transform: translateY(-2px); /* Nhảy lên nhẹ */
    }

    /* Nút Xem giải thích (Light) */
    body.app-light #quick-vocab-explain-btn:hover {
        border-color: #6b7280;
        color: #111827;
    }

    /* Nút Câu tiếp theo (Light) - Cho màu chủ đạo */
    body.app-light #quick-vocab-next-btn {
        border-color: #e5e7eb; 
        color: var(--color-primary); /* Màu đỏ chủ đạo */
    }
    body.app-light #quick-vocab-next-btn:hover {
        border-color: var(--color-primary);
        background-color: var(--color-primary);
        color: var(--color-primary);
        box-shadow: 0 4px 10px rgba(169, 5, 31, 0.2);
    }

    /* ==================== DARK MODE ==================== */
        body.app-dark #quick-vocab-controls button {
        background-color: rgba(255, 255, 255, 0.05); /* Nền trong suốt nhẹ */
        border: 2px solid rgba(255, 255, 255, 0.1);
        color: #9ca3af;
        backdrop-filter: blur(5px);
    }

    /* Hover chung Dark Mode */
    body.app-dark #quick-vocab-controls button:hover {
        transform: translateY(-2px);
        color: #fff;
    }

    /* Nút Xem giải thích (Dark) */
    body.app-dark #quick-vocab-explain-btn:hover {
        background-color: var(--neon-blue);
        border-color: var(--neon-blue);
    }

    /* Nút Câu tiếp theo (Dark) - Màu Neon Blue */
    body.app-dark #quick-vocab-next-btn {
        color: var(--neon-blue);
        border-color: rgba(0, 242, 255, 0.3);
    }
    body.app-dark #quick-vocab-next-btn:hover {
        background-color: var(--neon-blue);
        border-color: var(--neon-blue);
        color: #000; /* Nền xanh chữ đen */
        box-shadow: 0 0 15px var(--neon-blue-glow);
    }

    /* ==================== LIGHT MODE ==================== */
    
       /* 2. Widget Game Trí Nhớ ở Vocab (Light) */
    body.app-light .vocab-game-widget-btn.memory-game-widget-btn:hover {
        border-color: #26a0da; /* Màu xanh dương khi hover */
        box-shadow: 0 15px 30px -5px rgba(38, 160, 218, 0.15);
    }
    body.app-light .vocab-game-widget-btn.memory-game-widget-btn:hover .game-text strong {
        background: linear-gradient(135deg, #26a0da, #30c381);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* ==================== DARK MODE ==================== */

   
    /* 2. Widget Game Trí Nhớ ở Vocab (Dark) */
    body.app-dark .vocab-game-widget-btn.memory-game-widget-btn {
        border: 1px solid #00ff87; /* Viền màu xanh neon */
    }
    body.app-dark .vocab-game-widget-btn.memory-game-widget-btn .game-text strong {
        color: #00ff87; /* Chữ màu xanh neon */
        text-shadow: 0 0 5px rgba(0, 255, 135, 0.5);
    }
    body.app-dark .vocab-game-widget-btn.memory-game-widget-btn:hover {
        border-color: transparent;
        background: linear-gradient(135deg, #00ff87, #60efff);
        transform: translateY(-5px);
        box-shadow: 0 0 20px rgba(0, 255, 135, 0.3);
    }
    body.app-dark .vocab-game-widget-btn.memory-game-widget-btn:hover .game-text strong {
        color: #000;
        text-shadow: none;
    }
    body.app-dark .vocab-game-widget-btn.memory-game-widget-btn:hover .game-text span {
        color: #0a0f19;
    }
    .card-title, 
    .card-description {
        text-align: center;
    }
    .card-difficulty {
        text-align: center !important;
    }
    .card-difficulty .stars {
        display: block;
        text-align: center;
    }
a.hero-cta.font-cursive {
    font-family: 'Space Grotesk', sans-serif !important;
        font-size: 1.1rem !important; /* Chỉnh lại size cho vừa mắt (font cũ cần to, font này cần nhỏ) */
        font-weight: 700 !important;
        text-transform: uppercase !important; /* In hoa cho ngầu */
        letter-spacing: 1px !important;
        line-height: 1.5 !important;
        padding: 16px 40px !important;
}

/* Hiệu ứng khi rê chuột vào nút uốn lượn */
a.hero-cta.font-cursive:hover {
    transform: scale(1.05) !important;
    text-decoration: none;
}

.section-title.font-inter,
#grammar .section-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important; /* Đậm */
    letter-spacing: -1px !important;
    text-transform: none !important; 
}

@media (max-width: 768px) {
    .section-title.font-inter,
    #grammar .section-title {
        font-family: 'Inter', sans-serif !important;         
font-size: 2.0rem !important;
    }

}
.skill-card .skill-icon {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 16px !important; 
}

.skill-card {
    align-items: center !important; 
    text-align: center !important;  
}
@media (max-width: 992px) {
    body.app-dark #home .skills-grid {
        /* Chuyển từ 4 cột xuống 2 cột giống Light Mode */
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Khi màn hình nhỏ hơn 576px (Điện thoại) */
@media (max-width: 576px) {
    body.app-dark #home .skills-grid {
        /* Chuyển xuống 1 cột */
        grid-template-columns: 1fr !important;
    }
    
    /* Căn chỉnh lại padding cho đẹp hơn trên mobile */
    body.app-dark #home .skill-card {
        padding: 20px !important;
        min-height: auto !important; /* Bỏ chiều cao tối thiểu để đỡ trống */
    }
}
#landing-wrapper .mode-selector.landing-skills {
        max-width: 100%; /* Cho phép bung rộng hết màn hình */
        width: 95vw; /* Chiếm 95% chiều ngang màn hình */
        gap: 15px; /* Giảm khoảng cách giữa các thẻ (cũ là 40px) */
        justify-content: center;
        flex-wrap: nowrap;
}

#landing-wrapper .mode-card.skill-preview {
        width: 19%; /* Chia đều 5 thẻ (100% / 5 ~ 20%) */
        min-width: 200px; /* Không được nhỏ quá mức này */
        max-width: 250px; /* Giới hạn độ to */
        height: 360px; /* Chiều cao cố định */
        padding: 20px 10px;
}

/* Hiệu ứng Hover chung */
#landing-wrapper .mode-card.skill-preview:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(0, 0, 0, 0.6);
}

/* --- MÀU SẮC RIÊNG CHO TỪNG THẺ (Neon Style) --- */

/* 1. READING - Màu Đỏ Neon */
#landing-wrapper .card-reading:hover {
    border-color: #ff2a2a;
    box-shadow: 0 0 30px rgba(255, 42, 42, 0.6);
}
#landing-wrapper .card-reading:hover h2, 
#landing-wrapper .card-reading:hover .icon-wrapper {
    color: #ff2a2a;
    text-shadow: 0 0 10px rgba(255, 42, 42, 0.6);
}
#landing-wrapper .card-reading .glow-circle { background: #ff2a2a; }

/* 2. WRITING - Màu Xanh Dương Neon */
#landing-wrapper .card-writing:hover {
    border-color: #013ff6;
    box-shadow: 0 0 30px rgba(1, 63, 246, 0.6);
}
#landing-wrapper .card-writing:hover h2, 
#landing-wrapper .card-writing:hover .icon-wrapper {
    color: #013ff6;
    text-shadow: 0 0 10px rgba(1, 63, 246, 0.6);
}
#landing-wrapper .card-writing .glow-circle { background: #013ff6; }

/* 3. VOCAB - Màu Vàng/Cam Neon */
#landing-wrapper .card-vocab:hover {
    border-color: #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}
#landing-wrapper .card-vocab:hover h2, 
#landing-wrapper .card-vocab:hover .icon-wrapper {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
#landing-wrapper .card-vocab .glow-circle { background: #f59e0b; }

/* 4. GRAMMAR - Màu Tím/Hồng Neon */
#landing-wrapper .card-grammar:hover {
    border-color: #d946ef;
    box-shadow: 0 0 30px rgba(217, 70, 239, 0.6);
}
/* 5. LISTENING - MÀU MỚI - Màu Xanh Lá Neon */
#landing-wrapper .card-listening:hover {
    border-color: #00ff87; /* Màu viền khi hover */
    box-shadow: 0 0 30px rgba(0, 255, 135, 0.6); /* Hiệu ứng tỏa sáng */
}
#landing-wrapper .card-listening:hover h2, 
#landing-wrapper .card-listening:hover .icon-wrapper {
    color: #00ff87; /* Màu chữ và icon khi hover */
    text-shadow: 0 0 10px rgba(0, 255, 135, 0.6); /* Đổ bóng cho chữ/icon */
}
#landing-wrapper .card-listening .glow-circle { 
    background: #00ff87; /* Màu của vòng tròn mờ phía sau */
}
#landing-wrapper .card-grammar:hover h2, 
#landing-wrapper .card-grammar:hover .icon-wrapper {
    color: #d946ef;
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.6);
}
#landing-wrapper .card-grammar .glow-circle { background: #d946ef; }

/* --- RESPONSIVE CHO 5 THẺ --- */
@media (max-width: 1200px) {
        #landing-wrapper .mode-selector.landing-skills {
            flex-wrap: wrap; /* Cho phép rớt xuống hàng */
            width: 100%;
            max-width: 800px;
    }
    #landing-wrapper .mode-card.skill-preview {
            width: 45%; /* Lúc này hiển thị 2 thẻ 1 hàng */
            max-width: 300px; /* Cho to ra lại cho đẹp */
            margin-bottom: 10px;
        }
}
@media (max-width: 768px) {
        #landing-wrapper .mode-selector.landing-skills {
            flex-direction: column; /* Xếp dọc từ trên xuống */
            align-items: center;
            gap: 15px;
            width: 100%;
        }

        #landing-wrapper .mode-card.skill-preview {
            width: 100%; /* Chiếm hết chiều ngang điện thoại */
            max-width: 340px; /* Không to quá mức */
            height: 100px; /* Chiều cao nhỏ gọn (Code bạn là 180px, 100px sẽ gọn hơn cho 5 thẻ) */
            
            /* Layout ngang bên trong thẻ (Icon trái - Chữ phải) */
            flex-direction: row; 
            align-items: center;
            justify-content: flex-start;
            padding: 0 25px;
            gap: 20px;
        }

        /* Chỉnh lại icon và chữ trên mobile cho cân đối */
        #landing-wrapper .mode-card.skill-preview .icon-wrapper {
            font-size: 2.2rem;
            margin: 0; /* Bỏ margin bottom cũ */
        }
        #landing-wrapper .mode-card.skill-preview h2 {
            font-size: 1.5rem;
            margin-bottom: 0;
            text-align: left;
        }
        #landing-wrapper .mode-card.skill-preview p {
            display: none; /* Ẩn bớt mô tả trên mobile cho gọn (Tuỳ chọn) */
        }

        /* --- FIX RIÊNG CHO THẺ ENTRY TRÊN MOBILE --- */
        #landing-wrapper .card-entry {
            justify-content: space-between; /* Chữ trái, Mũi tên phải */
            padding-top: 0 !important; /* Bỏ padding top của PC */
        }
        #landing-wrapper .card-entry .entry-arrow-circle {
            margin: 0; /* Reset margin để căn giữa dọc */
            width: 40px; /* Nhỏ lại chút */
            height: 40px;
        }
    }
.enter-btn-container {
        margin-bottom: 40px;
        margin-top: 10px; /* Cách tiêu đề một chút */
    }

    .enter-text-link {
        font-family: 'Space Grotesk', sans-serif; /* Font chữ đơn giản, hiện đại */
        font-size: 1.1rem; /* Kích thước nhỏ gọn */
        font-weight: 400;
        color: rgba(255, 255, 255, 0.6); /* Màu trắng mờ */
        cursor: pointer;
        text-transform: uppercase; /* Chữ in hoa */
        letter-spacing: 4px; /* Giãn cách chữ cho sang */
        transition: all 0.4s ease;
        padding: 10px;
        position: relative;
    }

    /* Hiệu ứng khi rê chuột vào */
    .enter-text-link:hover {
        color: #00f2ff; /* Đổi sang màu xanh Neon */
        text-shadow: 0 0 15px rgba(0, 242, 255, 0.6); /* Phát sáng */
        letter-spacing: 6px; /* Chữ giãn rộng ra 1 chút */
    }
h1, h2, h3, h4, h5, h6,
    .main-title,
    .hero-title,
    .section-title,
    .card-title,
    .skill-title,
    #landing-wrapper .mode-card h2,
    .vocab-game-widget-btn .game-text strong {
        font-family: 'Space Grotesk', sans-serif !important;
        letter-spacing: -0.03em; /* Space Grotesk nhìn đẹp hơn khi chữ xích lại xíu */
    }

    /* 4. Đảm bảo các số hiển thị đẹp (Reading Test 1, 2...) */
    .test-card h2, 
    .skill-card h3 {
        font-variant-numeric: tabular-nums;
    }
 #landing-wrapper .card-entry:hover {
        border-color: #ffffff;
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    }
    #landing-wrapper .card-entry:hover h2 {
        color: #ffffff;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
    #landing-wrapper .card-entry .glow-circle { 
        background: #ffffff; 
    }

    /* 2. Style cho nút Mũi tên tròn trắng ở cuối */
    #landing-wrapper .entry-arrow-circle {
        width: 50px;
        height: 50px;
        background-color: #ffffff; /* Nền trắng */
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        margin-top: auto; /* Đẩy xuống đáy card */
        margin-bottom: 20px;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    }

    /* Icon mũi tên màu đen để tương phản với nền trắng */
    #landing-wrapper .entry-arrow-circle svg {
        fill: #000000;
        transform: scale(1.1);
    }

    /* Hiệu ứng khi hover vào cả thẻ thì nút mũi tên phóng to/nhảy */
    #landing-wrapper .card-entry:hover .entry-arrow-circle {
        transform: scale(1.15) translateX(5px); /* To lên và dịch sang phải xíu */
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
    }

    /* Điều chỉnh lại layout của thẻ này để nội dung dàn đều đẹp hơn */
    #landing-wrapper .card-entry {
        justify-content: space-between; /* Tách nội dung chữ và nút ra xa nhau */
        padding-top: 60px; /* Đẩy chữ xuống 1 chút cho cân */
    }
/* 1. Style mặc định cho cả 3 nút (Trạng thái chưa Hover) */
    .button-group .hero-cta {
        /* Reset các màu nền/gradient cũ */
        background: #ffffff !important;
        background-image: none !important;
        
        /* Tạo khung viền dày và bo góc nhẹ */
        border: 3px solid #000000 !important;
        border-radius: 12px !important; /* Bo góc nhẹ như hình */
        
        /* Màu chữ và Font */
        color: #000000 !important;
        font-family: 'Space Grotesk', sans-serif !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        
        /* Tạo bóng cứng (Hard Shadow) màu đen */
        box-shadow: 6px 6px 0px 0px #000000 !important;
        
        /* Canh chỉnh */
        padding: 16px 30px !important;
        min-width: 220px; /* Độ rộng tối thiểu cho đều */
        display: inline-flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        transform: none !important; /* Reset vị trí cũ */
    }

    /* ==================================================
       HIỆU ỨNG HOVER (CHUYỂN MÀU & BÓNG)
       ================================================== */

    /* 1. Nút Giữa (Facebook): Hover thành màu ĐỎ (như hình mẫu) */
    .button-group .fb-btn:hover {
        border-color: #C8102E !important; /* Màu đỏ đậm */
        color: #C8102E !important;
        box-shadow: 8px 8px 0px 0px #C8102E !important; /* Bóng đổ màu đỏ */
        transform: translate(-2px, -2px) !important; /* Nút nhích lên chút */
    }

    /* 2. Nút Trái (Game Trí Nhớ): Hover thành màu HỒNG (theo icon não) */
    .button-group .memory-game-btn:hover {
        border-color: #ff69b4 !important;
        color: #ff69b4 !important;
        box-shadow: 8px 8px 0px 0px #ff69b4 !important;
        transform: translate(-2px, -2px) !important;
    }

    /* 3. Nút Phải (Game Chính Tả): Hover thành màu TÍM (theo icon tay cầm) */
    /* Chọn nút game nhưng ko phải memory game */
    .button-group .hero-cta:not(.fb-btn):not(.memory-game-btn):hover {
        border-color: #6c5ce7 !important;
        color: #6c5ce7 !important;
        box-shadow: 8px 8px 0px 0px #6c5ce7 !important;
        transform: translate(-2px, -2px) !important;
    }

    /* Responsive cho Mobile: Xếp dọc và bóng nhỏ lại chút */
    @media (max-width: 768px) {
        .button-group {
            flex-direction: column;
            gap: 25px; /* Tăng khoảng cách để bóng không đè lên nhau */
        }
        .button-group .hero-cta {
            width: 100%;
            max-width: 320px;
        }
    }
body.app-dark .button-group .hero-cta {
        /* 1. Đổi viền thành Xanh Neon */
        border-color: #00f2ff !important; 
        
        /* 2. Đổi bóng thành màu xanh mờ (để tạo cảm giác phát sáng) */
        box-shadow: 6px 6px 0px 0px rgba(0, 242, 255, 0.4) !important;
        
        /* 3. Nền đen để nổi bật viền neon */
        background: #000000 !important;
        
        /* 4. Chữ màu trắng */
        color: #ffffff !important; 
        
        /* 5. Thêm hiệu ứng glow nhẹ cho viền */
        filter: drop-shadow(0 0 2px #00f2ff);
    }

    /* --- HOVER Ở DARK MODE (GIỮ MÀU RIÊNG TỪNG NÚT) --- */
    
    /* Facebook (Đỏ Neon) */
    body.app-dark .button-group .fb-btn:hover {
        border-color: #ff0055 !important;
        color: #ff0055 !important;
        box-shadow: 6px 6px 0px 0px #ff0055 !important;
        filter: drop-shadow(0 0 8px #ff0055);
        background: #000 !important;
    }

    /* Game Trí Nhớ (Hồng Neon) */
    body.app-dark .button-group .memory-game-btn:hover {
        border-color: #ff69b4 !important;
        color: #ff69b4 !important;
        box-shadow: 6px 6px 0px 0px #ff69b4 !important;
        filter: drop-shadow(0 0 8px #ff69b4);
        background: #000 !important;
    }

    /* Game Chính Tả (Tím Neon) */
    body.app-dark .button-group .hero-cta:not(.fb-btn):not(.memory-game-btn):hover {
        border-color: #d946ef !important;
        color: #d946ef !important;
        box-shadow: 6px 6px 0px 0px #d946ef !important;
        filter: drop-shadow(0 0 8px #d946ef);
        background: #000 !important;
    }
.random-result-text {
    text-align: center !important;
    width: 100%;
    margin-bottom: 15px;
    display: block;
}

/* 2. Ép tất cả thẻ Random (Reading, Listening, Passage, Lesson) phải canh giữa nội dung */
#random-test-card, 
#random-passage-card, 
#random-lesson-card,
#random-listening-card {
    align-items: center !important; 
    text-align: center !important;
    justify-content: center !important;
}
.marquee-wrapper {
    /* Kỹ thuật phá vỡ container để tràn viền 100% */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    
    /* Khoảng cách trên dưới */
    margin-top: 40px;
    margin-bottom: 60px;
    
    /* Tạo hình dáng */
    padding: 18px 0;
    overflow: hidden; /* Ẩn chữ chạy ra ngoài */
    transform: rotate(-1deg); /* Nghiêng nhẹ rất "Du Kích" */
    z-index: 5;
    
    /* Border trên dưới */
    border-top: 2px solid;
    border-bottom: 2px solid;
}

.marquee-track {
    display: flex;
    white-space: nowrap; /* Không xuống dòng */
    width: max-content; /* Chiều rộng bằng nội dung */
    animation: marquee-slide 25s linear infinite; /* Tốc độ chạy */
}

/* Item chữ bên trong */
.mq-item {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800; /* Chữ đậm */
    font-size: 1.2rem;
    text-transform: lowercase;
    letter-spacing: 0px;
    margin-right: 70px; /* Khoảng cách giữa các cụm từ */
    display: flex;
    align-items: center;
}

/* Ngôi sao */
.mq-star {
    margin-left: 55px;
    font-size: 1.4rem;
}

/* Animation chạy từ phải sang trái */
@keyframes marquee-slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* ======================================================
   THEME COLORS (MÀU SẮC)
   ====================================================== */

/* --- DARK MODE (Nền đen - Chữ trắng - Sao Xanh Neon) --- */
body.app-dark .marquee-wrapper {
    background-color: #000000;
    border-color: #ffffff; /* Viền trắng */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
body.app-dark .mq-item { color: #ffffff; }
body.app-dark .mq-star { 
    color: #00f2ff; /* Sao xanh neon */
    text-shadow: 0 0 10px #00f2ff;
}

/* --- LIGHT MODE (Nền trắng - Chữ đen - Sao Đỏ) --- */
body.app-light .marquee-wrapper {
    background-color: #ffffff;
    border-color: #000000; /* Viền đen */
}
body.app-light .mq-item { color: #000000; }
body.app-light .mq-star { color: #a9051f; /* Sao đỏ */ }

/* ======================================================
   RESPONSIVE (MOBILE)
   ====================================================== */
@media (max-width: 768px) {
    .mq-item {
        font-size: 1rem; /* Chữ nhỏ lại trên đt */
        margin-right: 30px;
    }
    .mq-star {
        font-size: 1.1rem;
        margin-left: 10px;
    }
    .marquee-wrapper {
        margin-top: 20px;
        margin-bottom: 40px;
        padding: 12px 0;
    }
}
.hero-cta.neo-hero-btn {
    /* 1. Thiết lập Flexbox ép buộc */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row !important; /* Luôn là hàng ngang */
    flex-wrap: nowrap !important;   /* Cấm tuyệt đối việc xuống dòng */
    
    /* 2. Reset các thuộc tính nền cũ */
    background: transparent;
    background-image: none !important;
    
    /* 3. Kích thước & Khoảng cách */
    gap: 15px; /* Khoảng cách giữa chữ và icon */
    padding: 12px 25px !important;
    width: auto !important; /* Chiều rộng tự nhiên theo nội dung */
    max-width: 90vw; /* Giới hạn chiều rộng tối đa 90% màn hình để không bị tràn */
    
    /* 4. Style Viền & Font */
    border: 3px solid !important;
    border-radius: 50px !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    
    /* 5. Animation */
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease;
}

/* --- XỬ LÝ PHẦN CHỮ (TEXT) --- */
.hero-cta.neo-hero-btn .btn-text {
    white-space: nowrap !important; /* Chữ luôn nằm 1 dòng */
    overflow: hidden;
    text-overflow: ellipsis; /* Nếu màn hình quá bé thì hiện dấu ... */
    flex-shrink: 1; /* Cho phép chữ co lại nếu cần thiết */
    font-size: 1rem; /* Kích thước chữ chuẩn */
}

/* --- XỬ LÝ PHẦN ICON (VÒNG TRÒN) --- */
.btn-icon-circle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Kích thước cố định */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important; /* Khóa cứng chiều rộng tối thiểu */
    
    border-radius: 50%;
    border: 2px solid currentColor;
    flex-shrink: 0 !important; /* QUAN TRỌNG: Không bao giờ cho phép icon bị bóp méo hay đẩy xuống */
    
    transition: all 0.3s ease;
}

/* --- RESPONSIVE MOBILE (Nếu màn hình quá nhỏ thì thu nhỏ chữ, chứ không cho rớt dòng) --- */
@media (max-width: 380px) {
    .hero-cta.neo-hero-btn .btn-text {
        font-size: 0.85rem !important; /* Thu nhỏ chữ lại */
    }
    .hero-cta.neo-hero-btn {
        padding: 10px 20px !important;
    }
}
/* ======================================================
   THEME COLORS
   ====================================================== */

/* --- LIGHT MODE (Trắng - Đen) --- */
body.app-light .hero-cta.neo-hero-btn {
    background-color: #ffffff;
    color: #000000;
    border-color: #000000;
    box-shadow: 6px 6px 0px 0px #000000; /* Bóng cứng màu đen */
}

body.app-light .hero-cta.neo-hero-btn:hover {
    background-color: #ff0000;
border-color: #ff0000;
    color: #ffffff;
    box-shadow: 2px 2px 0px 0px #000000; 
}

/* --- DARK MODE (Đỏ Neon nổi bật trên nền tối) --- */
body.app-dark .hero-cta.neo-hero-btn {
    background-color: #000000;
    color: #ffffff;
    border-color: #ff0055; /* Viền Đỏ Neon */
    /* Bóng cứng Đỏ Neon pha chút mờ */
    box-shadow: 6px 6px 0px 0px rgba(255, 0, 85, 0.6); 
    text-shadow: 0 0 5px rgba(255, 0, 85, 0.5);
}

body.app-dark .hero-cta.neo-hero-btn:hover {
    background-color: #ff0055; /* Nền chuyển thành Đỏ */
    color: #ffffff;
    border-color: #ff0055;
    box-shadow: 2px 2px 0px 0px rgba(255, 0, 85, 0.8);
    text-shadow: none;
}

body.app-dark .hero-cta.neo-hero-btn:hover .btn-icon-circle {
    background-color: #ffffff; /* Vòng tròn thành màu trắng */
    border-color: #ffffff;
    color: #ff0055; /* Mũi tên đỏ */
}
.hero-section {
    /* Giảm khoảng cách đỉnh đầu (Cũ là 80px) */
    padding-top: 40px !important; 
    
    /* Giảm khoảng cách dưới đáy (để gần Marquee hơn) */
    padding-bottom: 40px !important;
}

.hero-title {
    /* Giảm khoảng cách giữa Tiêu đề và dòng Tagline nhỏ */
    margin-bottom: 10px !important;
}

.section-subtitle {
    /* Giảm khoảng cách giữa Tagline và Nút bấm */
    margin-bottom: 30px !important;
}
/* Reset Grid cũ để phù hợp style mới */
#home .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive tự động */
    gap: 25px;
    padding: 10px;
}

/* --- 1. CẤU TRÚC THẺ (CARD BASE) --- */
#home .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 30px; 
    padding: 20px 0;
    width: 100%;
}

.neo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    height: 320px;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* QUAN TRỌNG: Nền mặc định phải đục để che cái bóng phía sau */
    background-color: var(--card-bg, #fff); 
    border: 2px solid transparent; 
    
    /* QUAN TRỌNG: z-index cao hơn pseudo-element */
    z-index: 2; 
    
    overflow: visible;
    --hover-color: #ff4d4d; 
}

/* LỚP BÓNG XÒE (NẰM DƯỚI) */
.neo-card::before {
    content: '';
    position: absolute;
    inset: 0; 
    border-radius: 24px;
    
    /* QUAN TRỌNG: z-index âm để nằm dưới */
    z-index: -1; 
    
    background-color: var(--hover-color);
    transform: rotate(0deg);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- HIỆU ỨNG HOVER --- */
.neo-card:hover {
    transform: translateY(-10px);
    border-color: var(--hover-color) !important;
}

.neo-card:hover::before {
    opacity: 1; /* Hiện rõ */
    transform: rotate(6deg) translate(10px, 0px); /* Xòe ra sau */
    box-shadow: 0 0 15px var(--hover-color);
}

/* --- MÀU SẮC & TEXT (FIX LỖI KHÓ ĐỌC) --- */

/* 1. LIGHT MODE */
body.app-light .neo-card {
    --card-bg: #ffffff; /* Nền trắng */
    border-color: #e5e7eb;
    color: #111827; /* Chữ đen */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* 2. DARK MODE */
body.app-dark .neo-card {
    --card-bg: #111111; /* Nền đen */
    border-color: #333;
    color: #ffffff; /* Chữ trắng (Fix lỗi chữ tối màu) */
}

/* --- KHI HOVER: GIỮ NGUYÊN MÀU TEXT ĐỂ DỄ ĐỌC --- */
.neo-card:hover h3, 
.neo-card:hover p,
.neo-card:hover .card-tag {
    /* Không đổi màu chữ sang trắng/đen nữa, giữ nguyên màu gốc của theme */
    color: inherit !important; 
}

/* Chỉ đổi màu các thành phần trang trí sang Neon */
.neo-card:hover .card-arrow,
.neo-card:hover .card-tag {
    color: var(--hover-color) !important;
    opacity: 1;
    font-weight: 800;
}

.neo-card:hover .card-icon-box {
    border-color: var(--hover-color);
    color: var(--hover-color);
    background-color: rgba(255, 255, 255, 0.05); /* Nền mờ nhẹ cho icon */
}

/* --- STYLE CÁC PHẦN TỬ CON --- */
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.card-footer { margin-top: auto; display: flex; justify-content: flex-end; }

.card-icon-box {
    width: 45px; height: 45px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(128,128,128,0.2);
    font-size: 1.2rem;
    transition: 0.3s;
}

.card-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem; font-weight: 700; opacity: 0.6;
    text-transform: uppercase; letter-spacing: 1px;
    transition: 0.3s;
}

.card-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; line-height: 1.3;
}
.card-body p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem; line-height: 1.5; font-style: italic; opacity: 0.8;
}
.card-arrow { font-size: 1.5rem; transition: 0.3s; }
.neo-card:hover .card-arrow { transform: translateX(5px); }

#main-app-wrapper .container {
    /* QUAN TRỌNG: Bỏ !important ở đây để JS có thể ẩn/hiện container được */
    display: grid; 
    
    /* Các dòng dưới giữ nguyên !important để đảm bảo layout đẹp */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 30px !important;
    padding: 20px 0 !important;
    width: 100%;
}
#random-test-card, 
#random-passage-card, 
#random-lesson-card, 
#random-listening-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    min-height: 320px !important; /* Chiều cao bằng các thẻ khác */
    border-radius: 24px !important;
    padding: 30px !important;
    cursor: pointer !important;
    transition: transform 0.3s ease !important;
}

/* Hover chung: Bay lên nhẹ */
#random-test-card:hover, 
#random-passage-card:hover, 
#random-lesson-card:hover, 
#random-listening-card:hover {
    transform: translateY(-5px) !important;
}

/* ------------------------------------------------------
   DARK MODE (NỀN TỐI - VIỀN NEON - CHỮ NEON)
   ------------------------------------------------------ */
body.app-dark #random-test-card, 
body.app-dark #random-passage-card, 
body.app-dark #random-lesson-card, 
body.app-dark #random-listening-card {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
    border: 1px solid var(--neon-blue) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1) !important;
}

/* Màu chữ tiêu đề & icon bên trong */
body.app-dark #random-test-card *, 
body.app-dark #random-passage-card *, 
body.app-dark #random-lesson-card *, 
body.app-dark #random-listening-card * {
    color: var(--neon-blue) !important;
}

/* Màu chữ mô tả (nhạt hơn chút) */
body.app-dark #random-test-card p, 
body.app-dark #random-passage-card p, 
body.app-dark #random-lesson-card p, 
body.app-dark #random-listening-card p {
    color: #94a3b8 !important;
}

/* Nút bấm (Khi đã click ra kết quả) */
body.app-dark #random-test-card .card-button, 
body.app-dark #random-passage-card .card-button, 
body.app-dark #random-lesson-card .card-button, 
body.app-dark #random-listening-card .card-button {
    background: var(--neon-blue) !important;
    color: #000 !important; /* Chữ đen trên nền xanh */
    border: none !important;
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
}

/* ------------------------------------------------------
   LIGHT MODE (GRADIENT ĐỎ - CHỮ TRẮNG)
   ------------------------------------------------------ */
body.app-light #random-test-card, 
body.app-light #random-passage-card, 
body.app-light #random-lesson-card, 
body.app-light #random-listening-card {
    background: linear-gradient(135deg, #a9051f, #d90429) !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(169, 5, 31, 0.3) !important;
}

/* Tất cả chữ bên trong màu trắng */
body.app-light #random-test-card *, 
body.app-light #random-passage-card *, 
body.app-light #random-lesson-card *, 
body.app-light #random-listening-card * {
    color: white !important;
}

/* Nút bấm (Màu trắng chữ đỏ) */
body.app-light #random-test-card .card-button, 
body.app-light #random-passage-card .card-button, 
body.app-light #random-lesson-card .card-button, 
body.app-light #random-listening-card .card-button {
    background: white !important;
    color: #a9051f !important;
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
}

/* 1. Cấu trúc thẻ Vocab (Chỉ có ảnh) */
.neo-vocab-card {
    position: relative;
    display: block;
    height: 320px;
    border-radius: 24px;
    text-decoration: none;
    
    /* Viền trong suốt để hiện màu Neon khi hover */
    border: 3px solid transparent; 
    
    /* Quan trọng: Để chứa các lớp con tuyệt đối */
    isolation: isolate; 
    overflow: visible; 
    
    /* Biến màu mặc định */
    --hover-color: #ff4d4d;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Bỏ background ở thẻ cha */
    background: transparent !important;
}

/* 1. LỚP ẢNH NỀN (CLASS MỚI) */
.neo-vocab-img {
    position: absolute;
    inset: 0; /* Full khung */
    border-radius: 20px; /* Nhỏ hơn viền cha một xíu cho đẹp */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Nằm trên cái bóng (z-index 0 hoặc 1) */
    z-index: 1; 
}

/* 2. LỚP BÓNG XÒE SAU LƯNG (::before của thẻ cha) */
.neo-vocab-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    
    /* Nằm dưới cùng */
    z-index: -1; 
    
    background-color: var(--hover-color);
    opacity: 0;
    transition: all 0.3s ease;
}

/* 3. LỚP FOOTER BLUR CHỨA TEXT (::after của thẻ cha) */
.neo-vocab-card::after {
    content: 'LÀM NGAY →';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px; 
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    
    /* Hiệu ứng kính mờ */
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.6), transparent);
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
    
    display: flex;
    align-items: center; 
    justify-content: center; 
    padding-top: 10px; 
    
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    
    /* Nằm trên cùng (trên cả ảnh) */
    z-index: 2;
    
    opacity: 0;
    transform: translateY(20px); 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none; /* Để chuột xuyên qua */
}

/* --- HIỆU ỨNG KHI HOVER --- */

.neo-vocab-card:hover {
    transform: translateY(-10px);
    border-color: var(--hover-color);
}

/* Bóng phía sau xòe ra */
.neo-vocab-card:hover::before {
    opacity: 1;
    transform: rotate(5deg) translate(8px, 2px);
    box-shadow: 0 0 20px var(--hover-color);
}

/* Footer trượt lên */
.neo-vocab-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* --- SHADOW TĨNH CHO ẢNH --- */
/* Áp dụng shadow lên class ảnh thay vì thẻ cha */
body.app-dark .neo-vocab-img { box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
body.app-light .neo-vocab-img { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
body.app-light .button-group .hero-cta.neo-hero-btn:hover {
    background-color: #ff0000 !important;
    border-color: #ff0000 !important;
    color: #ffffff !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
    transform: translate(-2px, -2px) !important; /* Đồng bộ hiệu ứng nhích lên */
}
/* --- 1. MẶC ĐỊNH TRÊN PC (Giữ nguyên style cũ của bạn) --- */
.hamburger-icon, #mobile-drawer, #mobile-overlay-bg {
    display: none; /* Ẩn hết mấy cái mobile đi */
}

/* --- 2. CHỈ KHI VÀO ĐIỆN THOẠI (Dưới 900px) --- */
@media screen and (max-width: 900px) {
    /* Ẩn menu cũ */
    #desktop-nav {
        display: none !important;
    }

    /* Chỉnh lại Header cho gọn */
    .main-header {
        justify-content: space-between;
        padding: 10px 20px;
        align-items: center;
    }

    /* Hiện nút 3 gạch */
    .hamburger-icon {
        display: block;
        font-size: 30px;
        cursor: pointer;
        color: var(--text-color, #333);
    }

    /* LỚP NỀN TỐI (20% còn lại) */
    #mobile-overlay-bg {
        display: block;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background: rgba(0,0,0,0.5); /* Đen mờ */
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
    }
    #mobile-overlay-bg.active {
        opacity: 1; visibility: visible;
    }

    /* KHUNG MENU MOBILE (CHE 80%) */
    #mobile-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; right: 0; /* Hiện ra từ bên phải */
        width: 80%; /* YÊU CẦU CỦA BẠN: CHE 80% */
        height: 100vh;
        background-color: #fff; /* Nền trắng đặc */
        z-index: 999;
        transform: translateX(100%); /* Giấu sang bên phải */
        transition: transform 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    #mobile-drawer.open {
        transform: translateX(0); /* Trượt ra */
    }

    /* Style bên trong menu mobile */
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #eee;
    }
    .drawer-header h3 { margin: 0; font-size: 1.2rem; }
    .close-btn { font-size: 30px; cursor: pointer; }

    .drawer-content {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        overflow-y: auto;
    }

    .drawer-link {
        background: none; border: none;
        text-align: left;
        font-size: 1.1rem;
        padding: 10px;
        border-radius: 8px;
        text-decoration: none;
        color: #333;
        font-weight: 500;
        cursor: pointer;
    }
    .drawer-link:hover { background-color: #f5f5f5; }

    /* DARK MODE CHO MOBILE */
    body.app-dark .hamburger-icon { color: white; }
    body.app-dark #mobile-drawer { background-color: #1e1e1e; color: white; }
    body.app-dark .drawer-header { border-bottom: 1px solid #333; }
    body.app-dark .drawer-link { color: #eee; }
    body.app-dark .drawer-link:hover { background-color: #333; }
}
/* --- GLOBAL PAGE HERO BANNER (Dùng chung cho các trang con) --- */
.page-hero-banner {
    width: 100%;
    height: 300px;
    
    /* 1. Xử lý ảnh nền: */
    /* Lớp phủ đen mờ để chữ dễ đọc hơn */
    background-image: url('portfolio.jpg');
    
    /* QUAN TRỌNG: Giúp ảnh không bị méo (stretch) */
    background-size: cover; 
    
    /* QUAN TRỌNG: Luôn lấy tâm giữa của ảnh */
    background-position: center center;
    
    background-repeat: no-repeat;
    border-radius: 24px;
    margin-bottom: 40px;
    
    /* Căn nút bấm xuống dưới giữa */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
}

/* --- Style cho nút bấm chung --- */
.page-hero-btn {
    background-color: #b50033;
    color: white !important; /* Force màu trắng */
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none; /* Bỏ gạch chân vì là thẻ a */
    box-shadow: 0 4px 15px rgba(181, 0, 51, 0.5);
    transition: all 0.3s ease;
    display: inline-block;
    transform: translateY(0);
}

.page-hero-btn:hover {
    background-color: #d6003d;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(181, 0, 51, 0.7);
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .page-hero-banner {
        height: 200px; /* Mobile thu gọn chiều cao */
        border-radius: 16px;
    }
    .page-hero-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}