:root {
    /* Premium Color Palette - Deep Space & PRO Neon */
    --space-black: #050505;
    --deep-space: #0b0d17;
    --void-dark: #020204;

    --nasa-blue: #0b3d91;
    --electric-blue: #2D6CDF;
    --neon-cyan: #00f3ff;
    --hologram-cyan: rgba(0, 243, 255, 0.15);

    --gseb-theme: #00f3ff;
    /* Cyan for GSEB */
    --cbse-theme: #ff0055;
    /* Hot Pink/Red for CBSE */

    --nasa-red: #fc3d21;
    --alert-red: #ff2a2a;

    --star-white: #ffffff;
    --starlight-dim: rgba(255, 255, 255, 0.7);
    --text-secondary: #a0c4ff;

    /* Advanced Glassmorphism */
    --glass-bg: rgba(11, 13, 23, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* More subtle */
    --glass-shine: rgba(255, 255, 255, 0.03);
    --hud-border: rgba(0, 243, 255, 0.4);

    /* Typography */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Shadows & Glows */
    --neon-glow: 0 0 15px rgba(0, 243, 255, 0.4), 0 0 30px rgba(0, 243, 255, 0.1);
    --cbse-glow: 0 0 15px rgba(255, 0, 85, 0.4), 0 0 30px rgba(255, 0, 85, 0.1);
    --box-shadow-lg: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--space-black);
    /* Dynamic moving background */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(11, 61, 145, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(252, 61, 33, 0.1) 0%, transparent 40%),
        radial-gradient(1px 1px at 20% 30%, white 1px, transparent 0),
        radial-gradient(1px 1px at 40% 70%, white 1px, transparent 0),
        radial-gradient(1px 1px at 60% 10%, white 1px, transparent 0),
        radial-gradient(1px 1px at 80% 50%, white 1px, transparent 0);
    background-size: 100% 100%, 100% 100%, 300px 300px, 400px 400px, 500px 500px, 600px 600px;
    background-attachment: fixed;
    color: var(--star-white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--void-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--nasa-blue), var(--electric-blue));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* Layout */
.app-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    perspective: 1200px;
}

/* --- LANDING PAGE --- */
.landing-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    /* Flex by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    animation: fadeIn 1s ease-out;
}

.landing-content {
    text-align: center;
    width: 100%;
}

.brand-logo-large {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 243, 255, 0.5));
    animation: float 6s ease-in-out infinite;
    margin-bottom: 2rem;
}

.brand-text-large h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 8px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, #b0c7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(11, 61, 145, 0.6);
    margin: 0;
}

.brand-text-large p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    margin-top: 1rem;
    text-transform: uppercase;
}

.signature-text-large {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1.5rem;
}

/* --- LANDING PORTAL MASTER WRAPPER --- */
.landing-portal-wrap {
    width: 100%;
    max-width: 860px;
    margin: 2.2rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
    box-sizing: border-box;
    padding: 0 10px;
}

/* BOARD BUTTONS */
.board-selection-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 100%;
    margin: 0;
}

.board-btn {
    border: none;
    border-radius: 20px;
    padding: 2.5px;
    background: transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    width: 100%;
    text-align: left;
}

.board-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2.5px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.gseb-btn {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.25), rgba(11, 61, 145, 0.5));
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.15);
}

.cbse-btn {
    background: linear-gradient(135deg, rgba(255, 0, 85, 0.25), rgba(120, 10, 40, 0.5));
    box-shadow: 0 4px 20px rgba(255, 0, 85, 0.15);
}

.board-btn .btn-content {
    background: rgba(6, 6, 12, 0.95);
    border-radius: 17.5px;
    padding: 1.4rem 1.4rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    height: 100%;
    box-sizing: border-box;
    transition: background 0.3s;
}

.board-btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.board-arrow-indicator {
    font-size: 1.1rem;
    color: #64748b;
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gseb-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 243, 255, 0.25);
}

.cbse-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 0, 85, 0.25);
}

.gseb-btn:hover .board-arrow-indicator {
    color: var(--neon-cyan);
    transform: translateX(4px);
}

.cbse-btn:hover .board-arrow-indicator {
    color: #ff0055;
    transform: translateX(4px);
}

.btn-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    flex-shrink: 0;
}

