:root {
    --bg-color: #030303;
    --surface-color: #0a0a0a;
    --border-color: #1a1a1a;
    --border-hover: #333;
    --primary-accent: #00F0FF;
    /* Cyber Cyan */
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --font-heading: 'Inter', sans-serif;
    --font-code: 'Courier New', monospace;
    /* Fallback for tech feel */
    --grid-color: rgba(255, 255, 255, 0.03);
}

/* Enable View Transitions for smooth page switching */
@view-transition {
    navigation: auto;
}

/* Base Setup */
html {
    font-size: 16px;
    /* Base for Desktop */
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
        /* Global scale down for Mobile (87.5%) */
    }
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-heading);
    line-height: 1.5;
    /* Subtle Tech Grid Background */
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

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

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.gradient-text {
    color: #ffffff;
}

/* =========================================
   Navbar: Minimal & Sharp
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(3, 3, 3, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-code);
    font-weight: 700;
    letter-spacing: -0.05em;
    font-size: 1.1rem;
}

.logo img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    /* Slight rounding, not circle */
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

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

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

.nav-btn {
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nav-btn:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    background: rgba(0, 240, 255, 0.05);
}

/* =========================================
   Hero: Clean Dashboard Style
   ========================================= */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#earth-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    z-index: 1;
    /* Opacity removed for brightness */
}

.hero-overlay-text {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    /* Wider for single line */
    width: 100%;
    /* Ensure it spans if needed */
    margin: 0 auto;
    /* Force centering block */
    padding-top: 120px;
    /* More space to clear navbar */
}

.hero-overlay-text h1 {
    font-size: 2.5rem;
    /* Smaller, matches JS */
    min-height: 1.2em;
    /* Prevent layout shift */
    margin-bottom: 24px;
    text-transform: uppercase;
    font-family: var(--font-heading);
}

.hero-subtitle {
    font-family: var(--font-code);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-accent);
    margin-bottom: 40px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    display: inline-block;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(0, 240, 255, 0.05);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn i {
    font-size: 1.2rem;
}

/* =========================================
   Modules: Tech Cards
   ========================================= */
.section {
    padding: 120px 0;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
    font-family: var(--font-heading);
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align for tech look */
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.card:hover::before {
    transform: scaleX(1);
}

.icon-box {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #000;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.card .subtitle {
    display: block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--primary-accent);
    margin-bottom: 16px;
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.feature-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-list li i {
    font-size: 0.6rem;
    /* Minimal bullets */
    color: var(--text-secondary);
    opacity: 0.5;
}

/* =========================================
   Subpage Headers: Minimal & Bold
   ========================================= */
.subpage-hero {
    padding: 200px 0 80px;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    /* Switch to left align */
}

.subpage-hero .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero-text-block {
    max-width: 600px;
}

.subpage-hero h1 {
    font-size: 4rem;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.subpage-hero p {
    font-family: var(--font-code);
    color: var(--primary-accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Module Specific Accents */
.theme-learn {
    --accent: #00F0FF;
}

.theme-trade {
    --accent: #BC13FE;
}

.theme-node {
    --accent: #00FF9D;
}

.theme-market {
    --accent: #FFB800;
}

.theme-account {
    --accent: #4D79FF;
}

.subpage-hero h1 {
    color: var(--text-primary);
}

.subpage-hero p {
    color: var(--accent, var(--primary-accent));
}


/* =========================================
   Content Sections: Tech Grid
   ========================================= */
.content-section {
    padding: 100px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 160px;
    align-items: center;
}

.feature-info h2 {
    font-size: 2.2rem;
    margin-bottom: 24px;
}

.feature-info p {
    line-height: 1.7;
    margin-bottom: 24px;
}

.feature-visual {
    height: 400px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Tech Decoration for Visuals */
.feature-visual::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed var(--border-color);
}

.feature-visual-icon {
    font-size: 6rem;
    color: var(--accent, var(--text-primary));
    opacity: 1;
    text-shadow: 0 0 30px var(--accent);
}

/* Remove decorative bubbles - too noisy */


/* =========================================
   Footer
   ========================================= */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    background: #000;
}

.footer-logo {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    /* Mobile Spacing Optimizations */
    .section {
        padding: 60px 0;
    }

    .subpage-hero {
        padding: 120px 0 40px;
    }

    .hero-overlay-text {
        padding-top: 100px;
    }

    .hero-overlay-text h1 {
        font-size: 2.5rem;
    }

    /* Hamburger Menu Icon */
    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-primary);
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Mobile Nav Links */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        height: 100vh;
        width: 70%;
        background: rgba(3, 3, 3, 0.95);
        backdrop-filter: blur(15px);
        padding-top: 80px;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        border-left: 1px solid var(--border-color);
        gap: 24px;
        align-items: flex-start;
        padding-left: 32px;
    }

    .nav-links.active {
        right: 0;
        /* Slide in */
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .grid-5 {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
        margin-bottom: 80px;
    }

    /* Force Order: Info always first (1), Visual always last (2) */
    .feature-info {
        order: 1;
    }

    .feature-visual {
        order: 2;
        width: 100%;
        /* Ensure full width in flex */
        height: 250px;
    }

    .subpage-hero h1 {
        font-size: 2rem;
        /* Significantly reduced to fix "Too Big" issue */
    }
}