/* assets/css/style.css */

/* Override Bootstrap Icons to add font-display: swap */
@font-face {
    font-family: "bootstrap-icons";
    src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/fonts/bootstrap-icons.woff2?1fa40e8") format("woff2"),
        url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/fonts/bootstrap-icons.woff?1fa40e8") format("woff");
    font-display: swap;
}

:root {
    /* Brand Colors - Standard Light Theme */
    --brand-primary: #4e54c8;
    --brand-secondary: #ffc107;
    --brand-accent: #00d2ff;
    --brand-accent-alt: #ff6b6b;
    --brand-dark: #212529;
    --brand-light: #f8f9fa;
    --text-main: #2c3e50;
    --text-muted: #596169;
    /* Darkened from 6c757d for AAA contrast */

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-cta: linear-gradient(to right, #4e54c8, #8f94fb);
    --gradient-text: linear-gradient(45deg, #4e54c8, #764ba2);
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
    overflow-x: hidden;
    text-rendering: optimizeSpeed;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--brand-dark);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    background-color: transparent;
}

.navbar.sticky-scrolled {
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--brand-primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--brand-dark);
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-primary) !important;
}

/* Buttons */
.btn-primary {
    background: var(--brand-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    background-color: #003399;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 35, 102, 0.3);
}

.btn-outline-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-cta-gradient {
    background: var(--gradient-cta);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-cta-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 114, 255, 0.4);
    color: white;
}

/* Hero Section */
.hero-section {
    padding: 1rem 0 1rem;
    /* Aggressively reduced for mobile */
    background: #f8f9fa;
    overflow: hidden;
}

@media (min-width: 992px) {
    .hero-section {
        padding: 3rem 0 1rem;
    }
}

