:root {
    --cyan: #00d2ff;
    --cyan-soft: rgba(0, 210, 255, 0.2);
    --pink: #ff2bd6;
    --lime: #b8ff3d;
    --dark: #02040a;
    --text: #f7fbff;
    --muted: #8ba7bc;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow: hidden;
    background: #000;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

#canvas-container {
    position: fixed;
    inset: 0;
    z-index: 1;
}

.vignette,
.grid-overlay {
    position: fixed;
    pointer-events: none;
}

.vignette {
    inset: 0;
    z-index: 3;
    background:
        radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.22) 42%, rgba(0, 0, 0, 0.92) 100%),
        linear-gradient(180deg, rgba(0, 210, 255, 0.08), transparent 34%, rgba(255, 43, 214, 0.08));
}

.grid-overlay {
    inset: 0;
    z-index: 2;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(0, 210, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.12) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 78%);
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: #000;
}

.loader-panel {
    width: min(420px, calc(100% - 42px));
    text-align: center;
}

.loader-kicker {
    display: block;
    margin-bottom: 20px;
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.36em;
    text-transform: uppercase;
}

.load-bar-container {
    height: 5px;
    overflow: hidden;
    border: 1px solid rgba(0, 210, 255, 0.38);
    border-radius: 999px;
    background: rgba(0, 210, 255, 0.1);
}

#load-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--lime));
    box-shadow: 0 0 16px var(--cyan);
}

#start-prompt {
    display: none;
    margin-top: 28px;
}

/* UI Layer */
.ui-layer {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.hero {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 36px;
}

.hero-main {
    text-align: center;
}

.logo {
    width: min(140px, 32vw);
    height: auto;
    margin-bottom: 20px;
    opacity: 0;
    filter: drop-shadow(0 0 32px rgba(0, 210, 255, 0.85));
}

.hud-element,
.reveal-element {
    opacity: 0;
    transform: translateY(18px);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid var(--lime);
    border-radius: 999px;
    background: rgba(184, 255, 61, 0.1);
    color: var(--lime);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(184, 255, 61, 0.5);
}

h1 {
    margin: 0;
    font-size: clamp(1.5rem, 4.1vw, 3.7rem);
    line-height: 0.95;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow:
        0.04em 0 0 rgba(255, 43, 214, 0.72),
        -0.03em -0.035em 0 rgba(0, 210, 255, 0.72),
        0 0 38px rgba(0, 210, 255, 0.35);
}

.subtitle {
    max-width: 580px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1.5;
    font-weight: 700;
}

.actions {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.portal-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 36px;
    overflow: hidden;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    background: rgba(0, 210, 255, 0.08);
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
    box-shadow: 0 0 24px rgba(0, 210, 255, 0.25);
    text-decoration: none;
    font-size: clamp(0.85rem, 1.6vw, 1rem);
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.portal-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
    transition: transform 0.5s ease;
}

.portal-btn:hover {
    color: #001018;
    background: var(--cyan);
    box-shadow: 0 0 54px rgba(0, 210, 255, 0.72);
    transform: translateY(-3px);
}

.portal-btn:hover::before {
    transform: translateX(120%);
}

/* Project Radar */
.project-radar {
    align-self: stretch;
    padding: 18px;
    border: 1px solid rgba(0, 210, 255, 0.32);
    border-radius: 14px;
    background: rgba(2, 4, 10, 0.92);
    box-shadow: inset 0 0 32px rgba(0, 210, 255, 0.08), 0 26px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(10px);
}

.radar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.radar-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 18px var(--lime);
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.75); opacity: 0.55; }
    50% { transform: scale(1); opacity: 1; }
}

.signal-list {
    display: grid;
    gap: 12px;
}

.signal {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
}

.signal strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.signal span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 700;
}

/* Corner Tag */
.corner-tag {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 10;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* Audio Controls */
.audio-controls {
    position: fixed;
    top: 20px;
    left: 24px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.audio-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 210, 255, 0.4);
    border-radius: 8px;
    background: rgba(0, 210, 255, 0.08);
    color: var(--cyan);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover {
    background: rgba(0, 210, 255, 0.25);
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.4);
}

.audio-btn.muted {
    opacity: 0.5;
}

/* Responsive 900px */
@media (max-width: 900px) {
    html,
    body {
        overflow-y: auto;
    }

    .ui-layer {
        min-height: 100vh;
        padding: 70px 16px 90px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-radar {
        min-height: auto;
    }

    .corner-tag,
    .audio-controls {
        position: absolute;
    }
}

/* Responsive 560px */
@media (max-width: 560px) {
    .portal-btn {
        width: 100%;
        min-height: 50px;
        padding: 0 18px;
    }

    .eyebrow {
        letter-spacing: 0.2em;
    }

    .project-radar {
        padding: 14px;
    }

    .signal {
        padding: 10px;
    }

    .corner-tag {
        top: 16px;
        right: 16px;
        font-size: 0.6rem;
    }

    .audio-controls {
        top: 16px;
        left: 16px;
    }

    .audio-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Responsive 400px */
@media (max-width: 400px) {
    h1 {
        font-size: 1.4rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .logo {
        width: min(100px, 28vw);
    }
}