.btn-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.gseb-btn .btn-title {
    color: var(--gseb-theme);
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.cbse-btn .btn-title {
    color: var(--cbse-theme);
    text-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
}

.btn-subtitle {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- MAIN DASHBOARD (Enhanced) --- */
.main-card {
    width: 100%;
    max-width: 1000px;
    background: radial-gradient(circle at top left, rgba(20, 20, 40, 0.7), rgba(11, 13, 23, 0.7));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--box-shadow-lg),
        0 0 0 1px var(--glass-shine) inset;
    position: relative;
    overflow: hidden;
    animation: zoomIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-home-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.back-home-btn:hover {
    background: var(--nasa-blue);
    color: white;
    border-color: var(--neon-cyan);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2.5rem;
    margin-top: -0.5rem;
}

.brand-logo {
    width: 70px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.3));
    margin-bottom: 0.8rem;
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(180deg, #fff 0%, #b0c7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text p {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-top: 5px;
    opacity: 0.8;
}

/* --- STORE PROMO CARD --- */
.store-promo-card {
    background: linear-gradient(135deg, rgba(11, 61, 145, 0.4), rgba(0, 243, 255, 0.1));
    border: 1px solid var(--neon-cyan);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
    animation: glow-pulse 3s infinite alternate;
}

.store-promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0.5;
    animation: rotate-shine 10s linear infinite;
    pointer-events: none;
}

.promo-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    gap: 2rem;
}

.promo-text-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.promo-badge {
    background: var(--neon-cyan);
    color: black;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    width: fit-content;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.promo-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: white;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    line-height: 1.3;
}

.promo-btn {
    background: linear-gradient(90deg, #ff9100, #ff5500);
    color: white;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 50px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 5px 15px rgba(255, 85, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.promo-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 85, 0, 0.6);
    background: linear-gradient(90deg, #ffaa00, #ff6600);
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
        border-color: rgba(0, 243, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
        border-color: var(--neon-cyan);
    }
}

@keyframes rotate-shine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsiveness for Promo Card */
@media (max-width: 768px) {
    .promo-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .promo-badge {
        margin: 0 auto;
    }

    .promo-btn {
        width: 100%;
        justify-content: center;
    }
}


/* Form Controls - Super Polished */
.controls-grid {
    display: grid;
    grid-template-columns: 45% 55%;
    /* Asymmetric for better flow */
    gap: 3rem;
}

.control-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    transition: all 0.3s;
}

.control-group label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-left: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Specific styling for Board Select inside Dashboard */
#board-select {
    font-weight: 700;
    letter-spacing: 1px;
}

input,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    color: var(--star-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(11, 61, 145, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 243, 255, 0.15);
    transform: translateY(-2px);
}

/* Chapter Cards - The "Grid" */
.chapter-container {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Fainter border */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chapter-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-header label {
    font-size: 0.85rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
    /* prevent shadow crop */
}

/* Custom Scrollbar for Grid */
.chapter-grid::-webkit-scrollbar {
    width: 5px;
}

.chapter-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.chapter-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.chapter-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.chapter-card.selected {
    background: linear-gradient(135deg, rgba(11, 61, 145, 0.6), rgba(0, 243, 255, 0.1));
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.chapter-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--text-secondary);
    appearance: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
}

