:root {
    /* EcoDynamics Theme: Green & Gold */
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #fbbf24;
    --secondary-dark: #d97706;
    --dark: #0f172a;
    --dark-card: #1e293b;
    --dark-lighter: #334155;
    --text: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #fbbf24 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --glow: 0 0 40px rgba(16, 185, 129, 0.4);
    --glow-secondary: 0 0 40px rgba(251, 191, 36, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Base Utility Classes */
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; width: 100%; }
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; }
a { text-decoration: none; color: inherit; }

/* Backgrounds */
.bg-gradient {
    position: fixed; width: 100vw; height: 100vh; top: 0; left: 0;
    background: radial-gradient(circle at 50% 0%, rgba(5, 150, 105, 0.15) 0%, var(--dark) 70%);
    z-index: -2;
}
.bg-grid {
    position: fixed; width: 100vw; height: 100vh; top: 0; left: 0;
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.05) 1px, transparent 1px);
    background-size: 60px 60px; z-index: -1;
    transform: perspective(1000px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    transform-origin: top center; opacity: 0.6; animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
    0% { transform: perspective(1000px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(1000px) rotateX(60deg) translateY(60px) translateZ(-200px); }
}

/* Firefly Particles */
.firefly {
    position: fixed; width: 6px; height: 6px; background: var(--secondary); border-radius: 50%; z-index: -1;
    box-shadow: 0 0 15px 3px var(--secondary); animation: fly 15s infinite ease-in-out alternate; opacity: 0;
}
.firefly:nth-child(1) { top: 20%; left: 10%; animation-duration: 12s; animation-delay: 0s; }
.firefly:nth-child(2) { top: 60%; left: 80%; animation-duration: 18s; animation-delay: 2s; }
.firefly:nth-child(3) { top: 40%; left: 40%; animation-duration: 15s; animation-delay: 4s; }
.firefly:nth-child(4) { top: 80%; left: 20%; animation-duration: 22s; animation-delay: 1s; }
.firefly:nth-child(5) { top: 10%; left: 70%; animation-duration: 10s; animation-delay: 5s; }
@keyframes fly {
    0% { transform: translate(0, 0) scale(0.8); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translate(100px, -100px) scale(1.2); opacity: 0; }
}

/* Navigation */
nav {
    position: fixed; top: 0; width: 100%; padding: 1.5rem 0;
    background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.15); z-index: 1000; transition: all 0.3s ease;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 900; display: flex; align-items: center; gap: 0.8rem; color: var(--text); }
.logo i { color: var(--primary); font-size: 2.2rem; text-shadow: 0 0 20px var(--primary); }
.nav-menu { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-link { font-size: 1.05rem; font-weight: 500; color: var(--text-secondary); transition: 0.3s; }
.nav-link:hover { color: var(--primary-light); }
.btn-glow { background: var(--gradient-primary); padding: 0.75rem 2rem; border-radius: 50px; font-weight: 700; color: var(--dark); box-shadow: var(--glow); transition: 0.3s; }
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(16, 185, 129, 0.6); color: var(--dark); }
.lang-switch { display: flex; gap: 0.5rem; background: rgba(16, 185, 129, 0.1); border-radius: 50px; padding: 0.25rem; }
.lang-btn { padding: 0.5rem 1rem; border-radius: 50px; font-weight: 700; color: var(--text-secondary); }
.lang-btn.active { background: var(--primary); color: var(--dark); }

/* Document Layout / Internal Pages */
.page-wrapper {
    display: flex;
    margin-top: 100px;
    flex: 1;
}

.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.4);
    border-right: 1px solid rgba(16, 185, 129, 0.15);
    padding: 2rem;
    height: calc(100vh - 100px);
    position: sticky;
    top: 100px;
    overflow-y: auto;
}

.sidebar h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 1rem;
}

.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 0.5rem; }
.sidebar a {
    color: var(--text);
    opacity: 0.8;
    font-size: 1.05rem;
    transition: 0.2s;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}
.sidebar a:hover, .sidebar a.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-light);
    opacity: 1;
}

.page-content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: 900px; /* Don't stretch text too far */
}

