/* =========================================
   VARIABLES & THEME CONFIG
   ========================================= */
:root {
    /* Color Palette - Bioluminescent Glassflow */
    --primary: #667EEA;
    --primary-rgb: 102, 126, 234;
    --secondary: #764BA2;
    --secondary-rgb: 118, 75, 162;
    --accent: #F093FB;
    --accent-rgb: 240, 147, 251;
    
    --background: #1A1A2E;
    --background-alt: #161625;
    
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    
    --text: #FFFFFF;
    --text-secondary: #B0B0D0;
    --text-muted: #7A7A9E;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    
    /* Radius */
    --radius-lg: 1.5rem; /* 2xl look */
    --radius-sm: 0.5rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
    word-break: break-word;
}

h1 { font-weight: 700; }
h2 { font-weight: 700; }
h3 { font-weight: 500; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul { list-style: none; }

/* =========================================
   SECTION STYLING - MANDATORY
   ========================================= */
section, .section, #playground, #how-to-use, #gallery, #testimonials, #faq {
    padding: 6rem 1.5rem;
    position: relative;
    overflow: hidden;
}

section:nth-child(odd) {
    background-color: var(--background);
}

section:nth-child(even) {
    background-color: var(--background-alt);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.125rem;
}

/* =========================================
   COMPONENTS
   ========================================= */
/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: 'Space Grotesk', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

/* Glass Panels / Cards */
.glass-panel, .card, .step-card, .feature-card, .testimonial-card, .faq-item, .modal-content {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* =========================================
   HEADER & NAV
   ========================================= */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

nav a:hover, nav a.active {
    color: var(--text);
}

nav .btn {
    color: #fff !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1rem 4rem;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg-animation {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(at 0% 0%, var(--primary) 0px, transparent 50%),
                radial-gradient(at 100% 0%, var(--secondary) 0px, transparent 50%),
                radial-gradient(at 100% 100%, var(--accent) 0px, transparent 50%),
                radial-gradient(at 0% 100%, var(--primary) 0px, transparent 50%);
    filter: blur(80px);
    opacity: 0.4;
    animation: meshMove 20s infinite alternate;
}

@keyframes meshMove {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(10deg) scale(1.1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(26,26,46,0.7), var(--background));
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.hero .lead {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   PLAYGROUND (LOCKED)
   ========================================= */
.locked-playground {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.locked-playground::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 20px var(--primary);
}

.lock-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 6s ease-in-out infinite;
}

.locked-playground h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.progress-container {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 2rem 0 1rem;
    overflow: hidden;
}

.progress-bar {
    width: 85%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 10px var(--primary);
}

.progress-text {
    font-family: monospace;
    color: var(--accent);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* =========================================
   HOW IT WORKS
   ========================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    text-align: center;
    position: relative;
    padding: 3rem 2rem;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.05);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

/* =========================================
   FEATURES / BENEFITS
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* =========================================
   GALLERY
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.gallery-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: #fff;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.review-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.reviewer-info strong {
    display: block;
    color: var(--primary);
}

.reviewer-info span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   FAQ
   ========================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    padding: 0; /* Reset default padding for button area */
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.2);
}

.faq-answer p {
    padding: 1.5rem 2rem;
    margin: 0;
    color: var(--text-secondary);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: var(--background-alt);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   MODALS
   ========================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    background: #1A1A2E; /* Solid fallback */
    background: linear-gradient(135deg, rgba(26,26,46,0.95), rgba(22,22,37,0.95));
    border: 1px solid var(--primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-body {
    padding-right: 1rem;
}

.modal-body h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-body h4 {
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* =========================================
   ANIMATIONS
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 1023px) {
    .steps-grid, .testimonials-grid, .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    html { font-size: 14px; }
    
    header { padding: 0.75rem 1rem; }
    
    .menu-toggle { display: block; }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(26, 26, 46, 0.98);
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    nav.active { display: flex; }
    
    nav a { 
        font-size: 1.1rem; 
        width: 100%;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    nav .btn {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }

    .hero {
        padding-top: 6rem;
        align-items: center; /* Center vertically on mobile too */
    }

    .steps-grid, .features-grid, .testimonials-grid, .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-brand p { margin: 1rem auto; }
}

@media (min-width: 768px) {
    .mobile-only { display: none; }
}