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

:root {
    --bg-color: #040507;
    --green-neon: #00ff66;
    --green-bright: #39ff14;
    --green-glow: rgba(0, 255, 102, 0.4);
    --green-dim: rgba(0, 255, 102, 0.15);
    --island-bg: rgba(12, 13, 17, 0.78);
    --island-border: rgba(255, 255, 255, 0.08);
    --text-white: #ffffff;
    --text-muted: #8e95a5;
    --font-heading: 'Orbitron', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-ui: 'Inter', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: var(--font-ui);
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* Background Canvas Matrix Rain */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    display: block;
}

/* Cyber atmosphere overlays */
.cyber-vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 40%, rgba(4, 5, 7, 0.85) 90%, rgba(2, 3, 4, 0.98) 100%);
}

.cyber-scanlines {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 6px 100%;
    opacity: 0.6;
}

/* Floating Island Header */
.island-container {
    position: fixed;
    top: 24px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 0 20px;
    animation: islandFadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.island-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    height: 58px;
    padding: 0 22px;
    background: var(--island-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--island-border);
    border-radius: 9999px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 25px rgba(0, 255, 102, 0.05);
    transition: all 0.3s ease;
}

.island-nav:hover {
    border-color: rgba(0, 255, 102, 0.25);
    box-shadow: 
        0 14px 45px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(0, 255, 102, 0.1),
        0 0 30px rgba(0, 255, 102, 0.12);
}

.island-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.island-icon-box {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid rgba(0, 255, 102, 0.25);
    border-radius: 10px;
    color: var(--green-neon);
}

.island-icon {
    width: 20px;
    height: 20px;
    stroke: var(--green-neon);
    filter: drop-shadow(0 0 6px var(--green-glow));
}

.icon-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 1px solid var(--green-neon);
    opacity: 0;
    animation: iconRipple 2.8s infinite ease-out;
}

.island-text-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.island-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.island-divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 300;
}

.island-slogan {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #dcdfe6, #8e95a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.island-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 102, 0.06);
    border: 1px solid rgba(0, 255, 102, 0.18);
    padding: 5px 12px;
    border-radius: 9999px;
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-neon);
    box-shadow: 0 0 8px var(--green-bright);
    animation: blinkStatus 1.8s infinite ease-in-out;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--green-neon);
}

/* Center Hero Section */
.hero-center {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0 20px;
    text-align: center;
}

/* Glitch and glowing center title */
.glitch-wrapper {
    position: relative;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3.2rem, 9vw, 7.8rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #ffffff;
    position: relative;
    display: inline-block;
    cursor: default;
    
    /* Multilayer neon green glow & shimmer */
    text-shadow:
        0 0 10px rgba(0, 255, 102, 0.8),
        0 0 25px rgba(0, 255, 102, 0.6),
        0 0 60px rgba(0, 255, 102, 0.4),
        0 0 120px rgba(0, 255, 102, 0.25);
    animation: titleBreathing 4s infinite ease-in-out;
}

/* Subtle holographic chromatic glitch effect on hover / pulse */
.hero-title::before,
.hero-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}

.hero-title::before {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    animation: glitchAnim1 3s infinite linear alternate-reverse;
    opacity: 0.7;
}

.hero-title::after {
    left: 2px;
    text-shadow: -2px 0 #39ff14;
    animation: glitchAnim2 2.5s infinite linear alternate-reverse;
    opacity: 0.7;
}

/* Subline below title */
.hero-subline {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 2vw, 0.95rem);
    color: #8cffb4;
    letter-spacing: 0.16em;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.hero-subline .bracket {
    color: var(--green-neon);
    font-weight: 700;
}

/* Metrics and live stream tags */
.hero-metrics {
    margin-top: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.metric-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 9999px;
    background: rgba(14, 18, 22, 0.75);
    border: 1px solid rgba(0, 255, 102, 0.15);
    backdrop-filter: blur(12px);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #cfd8dc;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.25s ease;
}

.metric-pill:hover {
    border-color: rgba(0, 255, 102, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.15);
    color: #ffffff;
}

.metric-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-neon);
    box-shadow: 0 0 6px var(--green-bright);
}

.code-dot {
    background: #00e5ff;
    box-shadow: 0 0 6px #00e5ff;
}

#binary-stream {
    color: var(--green-neon);
    font-weight: 700;
}

/* Keyframe Animations */
@keyframes islandFadeDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconRipple {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

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

@keyframes titleBreathing {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(0, 255, 102, 0.8),
            0 0 25px rgba(0, 255, 102, 0.6),
            0 0 60px rgba(0, 255, 102, 0.4),
            0 0 120px rgba(0, 255, 102, 0.25);
    }
    50% {
        text-shadow:
            0 0 14px rgba(0, 255, 102, 0.95),
            0 0 35px rgba(0, 255, 102, 0.75),
            0 0 80px rgba(0, 255, 102, 0.55),
            0 0 150px rgba(0, 255, 102, 0.35);
    }
}

@keyframes glitchAnim1 {
    0% { clip-path: inset(40% 0 61% 0); }
    20% { clip-path: inset(92% 0 1% 0); }
    40% { clip-path: inset(10% 0 85% 0); }
    60% { clip-path: inset(62% 0 35% 0); }
    80% { clip-path: inset(25% 0 58% 0); }
    100% { clip-path: inset(78% 0 12% 0); }
}

@keyframes glitchAnim2 {
    0% { clip-path: inset(25% 0 58% 0); }
    20% { clip-path: inset(70% 0 15% 0); }
    40% { clip-path: inset(5% 0 80% 0); }
    60% { clip-path: inset(82% 0 5% 0); }
    80% { clip-path: inset(45% 0 40% 0); }
    100% { clip-path: inset(12% 0 75% 0); }
}

/* Responsiveness */
@media (max-width: 640px) {
    .island-nav {
        height: 52px;
        padding: 0 16px;
    }
    .island-title {
        font-size: 13px;
    }
    .island-slogan {
        font-size: 11px;
    }
    .island-divider {
        display: none;
    }
    .island-left {
        gap: 10px;
    }
    .island-status {
        padding: 4px 8px;
    }
    .status-text {
        display: none;
    }
}
