:root {
    /* Fonts */
    --font-main: 'Plus Jakarta Sans', 'Instrument Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'Geist Mono', monospace;

    /* Theme Variables - Dark Mode Default */
    --bg-color: #121316;
    --text-main: #F4F4F6;
    --text-accent: #8E9AA8;
    --border-hairline: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.15);
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-hover-bg: rgba(255, 255, 255, 0.04);
    --nav-bg: rgba(18, 19, 22, 0.85);
    --spotlight-color: rgba(142, 154, 168, 0.07);
    
    --primary: #8E9AA8;
    --dot-green: #34d399;
}

[data-theme="light"] {
    --bg-color: #f8f9fc;
    --text-main: #121316;
    --text-accent: #5a6674;
    --border-hairline: rgba(18, 19, 22, 0.1);
    --border-hover: rgba(18, 19, 22, 0.25);
    --card-bg: #ffffff;
    --card-hover-bg: #fdfdfd;
    --nav-bg: rgba(248, 249, 252, 0.85);
    --spotlight-color: rgba(142, 154, 168, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.geist-font {
    font-family: var(--font-mono);
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s ease;
}

/* Spotlight */
.spotlight-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background: radial-gradient(600px circle at var(--cursor-x, 50%) var(--cursor-y, 50%), var(--spotlight-color), transparent 40%);
    z-index: 9999;
    transition: background 0.1s;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-hairline);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--dot-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--dot-green);
    animation: breathe 3s infinite ease-in-out;
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-hairline);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    background: var(--card-hover-bg);
}

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: none; }

/* Buttons */
.cta-button-small, .cta-button, .cta-button-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-hairline);
    background: var(--card-bg);
    color: var(--text-main);
}

.cta-button-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.cta-button-large {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    margin-top: 2rem;
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
}

.cta-button {
    padding: 0.8rem 1.5rem;
    width: 100%;
    margin-top: 1.5rem;
}
.cta-button.primary {
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
}

.cta-button-small:hover, .cta-button:hover {
    border-color: var(--text-accent);
    background: var(--card-hover-bg);
}
.cta-button-large:hover, .cta-button.primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Layout */
main {
    margin-top: 70px;
}

section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}
.section-subtitle {
    color: var(--text-accent);
    margin-bottom: 3.5rem;
    font-size: 1.1rem;
}

/* Protocol Switcher */
.protocol-switcher {
    position: relative;
    display: inline-flex;
    background: var(--card-bg);
    border: 1px solid var(--border-hairline);
    border-radius: 99px;
    padding: 4px;
    margin-bottom: 3rem;
}

.switcher-slider {
    position: absolute;
    top: 4px; left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background: var(--border-hairline);
    border-radius: 99px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.proto-btn {
    position: relative;
    z-index: 1;
    background: none;
    border: none;
    padding: 0.5rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-accent);
    cursor: pointer;
    transition: color 0.3s;
}
.proto-btn.active {
    color: var(--text-main);
}

/* Hero */
.hero {
    text-align: left;
    padding: 12rem 2rem 8rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.brand-highlight {
    color: var(--text-accent);
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-accent);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Live Ping Spectrum */
.live-ping-spectrum {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin-bottom: 2rem;
    height: 30px;
}
.ping-line {
    width: 3px;
    background: var(--dot-green);
    border-radius: 2px;
    animation: ping-bounce 1s infinite ease-in-out alternate;
}
.ping-line:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.ping-line:nth-child(2) { height: 70%; animation-delay: 0.3s; }
.ping-line:nth-child(3) { height: 50%; animation-delay: 0.2s; }
.ping-line:nth-child(4) { height: 90%; animation-delay: 0.5s; }
.ping-line:nth-child(5) { height: 60%; animation-delay: 0.4s; }
.ping-line:nth-child(6) { height: 80%; animation-delay: 0.6s; }
.ping-line:nth-child(7) { height: 40%; animation-delay: 0.2s; }

@keyframes ping-bounce {
    0% { transform: scaleY(0.5); opacity: 0.5; }
    100% { transform: scaleY(1); opacity: 1; }
}
.live-ping-spectrum .geist-font {
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-accent);
}
.live-ping-spectrum #hero-ping {
    color: var(--text-main);
}

/* Node Demo Section */
.node-demo {
    padding-top: 4rem;
}
.nodes-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.node-btn {
    flex: 1;
    min-width: 250px;
    background: var(--card-bg);
    border: 1px solid var(--border-hairline);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: var(--text-main);
    transition: border-color 0.3s, transform 0.3s;
}
.node-btn:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.node-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.node-name {
    font-weight: 600;
    font-size: 1.1rem;
}
.node-desc {
    font-size: 0.85rem;
    color: var(--text-accent);
    margin-top: 4px;
}
.node-ping {
    font-size: 1.1rem;
    color: var(--dot-green);
}
/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}
[data-theme="light"] .ripple {
    background: rgba(0, 0, 0, 0.05);
}
@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-hairline);
    padding: 2.5rem;
    border-radius: 16px;
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
}
.bento-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--border-hover);
}
.bento-icon {
    font-size: 1.5rem;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
}
.bento-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.bento-card p {
    color: var(--text-accent);
    font-size: 0.95rem;
}

/* Support Section */
.support-section {
    padding-top: 0;
}
.support-grid {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.status-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-hairline);
}
[data-theme="light"] .status-badge {
    background: rgba(0,0,0,0.03);
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-hairline);
    padding: 3rem 2rem;
    border-radius: 16px;
    position: relative;
    transition: all 0.3s;
}
.pricing-card:hover {
    border-color: var(--border-hover);
}
.pricing-card.featured {
    border-color: var(--text-accent);
    background: var(--card-hover-bg);
}
.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: var(--bg-color);
    padding: 4px 16px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}
.plan-name {
    color: var(--text-accent);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}
.price-period {
    font-size: 1rem;
    color: var(--text-accent);
    font-weight: 400;
}
.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}
.plan-features li {
    padding: 0.8rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-hairline);
    color: var(--text-accent);
}
.plan-features li:last-child {
    border-bottom: none;
}

/* Reviews */
.review-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.review-card .comment {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    font-style: italic;
}
.user-meta .user-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.user-meta .user-role {
    font-size: 0.8rem;
    color: var(--text-accent);
}

/* FAQ */
.faq-list {
    max-width: 800px;
}
.faq-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-hairline);
}
.faq-item h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.faq-item p {
    color: var(--text-accent);
    font-size: 0.95rem;
}

/* Other Pages Content Base */
.page-content {
    max-width: 800px;
    margin: 120px auto 60px;
    padding: 4rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-hairline);
}
.page-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}
.page-content h2 {
    font-size: 1.3rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.page-content p {
    color: var(--text-accent);
    margin-bottom: 1.5rem;
}
.page-content ul {
    padding-left: 1.5rem;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
}
.page-content ul li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-hairline);
    padding: 4rem 2rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.footer-links {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    color: var(--text-accent);
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: var(--text-main);
}
.copyright {
    color: var(--text-accent);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero {
        padding: 8rem 1rem 4rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    section {
        padding: 5rem 1rem;
    }
    .support-grid, .pricing-grid, .bento-grid {
        grid-template-columns: 1fr;
    }
    .page-content {
        padding: 2rem 1.5rem;
        margin: 100px 1rem 40px;
    }
    
    /* Enhance tap targets */
    .cta-button, .cta-button-large, .node-btn {
        min-height: 54px;
    }
}
