:root {
    --midnight: #050505;
    --neon-blue: #22d3ee;
    --electric-lime: #a3e635;
    --hyper-purple: #c084fc;
    --slate-400: #94a3b8;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --error-red: #ef4444;
    --glass: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--midnight);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    user-select: none;
}

body.modal-active {
    overflow: hidden !important;
}

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

/* Breathing Background */
.breathing-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.04) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(163, 230, 53, 0.04) 0%, transparent 40%);
    animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* Typography */
.blue { color: var(--neon-blue); }
.lime { color: var(--electric-lime); }
.gradient-text {
    background: linear-gradient(90deg, var(--neon-blue), var(--hyper-purple), var(--electric-lime));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 18px 0;
}

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

.logo { display: flex; align-items: center; gap: 12px; }
.logo h1 { font-size: 1.4rem; font-weight: 900; letter-spacing: -1.5px; }
.pulse-dot {
    width: 10px; height: 10px; background: var(--neon-blue); border-radius: 50%;
    box-shadow: 0 0 15px var(--neon-blue); animation: glow 2s infinite;
}

@keyframes glow { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }

.status-badge {
    font-size: 0.65rem; font-weight: 900; letter-spacing: 2px; color: var(--slate-400);
    background: var(--glass); border: 1px solid var(--glass-border);
    padding: 8px 18px; border-radius: 50px; display: flex; align-items: center; gap: 10px;
}

.badge-dot { width: 6px; height: 6px; background: var(--electric-lime); border-radius: 50%; box-shadow: 0 0 8px var(--electric-lime); }

/* Hero Section */
.hero { padding: 180px 0 100px; text-align: center; }
.badge-tag {
    display: inline-block; background: rgba(34, 211, 238, 0.05); border: 1px solid rgba(34, 211, 238, 0.2);
    color: var(--neon-blue); padding: 8px 16px; border-radius: 6px; font-size: 0.65rem; font-weight: 900;
    letter-spacing: 2px; margin-bottom: 30px;
}

.hero-title { font-size: clamp(3rem, 10vw, 7rem); font-weight: 900; line-height: 0.85; letter-spacing: -5px; margin-bottom: 30px; }
.hero-sub { font-size: 1.3rem; color: var(--slate-400); max-width: 750px; margin: 0 auto 60px; font-weight: 500; }

/* Gatekeeper */
.gatekeeper-card { max-width: 520px; margin: 0 auto; padding: 48px; border-radius: 36px; text-align: left; transition: var(--transition); }
.glass { background: var(--glass); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid var(--glass-border); }
.gatekeeper-card:hover { border-color: rgba(34, 211, 238, 0.3); box-shadow: 0 0 60px rgba(34, 211, 238, 0.05); }

.checkbox-row { display: flex; gap: 24px; margin-bottom: 32px; }
.check-text h3 { font-size: 0.85rem; font-weight: 900; letter-spacing: 1px; margin-bottom: 4px; }
.check-text p { font-size: 0.7rem; color: var(--slate-400); text-transform: uppercase; font-weight: 700; }

.custom-checkbox { position: relative; width: 34px; height: 34px; }
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; }
.checkmark { position: absolute; top: 0; left: 0; height: 34px; width: 34px; background: var(--glass); border: 2px solid var(--slate-800); border-radius: 12px; transition: var(--transition); }
.custom-checkbox input:checked ~ .checkmark { background: var(--neon-blue); border-color: var(--neon-blue); }
.checkmark:after { content: ""; position: absolute; display: none; left: 12px; top: 6px; width: 6px; height: 13px; border: solid #000; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.custom-checkbox input:checked ~ .checkmark:after { display: block; }

.btn-primary {
    width: 100%; padding: 24px; background: linear-gradient(90deg, var(--neon-blue), var(--hyper-purple));
    border: none; border-radius: 20px; color: #fff; font-weight: 900; font-size: 1.15rem;
    letter-spacing: 1.5px; cursor: pointer; transition: var(--transition); text-transform: uppercase;
    box-shadow: 0 10px 40px rgba(34, 211, 238, 0.2);
}

.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(34, 211, 238, 0.4); }

