/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
   :root {
    --bg-color: #050505;
    --bg-card: #111111;
    --text-color: #eeeeee;
    --text-muted: #aaaaaa;
    
    --primary-color: #00f3ff;   /* Neon Cyan */
    --secondary-color: #bc13fe; /* Neon Purple */
    --danger-color: #ff0055;    /* Neon Red/Pink */
    --success-color: #00ff9d;   /* Neon Green */
    
    --font-main: 'Inter', sans-serif;
    --font-game: 'Press Start 2P', cursive;
    
    --section-padding: 80px 20px;
    --border-glow: 0 0 10px rgba(0, 243, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* =========================================
   2. GAME SECTION (HERO)
   ========================================= */
.game-wrapper {
    position: relative;
    width: 100%;
    height: 90vh; /* Takes up most of the screen */
    background: #020202;
    overflow: hidden;
    border-bottom: 2px solid var(--secondary-color);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Game Modals (Start / Game Over) */
.modal-overlay {
    position: fixed; /* CHANGED from absolute to fixed */
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999; /* INCREASED to ensure it sits on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Universal Modal Content Style */
.modal-content {
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--primary-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
    max-width: 600px;
    width: 90%;
    text-align: center;
    position: relative;
}

/* Game Text Styles */
.game-modal h1 {
    font-family: var(--font-game);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px var(--secondary-color);
    line-height: 1.4;
}

.danger-text { color: var(--danger-color) !important; text-shadow: 2px 2px #500 !important; }

.instructions { text-align: left; color: #ccc; font-size: 0.9rem; margin-bottom: 2rem; }
.instructions ul { margin-top: 1rem; }
.instructions li { margin-bottom: 0.8rem; display: flex; align-items: center; gap: 10px; }
.instructions .icon { font-size: 1.2rem; }

/* Game Buttons */
.btn-primary {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px 24px;
    font-family: var(--font-game);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.8);
    transform: translateY(-2px);
}

.start-btn { width: 100%; }

/* HUD (Heads Up Display) */
.hud-td {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 90%;
    max-width: 800px;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through empty areas */
}

.hud-stats {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 25px;
    border-radius: 50px;
    border: 1px solid #333;
    pointer-events: auto;
}

.stat { display: flex; flex-direction: column; align-items: center; }
.stat .label { font-family: var(--font-game); font-size: 0.5rem; color: #888; margin-bottom: 2px; }
.stat .value { font-family: var(--font-game); font-size: 1rem; color: var(--primary-color); }

.tower-toolbar {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.tower-card {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px;
    width: 90px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tower-card:hover { background: #333; transform: translateY(-3px); }
.tower-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    background: #222;
}

.tower-card .icon { font-size: 1.5rem; margin-bottom: 4px; }
.tower-card .name { font-size: 0.7rem; font-weight: 600; color: #fff; }
.tower-card .cost { font-size: 0.6rem; color: var(--success-color); font-family: var(--font-game); margin-top: 2px; }

.btn-wave {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    font-family: var(--font-game);
    font-size: 0.7rem;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.4);
    transition: 0.2s;
}
.btn-wave:hover { background: #d54aff; }


/* =========================================
   3. NAVIGATION
   ========================================= */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-family: var(--font-game);
    color: #fff;
    font-size: 1.2rem;
}
.logo span { color: var(--primary-color); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ccc;
}
.nav-links a:hover { color: var(--primary-color); }

.btn-nav {
    border: 1px solid var(--primary-color);
    padding: 6px 15px;
    border-radius: 20px;
    color: var(--primary-color) !important;
}
.btn-nav:hover {
    background: var(--primary-color);
    color: #000 !important;
}

/* =========================================
   4. CONTENT LAYOUT
   ========================================= */
.content-section {
    background: #0a0a0a;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 80px 0; }
.text-center { text-align: center; }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.section-subtitle {
    text-align: center;
    color: #888;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

/* =========================================
   5. FEATURES GRID
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #222;
    transition: 0.3s;
    text-align: center;
}
.feature-box:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}
.feature-box i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}
.feature-box h3 { margin-bottom: 10px; color: #fff; }
.feature-box p { font-size: 0.9rem; color: #aaa; }

/* =========================================
   6. MODULES / COURSE GRID
   ========================================= */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.05);
}

.card-image {
    height: 180px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}
/* Overlay for image */
.card-image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, var(--bg-card), transparent);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tag {
    font-size: 0.75rem;
    color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    align-self: flex-start;
    margin-bottom: 10px;
}

.card-content h3 {
    margin: 5px 0 10px;
    font-size: 1.3rem;
    font-family: var(--font-main);
    color: #fff;
}

.card-content p {
    font-size: 0.95rem;
    color: #bbb;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.btn-sm {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    text-align: center;
    font-size: 0.9rem;
}
.btn-sm:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}
.w-100 { width: 100%; }

/* =========================================
   7. PRICING SECTION
   ========================================= */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center;
}

.pricing-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #333;
    text-align: center;
    position: relative;
    transition: 0.3s;
}

/* Featured Card Style */
.pricing-card.featured {
    border: 2px solid var(--secondary-color);
    background: #151515;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.1);
    z-index: 2;
}

.pricing-card h3 { font-size: 1.5rem; margin-bottom: 15px; color: #fff; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.pricing-card .price span { font-size: 1rem; color: #777; font-weight: 400; }
.discount { color: var(--success-color); font-weight: bold; margin-bottom: 20px; }

.pricing-card ul { margin: 30px 0; text-align: left; }
.pricing-card li { margin-bottom: 12px; color: #ccc; }
.pricing-card li i { color: var(--primary-color); margin-right: 10px; }
.pricing-card li.disabled { color: #555; text-decoration: line-through; }
.pricing-card li.disabled i { color: #555; }

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* =========================================
   8. INSTRUCTOR SECTION
   ========================================= */
.instructor-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    background: #111;
    border: 1px solid #333;
    padding: 40px;
    border-radius: 20px;
}

.instructor-img { flex: 0 0 250px; }
.instructor-img img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
}

.instructor-info { flex: 1; }
.instructor-info h4 { color: var(--primary-color); margin-bottom: 15px; }
.instructor-info p { margin-bottom: 20px; color: #ccc; }

/* =========================================
   9. FAQ SECTION
   ========================================= */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.faq-item {
    background: #151515;
    padding: 25px;
    border-left: 3px solid var(--secondary-color);
    border-radius: 4px;
}
.faq-item h4 { margin-bottom: 10px; color: #fff; }
.faq-item p { font-size: 0.9rem; color: #aaa; }

/* =========================================
   10. FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 40px 20px;
    background: #000;
    color: #555;
    border-top: 1px solid #222;
}

/* =========================================
   11. MODULE DETAIL MODAL (Specifics)
   ========================================= */
/* The overlay was defined in Section 2, but styling the specific content here */
.module-detail-content {
    text-align: left; /* Override center text from game modal */
    max-width: 800px; /* Wider for course details */
    padding: 0;
    overflow: hidden; /* For header image */
    border: 1px solid #333;
}

.modal-header {
    background: #1a1a1a;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}
.modal-header h2 { font-size: 1.2rem; color: #fff; margin: 0; }
.close-btn { background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }
.close-btn:hover { color: var(--danger-color); }

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-hero-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.modal-desc { font-size: 1rem; color: #ddd; margin-bottom: 20px; }

.modal-bullets { margin-top: 10px; }
.modal-bullets li {
    margin-bottom: 8px;
    color: #ccc;
    display: flex;
    align-items: flex-start;
}
.modal-bullets li i { margin-top: 4px; }

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #333;
    text-align: right;
    background: #1a1a1a;
}

/* Scrollbar for modal body */
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: #444; }


/* =========================================
   12. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    
    .hud-stats { padding: 5px 15px; gap: 10px; }
    .stat .value { font-size: 0.8rem; }
    .tower-card { width: 70px; padding: 5px; }
    .tower-card .icon { font-size: 1.2rem; }
    
    .instructor-wrapper { flex-direction: column; text-align: center; }
    .instructor-info h2 { text-align: center !important; }
    
    .pricing-card.featured { transform: scale(1); }
    
    .nav-links { display: none; } /* Hide nav on small screens for now (or add burger menu later) */
    .logo { font-size: 1rem; }
}


/* =========================================
   13. TESTIMONIALS SECTION
   ========================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: #111;
    border: 1px solid #333;
    padding: 25px;
    border-radius: 12px;
    transition: 0.3s;
    position: relative;
}

.testimonial-card:hover {
    border-color: var(--primary-color);
    background: #161616;
    transform: translateY(-5px);
}

.member-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.member-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
}

.member-header h4 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 2px;
}

.member-header span {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.quote {
    font-style: italic;
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
}

.quote::before {
    content: '"';
    font-size: 2rem;
    color: var(--secondary-color);
    font-family: serif;
    line-height: 0;
    margin-right: 5px;
    vertical-align: -10px;
}