.chapter-card input:checked {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.chapter-card input:checked::after {
    content: '✔';
    position: absolute;
    color: black;
    font-size: 14px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.chapter-card label {
    cursor: pointer;
    line-height: 1.3;
    font-weight: 500;
    color: var(--starlight-dim);
}

.chapter-card.selected label {
    color: white;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}


/* Generate Panel */
.btn-primary {
    background: linear-gradient(90deg, var(--nasa-blue) 0%, rgba(6, 6, 12, 1) 100%);
    border: 1px solid var(--neon-cyan);
    padding: 1.2rem;
    border-radius: 16px;
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.4s;
    width: 100%;
    margin-top: 3rem;
    text-transform: uppercase;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.6s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.2);
    white-space: normal;
    /* Allow wrap if really needed, but usually single line */
    line-height: 1.2;
}


/* Dropdown Options Coloring */
select option {
    background-color: var(--deep-space);
    color: var(--star-white);
    padding: 10px;
}


/* Community Links - Enhanced Buttons */
.community-links {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.community-links h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

/* New Social Button Style - Pill Shape with Text */
.social-btn-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-btn-pill i {
    font-size: 1.2rem;
}

.social-btn-pill:hover {
    background: var(--nasa-blue);
    color: white;
    border-color: var(--neon-cyan);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

/* Specific Brand Colors on Hover (Optional, or keep uniform theme) */
.social-btn-pill.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.social-btn-pill.telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
    box-shadow: 0 5px 15px rgba(0, 136, 204, 0.3);
}

.social-btn-pill.youtube:hover {
    background: #FF0000;
    border-color: #FF0000;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.social-btn-pill.instagram:hover {
    background: #C13584;
    border-color: #C13584;
    box-shadow: 0 5px 15px rgba(193, 53, 132, 0.3);
}


/* Footer */
.footer-info {
    margin-top: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Missing Highlight Name Animation */
.highlight-name {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-weight: 800;
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
    }

    100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
}

/* Dropdown Fixes - Force Colors */
select {
    background-color: rgba(0, 0, 0, 0.4) !important;
    color: white !important;
}

select option {
    background-color: #0b0d17 !important;
    /* Deep space dark */
    color: white !important;
    padding: 12px;
}

/* Removed old chapter-actions styles to use new definition below */

.btn-xs {
    background: rgba(11, 61, 145, 0.2);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: 700;
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.1);
}

.btn-xs:hover {
    background: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
    transform: translateY(-1px);
}

#deselectAllBtn {
    border-color: var(--nasa-red);
    color: var(--nasa-red);
    box-shadow: 0 0 5px rgba(252, 61, 33, 0.1);
}

#deselectAllBtn:hover {
    background: var(--nasa-red);
    color: white;
    box-shadow: 0 0 15px rgba(252, 61, 33, 0.4);
}


/* --- NEW V4: Option Cards UI --- */
.option-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.option-card.active {
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.1), rgba(0, 0, 0, 0));
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15) inset;
}

.card-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
    width: 40px;
    display: flex;
    justify-content: center;
}

.option-card.active .card-icon {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: white;
    letter-spacing: 1px;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.3s;
}

.option-card.active .card-status {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
        margin-top: 50px;
    }

    to {
        opacity: 1;
        transform: scale(1);
        margin-top: 0;
    }
}

/* Responsiveness */
@media (max-width: 900px) {
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-card {
        padding: 2rem;
        max-width: 600px;
    }

    .chapter-grid {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .landing-portal-wrap {
        margin-top: 1.4rem;
        gap: 0.9rem;
        padding: 0 8px;
    }

    .board-selection-buttons {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .board-btn .btn-content {
        padding: 1.1rem 1.2rem;
    }

    .brand-logo-large {
        width: 85px;
        margin-bottom: 0.8rem;
    }

    .brand-text-large h1 {
        font-size: 1.7rem;
        letter-spacing: 2px;
    }

    .brand-text-large p {
        font-size: 0.82rem;
        letter-spacing: 1px;
    }

    .signature-text-large {
        font-size: 0.92rem;
        margin-top: 0.6rem;
    }

    .home-scanner-banner {
        padding: 1rem 1.1rem;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 12px;
    }

    .home-scanner-left {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .scanner-cta-badge {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
    }

    .landing-app-promo {
        padding: 1rem 1.1rem;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .app-promo-left {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .playstore-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        padding: 10px;
    }

    .input-wrapper {
        margin-bottom: 0.5rem;
    }

    .main-card {
        padding: 1.5rem;
    }

    .btn-primary {
        font-size: 1rem;
        padding: 1rem;
    }

    /* Mobile Scanner Modal Adjustments */
    .home-scanner-card {
        max-height: 96vh;
        width: 98vw;
        border-radius: 10px;
        padding: 10px;
    }

    .home-step-tab {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .home-video-container {
        height: 210px;
    }
}

/* --- STANDALONE HOME SCREEN OMR SCANNER BANNER --- */
.home-scanner-banner {
    width: 100%;
    background: linear-gradient(135deg, rgba(11, 61, 145, 0.45), rgba(0, 243, 255, 0.12));
    border: 1.5px solid rgba(0, 243, 255, 0.4);
    border-radius: 18px;
    padding: 1.1rem 1.4rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-sizing: border-box;
}

.home-scanner-banner:hover {
    transform: translateY(-3px);
    border-color: var(--neon-cyan);
    box-shadow: 0 8px 30px rgba(0, 243, 255, 0.35);
    background: linear-gradient(135deg, rgba(11, 61, 145, 0.6), rgba(0, 243, 255, 0.2));
}

.home-scanner-left {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.scanner-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(0, 243, 255, 0.15);
    border: 1.5px solid var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--neon-cyan);
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.scanner-banner-title {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.scanner-banner-sub {
    font-size: 0.76rem;
    color: #cbd5e1;
    margin-top: 3px;
    line-height: 1.35;
}

.scanner-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid var(--neon-cyan);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.home-scanner-banner:hover .scanner-cta-badge {
    background: var(--neon-cyan);
    color: #000;
    transform: translateX(3px);
}

/* NPG App Promo Full-Width Card */
.landing-app-promo {
    width: 100%;
    background: rgba(6, 6, 14, 0.85);
    border: 1px solid rgba(0, 243, 255, 0.25);
    border-radius: 18px;
    padding: 1rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    box-sizing: border-box;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    text-align: left;
}

.app-promo-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.app-promo-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.app-promo-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    color: #fff;
    letter-spacing: 0.5px;
    margin: 0;
}

.app-promo-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
    line-height: 1.3;
}

.playstore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #000;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 6px 16px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
    flex-shrink: 0;
}

.playstore-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 6px 20px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.playstore-btn i {
    font-size: 1.4rem;
    color: #00f3ff;
}

.playstore-btn-text {
    text-align: left;
    line-height: 1.15;
}

.playstore-sub {
    font-size: 0.6rem;
    color: #aaa;
    text-transform: uppercase;
    display: block;
    letter-spacing: 0.5px;
}

.playstore-main {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Home Scanner Modal */
.home-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 2, 4, 0.88);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.home-scanner-card {
    background: #0b0d17;
    border: 1.5px solid rgba(0, 243, 255, 0.4);
    box-shadow: 0 0 35px rgba(0, 243, 255, 0.25);
    border-radius: 14px;
    width: 100%;
    max-width: 900px;
    max-height: 94vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.home-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 243, 255, 0.05);
}

.home-scanner-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-step-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0,0,0,0.3);
}

