:root {
    --aura-purple: #a855f7;
    --aura-blue: #3b82f6;
    --bg-deep: #050505;
    --glass: rgba(12, 12, 12, 0.75);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.85); /* FIX: Increased contrast/brightness for readability */
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Quicksand', sans-serif;
    line-height: 1.6;
    user-select: text;
}

/* FIX: Background Layering & Pointer Events */
.nebula-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none; /* Passes clicks through */
    filter: blur(100px);
    opacity: 0.4;
}

.nebula-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: -9;
    pointer-events: none;
}

/* Ticker */
.ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: var(--aura-purple);
    z-index: 1001;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: black;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: tickerMove 40s linear infinite;
}

@keyframes tickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-content span {
    padding: 0 40px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 32px;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(to bottom right, var(--aura-purple), var(--aura-blue));
    box-shadow: 0 0 15px var(--aura-purple);
}

.logo-icon.small {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-family: 'Lexend', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: -0.05em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.text-aura-purple { color: var(--aura-purple); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--aura-purple); }

.live-status {
    background: rgba(255,255,255,0.08);
    padding: 6px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

#live-count { color: #10b981; font-weight: 900; }

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

/* Hero */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    text-align: center;
    padding-left: 24px;
    padding-right: 24px;
}

.hero-content { max-width: 900px; margin: 0 auto; }

.badge {
    display: inline-block;
    background: rgba(168, 85, 247, 0.15);
    color: var(--aura-purple);
    border: 1px solid rgba(168, 85, 247, 0.25);
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.2em;
    margin-bottom: 32px;
}

.hero-title {
    font-family: 'Lexend', sans-serif;
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.05em;
    margin-bottom: 32px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.gradient-text {
    background: linear-gradient(to right, var(--aura-purple), var(--aura-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: var(--text-dim);
    margin-bottom: 64px;
    font-weight: 600;
}

/* Access Card */
.access-card {
    background: var(--glass);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 64px;
    border-radius: 48px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s;
}

.access-card.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(to bottom right, var(--aura-purple), var(--aura-blue));
    border-radius: 24px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.card-title { font-family: 'Lexend', sans-serif; font-size: 2.2rem; margin-bottom: 12px; font-weight: 900; }
.card-desc { color: var(--text-dim); margin-bottom: 40px; font-weight: 600; }

.protocol-agreement { margin-bottom: 40px; text-align: left; }

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dim);
}

.checkbox-container input { display: none; }

.checkmark {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-container input:checked + .checkmark {
    background: var(--aura-purple);
    border-color: var(--aura-purple);
    box-shadow: 0 0 20px var(--aura-purple);
}

.checkmark::after {
    content: "✓";
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    display: none;
}

.checkbox-container input:checked + .checkmark::after { display: block; }

.checkbox-container a { color: var(--aura-purple); text-decoration: underline; }

.btn-primary {
    width: 100%;
    height: 64px;
    background: linear-gradient(to right, var(--aura-purple), var(--aura-blue));
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 15px 30px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.98); }

.error-msg {
    margin-top: 16px;
    color: #f43f5e;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s;
}

.error-msg.visible { opacity: 1; }

/* Content Sections */
.content-sections {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 24px;
}

.zigzag {
    display: flex;
    align-items: center;
    gap: 64px;
    margin-bottom: 120px;
}

.zigzag.reverse { flex-direction: row-reverse; }

.text-block { flex: 1.2; }
.image-block { flex: 0.8; }

.image-block img {
    width: 100%;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
    transform: rotate(2deg);
    transition: transform 0.5s;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.zigzag:hover .image-block img { transform: rotate(0); }

.section-title {
    font-family: 'Lexend', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.centered-header {
    text-align: center;
    width: 100%;
    margin-bottom: 48px;
}

.text-block p {
    color: var(--text-dim);
    font-size: 1.15rem;
    margin-bottom: 24px;
    font-weight: 500;
}

/* FAQ Accordion FIX */
.faq-section { margin-bottom: 120px; }
.faq-container {
    max-width: 800px;
    margin: 64px auto 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    transition: border-color 0.3s, background 0.3s;
    overflow: hidden;
}

.faq-item:hover { border-color: rgba(168, 85, 247, 0.4); }

.faq-trigger {
    width: 100%;
    background: none;
    border: none;
    color: white;
    text-align: left;
    padding: 32px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}

.faq-trigger h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.faq-plus {
    font-size: 24px;
    color: var(--aura-purple);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.faq-answer-inner {
    padding: 0 32px 32px;
}

.faq-answer p {
    color: var(--text-dim);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Open state styles */
.faq-item.active {
    background: rgba(168, 85, 247, 0.04);
    border-color: var(--aura-purple);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
}

.faq-item.active .faq-plus {
    transform: rotate(45deg);
}

/* Table */
.matrix-card {
    background: var(--glass);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 64px;
    border-radius: 48px;
    margin-bottom: 100px;
}

.matrix-card .card-title {
    font-size: 2.2rem;
    margin-bottom: 48px;
}

.table-wrapper { overflow-x: auto; }

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.matrix-table th {
    padding-bottom: 24px;
    color: var(--aura-purple);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-weight: 900;
}

.matrix-table td {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Footer */
.site-footer {
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 100px 24px 40px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 64px;
}

.footer-col h4 {
    font-family: 'Lexend', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--aura-purple);
    margin-bottom: 24px;
    font-weight: 900;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 16px; }
.footer-col a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
    font-weight: 700;
}

.footer-col a:hover { color: white; }

.footer-col.about p {
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 24px;
    font-weight: 600;
}

.footer-bottom {
    max-width: 1200px;
    margin: 100px auto 0;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.15em;
}

.footer-status { display: flex; gap: 32px; }

/* Chat View */
#chat-view {
    position: fixed;
    inset: 0;
    background: black;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    height: 100dvh; /* Force mobile height */
    transition: transform 0.4s ease-in-out;
}

.chat-view-hidden {
    transform: translateY(100%);
    pointer-events: none;
}

.chat-header {
    height: 64px;
    background: #111;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.15);
    padding: 6px 16px;
    border-radius: 100px;
}

.status-label {
    color: #10b981;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-disconnect {
    background: #f43f5e;
    border: none;
    color: white;
    font-weight: 900;
    padding: 8px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-disconnect:hover { background: #e11d48; }

.iframe-container {
    flex: 1;
    position: relative;
    background: #09090b;
}

#active-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.chat-loader {
    position: absolute;
    inset: 0;
    background: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    transition: opacity 1s;
}

.chat-loader.fade-out { opacity: 0; pointer-events: none; }

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--aura-purple);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .nav-links { display: none; }
    .zigzag { flex-direction: column; gap: 40px; text-align: center; }
    .zigzag.reverse { flex-direction: column; }
    .hero { padding-top: 140px; }
    .access-card { padding: 40px 24px; }
    .section-title { font-size: 2.2rem; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; align-items: center; }
    .access-card { padding: 32px 20px; border-radius: 32px; }
    .card-title { font-size: 1.8rem; }
}