/* Typography for Text Heavy Docs */
.page-content h1 { font-size: 3rem; margin-bottom: 1rem; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.page-content h2 { font-size: 2rem; margin: 3rem 0 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; }
.page-content p { color: var(--text-secondary); line-height: 1.8; font-size: 1.1rem; margin-bottom: 1.5rem; }
.page-content ul, .page-content ol { color: var(--text-secondary); margin-left: 2rem; margin-bottom: 1.5rem; font-size: 1.1rem; line-height: 1.8;}

/* Syntax / Code Blocks */
pre {
    background: var(--dark-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
code { font-family: monospace; color: var(--primary-light); background: rgba(16,185,129,0.1); padding: 0.2rem 0.5rem; border-radius: 6px; }
pre code { background: none; padding: 0; color: #f8fafc; font-size: 1rem; }

/* Admonitions (Alert boxes) */
.alert {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    background: rgba(16, 185, 129, 0.1);
}
.alert-warning {
    border-left-color: var(--secondary);
    background: rgba(251, 191, 36, 0.1);
}
.alert h4 { margin-bottom: 0.5rem; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.alert p { margin-bottom: 0; }
.alert-warning h4 { color: var(--secondary); }

/* Footer */
footer { padding: 3rem 0; background: var(--dark-card); border-top: 1px solid rgba(255,255,255,0.05); text-align: center; color: var(--text-secondary); margin-top: auto;}

/* --- Landing Page Sections (index.php) --- */
/* Hero */
.hero { padding: 12rem 0 8rem; position: relative; }
.hero-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.25rem; background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3); color: var(--primary-light);
    border-radius: 50px; font-weight: 700; margin-bottom: 2rem; letter-spacing: 1px;
}

.hero h1 { font-size: 4.8rem; margin-bottom: 1.5rem; letter-spacing: -1.5px; }
.hero p { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2.5rem; line-height: 1.7; max-width: 90%; }
.hero-btns { display: flex; gap: 1.5rem; }

.btn-outline {
    padding: 0.75rem 2rem; border-radius: 50px; font-weight: 700;
    color: var(--text); border: 2px solid rgba(16, 185, 129, 0.3); transition: 0.3s;
}
.btn-outline:hover { background: rgba(16, 185, 129, 0.1); border-color: var(--primary); }

/* Hero Visual */
.hero-visual { position: relative; perspective: 1000px; }
.glass-card {
    background: rgba(30, 41, 59, 0.6); backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 24px; padding: 2rem;
    transform: rotateY(-15deg) rotateX(10deg);
    box-shadow: -20px 20px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(16, 185, 129, 0.1);
    animation: floatGlass 6s ease-in-out infinite alternate;
}
@keyframes floatGlass {
    0% { transform: translateY(0px) rotateY(-15deg) rotateX(10deg); }
    100% { transform: translateY(-20px) rotateY(-10deg) rotateX(15deg); }
}

.market-ui { background: #0f172a; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.market-header { padding: 1rem; background: #1e293b; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid rgba(255,255,255,0.05); }
.market-header span { font-weight: 700; color: var(--secondary); }

.market-item { padding: 1rem; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid rgba(255,255,255,0.05); }
.market-item:last-child { border: none; }
.m-name { display:flex; align-items:center; gap:0.8rem; font-weight:600; }
.m-name i { color: #f97316; }
.m-price { color: var(--primary-light); font-family: monospace; font-size: 1.1rem; }
.m-trend.up { color: var(--primary); }
.m-trend.down { color: #ef4444; }

/* Stats Strip */
.stats-strip { margin-top: 5rem; display: flex; gap: 3rem; border-top: 1px solid rgba(16, 185, 129, 0.1); padding-top: 3rem; }
.stat-box { display: flex; flex-direction: column; }
.s-num { font-size: 2.5rem; font-weight: 900; color: var(--text); }
.s-lbl { color: var(--primary-light); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }

/* Features */
.features { padding: 8rem 0; background: rgba(15, 23, 42, 0.4); position: relative; }
.section-header { text-align: center; margin-bottom: 5rem; max-width: 700px; margin-inline: auto; }
.section-header h2 { font-size: 3.5rem; margin-bottom: 1rem; }
.section-header p { color: var(--text-secondary); font-size: 1.2rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.f-card {
    background: var(--dark-card); padding: 2.5rem; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05); transition: 0.4s; position: relative; overflow: hidden;
}
.f-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
    opacity: 0; transition: 0.4s;
}
.f-card:hover { transform: translateY(-10px); border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.f-card:hover::before { opacity: 1; }

.f-icon {
    width: 60px; height: 60px; background: rgba(16, 185, 129, 0.1); border-radius: 15px;
    display: flex; justify-content: center; align-items: center; font-size: 1.8rem;
    margin-bottom: 1.5rem; border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--primary-light); box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.1);
}
.f-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text); }
.f-card p { color: var(--text-secondary); line-height: 1.6; }

/* How it Works */
.how { padding: 8rem 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; }
.step { background: var(--dark-card); padding: 2.5rem 2rem; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); text-align: center; transition: 0.3s; }
.step:hover { border-color: var(--secondary); transform: translateY(-5px); box-shadow: var(--glow-secondary); }
.step-num { font-size: 3rem; font-weight: 900; color: rgba(251, 191, 36, 0.1); margin-bottom: 1rem; line-height: 1; }
.step h3 { margin-bottom: 1rem; color: var(--secondary); font-size: 1.3rem; }
.step p { color: var(--text-secondary); font-size: 0.95rem; }

/* Pricing */
.pricing { padding: 8rem 0; background: rgba(15, 23, 42, 0.4); }
.price-card {
    max-width: 450px; margin: 0 auto; background: linear-gradient(180deg, var(--dark-card) 0%, var(--dark) 100%);
    border-radius: 24px; padding: 3rem; border: 2px solid var(--primary); box-shadow: var(--glow); text-align: center; position: relative;
}
.badge-pop {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    background: var(--gradient-primary); color: var(--dark); padding: 0.5rem 1.5rem;
    border-radius: 50px; font-weight: 800; font-size: 0.9rem; letter-spacing: 1px; box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}
.p-name { font-size: 1.8rem; margin-bottom: 1rem; }
.p-price { font-size: 4.5rem; font-weight: 900; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; margin-bottom: 0.5rem; }
.p-period { color: var(--text-secondary); margin-bottom: 2rem; }
.p-features { list-style: none; text-align: left; margin-bottom: 3rem; }
.p-features li { margin-bottom: 1rem; color: var(--text); display: flex; align-items: center; gap: 0.8rem; }
.p-features li i { color: var(--primary); }

.btn-block { display: block; width: 100%; text-align: center; }

/* FAQ */
.faq { padding: 8rem 0; }
.faq-grid { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: var(--dark-card); border-radius: 12px; padding: 1.5rem 2rem; border: 1px solid rgba(255,255,255,0.05); }
.faq-q { font-size: 1.2rem; font-weight: 700; color: var(--primary-light); margin-bottom: 0.5rem; }
.faq-a { color: var(--text-secondary); line-height: 1.6; }

/* CTA */
.cta { text-align: center; padding: 8rem 0; background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, transparent 60%); }
.cta h2 { font-size: 4rem; margin-bottom: 1.5rem; }
.cta p { font-size: 1.3rem; color: var(--text-secondary); margin-bottom: 3rem; max-width: 600px; margin-inline: auto; }

/* Responsive Pages & Landing */
@media (max-width: 992px) {
    /* Docs Layout */
    .page-wrapper { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid rgba(16, 185, 129, 0.15); display: flex; flex-wrap: wrap; gap: 1rem;}
    .sidebar h3 { width: 100%; }
    .page-content { padding: 2rem 1.5rem; }
    
    /* Landing Layout */
    .hero h1 { font-size: 3.5rem; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin: 0 auto 2.5rem; }
    .hero-btns { justify-content: center; }
    .hero-visual { padding-top: 3rem; }
    .glass-card { transform: none; animation: none; box-shadow: 0 0 50px rgba(16,185,129,0.2); }
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .stats-strip { flex-wrap: wrap; justify-content: center; text-align: center; }
    .cta h2 { font-size: 2.5rem; }
}