.home-step-tab {
    flex: 1;
    padding: 10px 14px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.home-step-tab.active {
    color: var(--neon-cyan);
    border-bottom: 2px solid var(--neon-cyan);
    background: rgba(0, 243, 255, 0.08);
}

.home-active-key-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(22, 163, 74, 0.2);
    border: 1px solid #16a34a;
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.home-video-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 280px;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #334155;
}

.home-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-guide-overlay {
    position: absolute;
    inset: 10px;
    border: 1.5px dashed rgba(0, 243, 255, 0.6);
    border-radius: 6px;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    color: var(--neon-cyan);
    font-size: 0.75rem;
    font-weight: bold;
    text-shadow: 0 1px 4px #000;
}

.home-reticle-box {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 3px solid #00f3ff;
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.8);
    border-radius: 3px;
}

.home-reticle-box.tl { top: 6px; left: 6px; }
.home-reticle-box.tr { top: 6px; right: 6px; }
.home-reticle-box.bl { bottom: 6px; left: 6px; }
.home-reticle-box.br { bottom: 6px; right: 6px; }

.manual-key-matrix-wrap {
    max-height: 240px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
}

.matrix-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.76rem;
}

.matrix-btn-group {
    display: flex;
    gap: 2px;
}

.matrix-opt-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #475569;
    background: #0f172a;
    color: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.matrix-opt-btn.selected {
    background: var(--neon-cyan);
    color: #000;
    border-color: #fff;
    font-weight: 900;
}

/* Mobile Responsive Optimizations for Home OMR Scanner */
@media (max-width: 768px) {
    .home-scanner-card {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 94vh !important;
        margin: 10px auto;
        border-radius: 12px;
    }

    .home-scanner-header {
        padding: 10px 12px;
    }

    .home-scanner-header h3 {
        font-size: 0.88rem;
    }

    .home-step-tabs {
        flex-direction: row;
    }

    .home-step-tab {
        padding: 8px 6px;
        font-size: 0.72rem;
    }

    .home-video-container {
        width: 100%;
        max-width: 100%;
        height: 220px;
    }

    .score-badge-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .score-badge {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .eval-table-wrap {
        max-height: 200px;
        overflow-y: auto;
    }

    .manual-key-matrix-wrap {
        max-height: 200px;
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}