.hero-img {
    max-width: 100%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Feature Cards */
.feature-card {
    border: none;
    border-radius: 15px;
    padding: 2rem;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--brand-primary);
    background: rgba(78, 84, 200, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Custom Modal Close Button */
.modal-header .btn-close {
    background-color: #f1f3f5;
    opacity: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0.5rem;
    margin: 0;
    position: absolute;
    right: 20px;
    top: 20px;
    transition: all 0.2s;
    /* Use default Bootstrap close icon (black) */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236c757d'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
}

.modal-header .btn-close:hover {
    transform: rotate(90deg);
    background-color: #e9ecef;
}

/* Category Cards */
.category-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.category-header {
    height: 100px;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* Steps / How It Works */
.step-item {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-icon-circle {
    width: 80px;
    height: 80px;
    background: var(--brand-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 198, 255, 0.4);
}

/* Stats Section */
.stats-section {
    background: var(--gradient-hero);
    color: white;
    padding: 4rem 0;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}



/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
/* Combined below */

/* Footer */
footer {
    background-color: #ffffff;
    color: var(--text-muted);
    padding: 4rem 0 2rem;
    border-top: 1px solid #e9ecef;
}

footer h5 {
    color: var(--brand-dark);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--brand-primary);
}

.social-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* Utilities */
.section-padding {
    padding: 2rem 0;
    /* Reduced from 5rem */
}

@media (max-width: 991px) {
    .section-padding {
        padding: 0.5rem 0;
        /* Minimal section padding for mobile */
    }
}


.bg-light-soft {
    background-color: #f9faff;
}

/* Header spacing for fixed navbar */
.mt-header-offset,
.mt-header-offset-large {
    margin-top: 60px;
    /* Reduced from 80px */
}

@media (max-width: 991px) {
    .mt-header-offset {
        margin-top: 10px;
        /* Minimal header offset for mobile (Practice Page) */
    }

    .mt-header-offset-large {
        margin-top: 80px;
        /* Safe offset for content pages (Result Page) */
    }
}

/* =========================================
   Game Theme Styling (Brand Glassmorphism)
   ========================================= */
:root {
    --game-glass-border: rgba(255, 255, 255, 0.3);
    --game-glass-inner: rgba(0, 0, 0, 0.25);
    /* Subtle smooth darken, NOT black */
    --game-brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --game-accent: #00d2ff;
    --game-blue: #4e54c8;
    --game-blue-light: #5f66e0;
}

.game-container {
    background: var(--game-brand-gradient);
    /* Matches Site Hero exactly */
    border-radius: 20px;
    padding: 2.5rem 1rem;
    position: relative;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 20px 50px rgba(78, 84, 200, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Background Ornament (Optional Shine) */
.game-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* Question Box */
.game-question-wrapper {
    position: relative;
    z-index: 10;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
    animation: cyanBluePulse 2s infinite alternate;
}

/* User Requested Cyan/Blue Glow */
@keyframes cyanBluePulse {
    0% {
        filter: drop-shadow(0 0 25px rgba(0, 255, 255, 0.6)) drop-shadow(0 0 50px rgba(0, 100, 255, 0.2));
    }

    100% {
        filter: drop-shadow(0 0 35px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 60px rgba(0, 100, 255, 0.4));
    }
}

.game-hex-shape {
    /* Trending: Neon Gradient w/ Glow */
    background: linear-gradient(135deg, #00d2ff, #bc13fe);
    position: relative;
    padding: 3px;
    clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
    transition: transform 0.3s;
    animation: cyanBluePulse 2s infinite alternate;
}

.game-hex-inner {
    background: rgba(30, 20, 60, 0.85);
    /* Deep Purple Glass (No Black) */
    padding: 1.5rem 2rem;
    clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.game-question-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Options Grid */
.game-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .game-options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

.game-option-btn {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-option-btn:hover {
    transform: scale(1.03);
}

.game-option-bg {
    /* Neon Gradient match */
    background: linear-gradient(135deg, #00d2ff, #bc13fe);
    padding: 3px;
    clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
    animation: cyanBluePulse 2s infinite alternate;
}

.game-option-inner {
    background: var(--game-glass-inner);
    clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
    padding: 1.2rem 2.5rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
    min-height: 70px;
    transition: background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Very subtle internal border */
}

/* Selected State */
.game-option-btn.selected .game-option-inner {
    background: #ffffff;
    color: #4e54c8;
    /* Brand Purple Text */
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.game-option-btn.selected .game-option-bg {
    background: #ffffff;
    filter: drop-shadow(0 0 10px #ffffff);
}

.game-option-btn.selected .game-option-badge {
    color: #4e54c8;
    background: transparent;
    text-shadow: none;
}

.game-option-badge {
    display: inline-block;
    color: var(--game-accent);
    /* Cyan pop */
    font-weight: 900;
    margin-right: 15px;
    font-size: 1.4rem;
    text-transform: uppercase;
}

/* Timer & HUD */
.game-hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--game-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}



/* Lifeline / Controls (Bottom) */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    /* Reduced from 3rem */
    z-index: 10;
    position: relative;
    padding-bottom: 1rem;
}

.btn-premium {
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    border: none;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.4);
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(78, 84, 200, 0.6);
    background: #3b42b5;
    color: #fff;
}

.btn-premium:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #9ca3af;
    box-shadow: none;
}

.btn-premium.btn-submit {
    background: #10b981;
    /* Green */
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-premium.btn-submit:hover {
    background: #059669;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

/* --------------------------------
   Module 2: MCQ Quiz Styles
   -------------------------------- */

/* Quiz Setup Card */
.quiz-setup-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.setup-header {
    background: var(--gradient-hero);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
}

/* Quiz Options */
.quiz-option-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.quiz-option-card:hover {
    border-color: var(--brand-secondary);
    background-color: #f8f9fa;
}

.quiz-option-card.selected {
    border-color: var(--brand-primary);
    background-color: #f3f4ff;
    box-shadow: 0 4px 12px rgba(78, 84, 200, 0.15);
}

.quiz-option-card.correct {
    border-color: #28a745;
    background-color: #e8f5e9;
}

.quiz-option-card.wrong {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.option-badge {
    width: 35px;
    height: 35px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 1rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.quiz-option-card.selected .option-badge {
    background: var(--brand-primary);
    color: white;
}

.quiz-option-card.correct .option-badge {
    background: #28a745;
    color: white;
}

.quiz-option-card.wrong .option-badge {
    background: #dc3545;
    color: white;
}

/* Navigation & Palette */
.quiz-palette .q-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #dee2e6;
    margin: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quiz-palette .q-num:hover {
    border-color: var(--brand-primary);
}

.quiz-palette .q-num.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.quiz-palette .q-num.answered {
    background: #e3f2fd;
    border-color: #90caf9;
    color: #1976d2;
}

.quiz-palette .q-num.active.answered {
    background: var(--brand-primary);
    color: white;
}

/* Result Page */
.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    border: 5px solid var(--brand-primary);
}

.review-card {
    border-left: 5px solid #dee2e6;
}

.review-card.correct-answer {
    border-left-color: #28a745;
}

.review-card.wrong-answer {
    border-left-color: #dc3545;
}

.difficulty-badge {
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: monospace;
    font-size: 1.5rem;
    color: #E65100;
    /* Orange/Red for urgency */
}

/* Lifeline / Controls (Bottom) */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    z-index: 10;
    position: relative;
    padding-bottom: 1rem;
}

.lifeline-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--game-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.lifeline-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--game-blue-light);
    color: #fff;
}

.lifeline-btn:disabled {
    opacity: 0.5;
    transform: none;
    cursor: not-allowed;
    background: #ccc;
    border-color: #aaa;
}







/* Certificate Responsive Styles */
.certificate-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border: 15px solid var(--brand-primary);
    font-family: 'Segoe UI', sans-serif;
    background: #ffffff;
    position: relative;
    color: var(--brand-dark);
    padding: 3rem;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(78, 84, 200, 0.1);
}

.certificate-inner {
    border: 2px solid var(--brand-secondary);
    padding: 2rem;
    height: 100%;
    position: relative;
    background: radial-gradient(circle at center, #f8f9fa 0%, #ffffff 100%);
}

.certificate-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 800;
}

.certificate-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
}

.certificate-name {
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--brand-dark);
    font-family: 'Segoe UI', sans-serif;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-transform: capitalize;
}

.certificate-topic {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: var(--brand-primary);
    font-weight: bold;
    margin: 0.5rem 0;
    text-transform: uppercase;
}

.certificate-seal {
    height: clamp(60px, 10vw, 100px);
    opacity: 1;
}

@media (max-width: 576px) {
    .certificate-container {
        border-width: 8px;
        padding: 1.5rem;
    }

    .certificate-inner {
        padding: 1rem;
        border-width: 2px;
    }
}

/* Scroll Buttons */
.scroll-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.scroll-buttons button {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.2s, background-color 0.2s;
    opacity: 0.8;
}

.scroll-buttons button:hover {
    transform: translateY(-3px);
    opacity: 1;
}

.scroll-buttons button:active {
    transform: translateY(0);
}



/* Mobile Optimization for First Fold (Game Interface) */
@media (max-width: 576px) {
    .game-container {
        padding: 1.5rem 0.5rem;
    }

    .game-question-wrapper {
        margin-bottom: 1rem;
    }

    .game-hex-inner {
        min-height: auto;
        padding: 1rem;
    }

    .game-question-text {
        font-size: 1.1rem;
        font-weight: 700;
        line-height: 1.3;
    }

    .game-options-grid {
        gap: 0.8rem;
    }

    .game-option-inner {
        min-height: 50px;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    .game-option-badge {
        font-size: 1.1rem;
        margin-right: 10px;
    }

    .game-controls {
        margin-top: 1rem;
        gap: 0.5rem;
        padding-bottom: 0px;
        /* remove internal padding */
    }

    .btn-premium {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        min-width: 100px;
        margin-bottom: 0;
    }

    .game-hud {
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    /* Ad Banner margin fix */
    #adContainer {
        margin-top: 1rem !important;
    }
}

/* Premium Green Button */
.btn-success-premium {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-success-premium:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-success-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(40, 167, 69, 0.5);
    color: white;
}

.btn-success-premium:hover:before {
    opacity: 1;
}