.hero-stats { margin-top: 100px; display: flex; justify-content: center; gap: 80px; }
.stat-item { display: flex; flex-direction: column; gap: 6px; }
.stat-val { font-size: 2rem; font-weight: 900; color: #fff; letter-spacing: -1.5px; }
.stat-label { font-size: 0.7rem; font-weight: 800; color: var(--slate-400); text-transform: uppercase; letter-spacing: 2px; }

/* Ecosystem & Modules */
.ecosystem { padding: 120px 0; background: rgba(255, 255, 255, 0.01); border-top: 1px solid var(--glass-border); }
.section-header { text-align: center; font-size: 2.5rem; font-weight: 900; letter-spacing: -1.5px; margin-bottom: 80px; text-transform: uppercase; }
.ecosystem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.eco-card { padding: 48px; border-radius: 32px; transition: var(--transition); border: 1px solid var(--glass-border); }
.eco-card:hover { transform: translateY(-10px); border-color: var(--neon-blue); box-shadow: 0 10px 40px rgba(34, 211, 238, 0.05); }
.eco-icon { font-size: 2rem; margin-bottom: 24px; color: var(--neon-blue); font-weight: 900; }
.eco-card h4 { font-size: 1.2rem; font-weight: 900; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 1px; }
.eco-card p { color: var(--slate-400); font-size: 1rem; line-height: 1.6; }

/* Authority Essay */
.authority { padding: 140px 0; }
.essay-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 80px; align-items: stretch; }
.section-tag { color: var(--neon-blue); font-size: 0.8rem; font-weight: 900; text-transform: uppercase; letter-spacing: 4px; margin-bottom: 12px; }
.essay-content h3 { font-size: 3rem; font-weight: 900; margin-bottom: 30px; letter-spacing: -2px; line-height: 1.05; }
.essay-content p { color: var(--slate-400); font-size: 1.15rem; margin-bottom: 24px; font-weight: 400; }
.essay-image { border-radius: 40px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.essay-image img { width: 100%; height: 100%; object-fit: cover; }

/* Guide Steps & Animations */
.guide { padding: 120px 0; background: rgba(163, 230, 53, 0.02); }
.guide-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; text-align: center; }
.step-num { font-size: 4rem; font-weight: 900; color: var(--electric-lime); opacity: 0.15; display: block; margin-bottom: -10px; }
.step h5 { font-size: 1.5rem; font-weight: 900; margin-bottom: 20px; text-transform: uppercase; letter-spacing: -0.5px; }
.step p { color: var(--slate-400); font-size: 1.1rem; }

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* FAQ Accordion */
.faq-accordion { padding: 140px 0; border-top: 1px solid var(--glass-border); }
.accordion { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.accordion-item { border-radius: 20px; overflow: hidden; transition: var(--transition); border: 1px solid var(--glass-border); }
.accordion-header {
    width: 100%; padding: 24px 32px; display: flex; justify-content: space-between; align-items: center;
    background: transparent; border: none; color: #fff; font-size: 1.1rem; font-weight: 800; cursor: pointer;
    text-align: left; transition: var(--transition);
}
.accordion-header:hover { background: rgba(255, 255, 255, 0.03); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; background: rgba(0,0,0,0.2); }
.accordion-content p { padding: 0 32px 32px; color: var(--slate-400); font-size: 1rem; }
.accordion-item.active .accordion-content { max-height: 200px; }
.accordion-item.active .accordion-header { color: var(--neon-blue); }
.accordion-item.active .icon { transform: rotate(45deg); }
.icon { font-size: 1.5rem; transition: transform 0.3s; }

/* Footer */
.main-footer { padding: 120px 0 60px; border-top: 1px solid var(--glass-border); background: #000; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 100px; margin-bottom: 100px; }
.footer-brand h2 { font-weight: 900; margin-bottom: 20px; font-size: 1.6rem; letter-spacing: -1px; }
.footer-brand p { color: var(--slate-700); font-weight: 700; font-size: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 18px; }
.footer-links a { color: var(--slate-400); text-decoration: none; font-size: 0.9rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; transition: var(--transition); }
.footer-links a:hover { color: var(--neon-blue); transform: translateX(5px); }
.footer-status { text-align: right; }
.status-line { font-weight: 900; font-size: 0.85rem; color: var(--electric-lime); display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.status-dot { width: 8px; height: 8px; background: var(--electric-lime); border-radius: 50%; box-shadow: 0 0 10px var(--electric-lime); animation: blink 1.5s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.footer-bottom { text-align: center; font-size: 0.75rem; color: var(--slate-800); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; border-top: 1px solid var(--slate-800); padding-top: 40px; }

/* Minimalist Loader */
.loader-overlay {
    position: fixed; inset: 0; background: var(--midnight); z-index: 5000;
    display: flex; align-items: center; justify-content: center; transition: opacity 0.4s ease-in-out;
}
.loader-container { text-align: center; }
.minimal-spinner {
    width: 56px; height: 56px; border: 3px solid var(--glass-border);
    border-top-color: var(--neon-blue); border-radius: 50%;
    margin: 0 auto 36px; animation: spin 0.9s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loader-text { font-size: 1.3rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 10px; }
.loader-sub { font-size: 0.75rem; font-weight: 900; color: var(--slate-700); text-transform: uppercase; letter-spacing: 3px; }

/* Immersive Fullscreen Viewport */
.chat-modal {
    position: fixed; inset: 0; background: #000; z-index: 9000;
    display: flex; flex-direction: column; width: 100vw; height: 100vh;
}
.modal-controls { position: absolute; top: 25px; right: 25px; z-index: 10000; }
.btn-disconnect {
    background: rgba(239, 68, 68, 0.1); border: 1px solid var(--error-red);
    color: var(--error-red); padding: 12px 30px; border-radius: 14px;
    font-size: 0.8rem; font-weight: 900; cursor: pointer; transition: var(--transition);
    letter-spacing: 1px;
}
.btn-disconnect:hover { background: var(--error-red); color: #fff; box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }

.immersive-viewport { flex: 1; width: 100%; height: 100%; overflow: hidden; background: #000; position: relative; }
.immersive-viewport iframe { width: 100%; height: 100%; border: none; display: block; background: #000; }

/* States & Helper */
.shake { animation: shake 0.6s ease-in-out; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-12px); }
    30%, 60%, 90% { transform: translateX(12px); }
}
.neon-error { border-color: var(--error-red) !important; box-shadow: 0 0 40px rgba(239, 68, 68, 0.3) !important; }
.hidden { display: none !important; }

/* Mobile Response */
@media (max-width: 1024px) {
    .essay-layout { grid-template-columns: 1fr; gap: 60px; }
    .hero-stats { gap: 40px; flex-wrap: wrap; }
    .essay-image { order: -1; height: 400px; }
}

@media (max-width: 768px) {
    .hero { padding-top: 150px; }
    .hero-title { font-size: 3.8rem; letter-spacing: -2px; }
    .guide-steps { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 50px; }
    .status-line { justify-content: center; }
    .footer-status { text-align: center; }
    .header-container { padding: 0 20px; }
    .status-badge { display: none; }
    .gatekeeper-card { padding: 36px 28px; }
    .btn-disconnect { right: 15px; top: 15px; padding: 10px 20px; font-size: 0.75rem; }
    .ecosystem-grid { grid-template-columns: 1fr; }
}
