:root {
        --purple: #b570ff;
        --neon: rgba(181,112,255,0.9);
        --glass-bg: rgba(255, 255, 255, 0.04);
        --glass-border: rgba(255, 255, 255, 0.14);
        --accent-a: #b570ff;
        --accent-b: #7fe0ff;
        --accent-c: #fff7ff;
    }

    body {
        margin: 0;
        height: 100vh;
        font-family: "Poppins", sans-serif;
        color: white;
        background: #0a0712;
        overflow: hidden;
    }

    #star-canvas {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 0;
    }

    #highlight {
        position: fixed;
        width: 450px;
        height: 450px;
        background: radial-gradient(circle, rgba(181,112,255,0.28), transparent 70%);
        pointer-events: none;
        filter: blur(70px);
        transform: translate(-50%, -50%);
        z-index: 1;
        opacity: 0;
        mix-blend-mode: screen;
        transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
    }

    /* Highlight when attracting (right mouse) */
    #highlight.attract { 
        background: radial-gradient(circle, rgba(127,224,255,0.36), rgba(183,120,255,0.28) 45%, transparent 70%);
        filter: blur(48px) saturate(150%);
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }

    .glass-box {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 55px 90px;
        background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
        border-radius: 30px;
        -webkit-backdrop-filter: blur(28px) saturate(190%);
        backdrop-filter: blur(28px) saturate(190%);
        text-align: center;
        z-index: 2;
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow:
            0 6px 30px rgba(10,8,18,0.6),
            0 0 35px rgba(181,112,255,0.18),
            inset 0 0 40px rgba(255,255,255,0.03);
        animation: neonPulse 10.5s ease-in-out infinite alternate;
        overflow: hidden;
    }

    /* subtle glossy sheen that slowly sweeps across */
    .glass-box::before {
        content: "";
        position: absolute;
        left: -40%;
        top: -30%;
        width: 200%;
        height: 160%;
        background: linear-gradient(120deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.06) 45%, rgba(255,255,255,0.02) 60%, rgba(255,255,255,0.00) 100%);
        transform: rotate(-12deg);
        filter: blur(10px);
        opacity: 0.9;
        mix-blend-mode: overlay;
        animation: sheen 8s linear infinite;
        pointer-events: none;
    }

    @keyframes sheen {
        0% { transform: translateX(-100%) rotate(-12deg); }
        100% { transform: translateX(100%) rotate(-12deg); }
    }

    @keyframes neonPulse {
        0% { box-shadow: 0 0 25px rgba(181,112,255,0.18), 0 0 55px rgba(181,112,255,0.15), inset 0 0 40px rgba(255,255,255,0.04); }
        100% { box-shadow: 0 0 40px rgba(181,112,255,0.45), 0 0 90px rgba(181,112,255,0.35), inset 0 0 50px rgba(255,255,255,0.06); }
    }

    h1 {
        font-size: 3.4rem;
        margin: 0 0 10px;
        font-weight: 700;
        color: var(--purple);
        text-shadow: 0 0 18px rgba(181,112,255,0.28);
        letter-spacing: 1px;
    }

    /* gradient clipped text + subtle glow */
    .coming-soon {
        background: linear-gradient(90deg, var(--accent-c), var(--accent-a) 35%, var(--accent-b) 75%);
        background-size: 200% 200%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        animation: hueShift 6s ease-in-out infinite;
        text-shadow: 0 6px 22px rgba(123,73,186,0.18), 0 2px 8px rgba(127,224,255,0.06);
        display: inline-block;
    }

    @keyframes hueShift {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    /* a shimmering underline */
    .coming-soon::after {
        content: "";
        display: block;
        height: 6px;
        width: 70%;
        margin: 12px auto 0;
        border-radius: 6px;
        background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(181,112,255,0.18), rgba(127,224,255,0.12));
        filter: blur(6px);
        opacity: 0.95;
    }

    p {
        font-size: 1.15rem;
        opacity: 0.88;
        font-weight: 300;
        margin-top: 14px;
        color: rgba(255,255,255,0.92);
    }

    /* smaller tagline */
    .tagline {
        font-size: 1rem;
        opacity: 0.85;
        margin-top: 10px;
        color: rgba(235,235,255,0.9);
    }

    /* ENTRY OVERLAY */
    .entry-overlay {
        position: fixed;
        inset: 0;
        display:flex;
        align-items:center;
        justify-content:center;
        background: linear-gradient(180deg, rgba(5,4,8,0.78), rgba(5,4,8,0.62));
        z-index: 1000;
        -webkit-backdrop-filter: blur(8px) saturate(140%);
        backdrop-filter: blur(8px) saturate(140%);
        transition: opacity 420ms ease, visibility 420ms ease;
        opacity: 1;
        visibility: visible;
    }

    .entry-overlay.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .entry-card {
        width: min(680px, 92%);
        max-width: 720px;
        padding: 36px 42px;
        border-radius: 20px;
        background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
        -webkit-backdrop-filter: blur(20px) saturate(150%);
        backdrop-filter: blur(20px) saturate(150%);
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 60px rgba(10,8,18,0.7), 0 0 30px rgba(181,112,255,0.08);
        text-align: center;
        color: white;
    }

    .entry-card h2 { margin: 0 0 6px; font-size: 2.2rem; letter-spacing: 0.6px; }
    .entry-card .entry-sub { margin: 6px 0 16px; opacity: 0.86; }

    .entry-btn {
        appearance: none;
        border: 0;
        background: linear-gradient(180deg, rgba(146, 146, 146, 0.356), rgba(43, 0, 40, 0.699));
        color: #6c6c6c;
        padding: 12px 22px;
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 8px 30px rgba(183, 120, 255, 0.212);
        transition: transform 160ms ease, box-shadow 160ms ease;
    }

    .entry-btn:active { transform: translateY(1px) scale(0.998); }

    .entry-links { margin-top: 14px; display:flex; gap:10px; justify-content:center; flex-wrap:wrap }
    .entry-links a {
        color: rgba(255,255,255,0.92);
        padding: 8px 12px;
        border-radius: 10px;
        background: rgba(255,255,255,0.03);
        text-decoration: none;
        font-weight: 600;
        border: 1px solid rgba(255,255,255,0.04);
    }

    /* bottom links box (glassy) */
    .links-box {
        position: fixed;
        left: 50%;
        bottom: 26px;
        transform: translateX(-50%);
        padding: 12px 18px;
        border-radius: 14px;
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
        border: 1px solid rgba(255,255,255,0.08);
        -webkit-backdrop-filter: blur(12px) saturate(140%);
        backdrop-filter: blur(12px) saturate(140%);
        box-shadow: 0 6px 28px rgba(10,8,18,0.6);
        z-index: 30;
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .links-box a { color: white; text-decoration:none; padding:8px 10px; border-radius:8px; background: rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.03); font-weight:600 }

    #mute-btn {
        position: fixed;
        bottom: 75px;
        right: 215px;
        padding: 8px 10px;
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
        padding: 6px 10px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        backdrop-filter: blur(8px) saturate(120%);
        cursor: pointer;
        font-size: 0.95rem;
        color: white;
        display: inline-flex;
        gap: 8px;
        align-items: center;
        z-index: 60;
        transition: 0.16s;
        box-shadow: 0 6px 20px rgba(10,8,18,0.55);
    }
    
    #fav-btn {
        position: fixed;
        bottom: 75px;
        right: 25px;
        padding: 8px 10px;
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
        padding: 6px 10px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        backdrop-filter: blur(8px) saturate(120%);
        cursor: pointer;
        font-size: 0.95rem;
        color: white;
        display: inline-flex;
        gap: 8px;
        align-items: center;
        z-index: 60;
        transition: 0.16s;
        box-shadow: 0 6px 20px rgba(10,8,18,0.55);
    }

    /* Audio widget (bottom-right): buttons and chooser */
    #audio-widget {
        position: fixed;
        right: 20px;
        bottom: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
        z-index: 70;
    }
    .audio-buttons {
        display: inline-flex;
        gap: 8px;
    }
    .audio-button {
        width: 46px;
        height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #fff; /* black & white look */
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 12px;
        cursor: pointer;
        font-size: 1.1rem;
        color: #111;
        transition: 0.16s;
        box-shadow: 0 6px 18px rgba(0,0,0,0.28);
    }
    .audio-button:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.32); transform: translateY(-1px); }
    /* Track controls container (below buttons) */
    #track-controls {
        display: inline-flex;
        gap: 8px;
        align-items: center;
        z-index: 61;
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
        padding: 6px 10px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        backdrop-filter: blur(8px) saturate(120%);
        width: 220px; /* fixed width to avoid layout shift when track name changes */
        justify-content: space-between;
    }
    #track-controls button { appearance:none; border:0; background:transparent; color: white; padding:6px 8px; border-radius:8px; cursor:pointer; font-weight:700 }
    #track-controls button:hover { background: rgba(255,255,255,0.03) }
    #track-name { color: rgba(255,255,255,0.92); font-weight:600; width: 140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; text-align:center }

        /* Audio slider styling: visible filled portion (accent) and inactive track (grey).
           The JS updates the inline background to reflect current value. */
    #audio-slider-div {
        position: fixed;
        right: 75px;
        bottom: 75px;
        display: flex;
        padding: 8px 10px;
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
        padding: 6px 10px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        backdrop-filter: blur(8px) saturate(120%);
        cursor: pointer;
        color: white;
        display: inline-flex;
        gap: 8px;
        align-items: center;
        z-index: 60;
        transition: 0.16s;
        box-shadow: 0 6px 20px rgba(10,8,18,0.55);
        width: 113px;
        height: 30px;
    }
    #audio-slider {
        -webkit-appearance: none;
        appearance: none;
        width: 115px;
        height: 10px;
        border-radius: 8px;
        background: linear-gradient(90deg, rgba(255,255,255,0.8) 100%, rgba(255,255,255,0.8) 0%);
        outline: none;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(0,0,0,0.25) inset;
        transition: box-shadow 120ms ease;
    }
    #audio-slider:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.32) inset; }

    /* Track/Thumb styling for WebKit */
    #audio-slider::-webkit-slider-runnable-track {
        height: 10px;
        border-radius: 8px;
        background: transparent; /* use the element background */
    }
    #audio-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        margin-top: -4px; /* center thumb over track */
        border-radius: 50%;
        background: white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.35);
        border: 2px solid rgba(0,0,0,0.08);
    }
    /* Firefox */
    #audio-slider::-moz-range-track { height: 10px; border-radius: 8px; background: transparent; }
    #audio-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: white; border: 2px solid rgba(0,0,0,0.08); box-shadow: 0 4px 10px rgba(0,0,0,0.35); }
    /* IE */
    #audio-slider::-ms-track { height: 10px; border-radius: 8px; background: transparent; color: transparent; }
    #audio-slider::-ms-thumb { width: 18px; height: 18px; border-radius: 50%; background: white; border: 2px solid rgba(0,0,0,0.08); box-shadow: 0 4px 10px rgba(0,0,0,0.35); }

    /* mute button hover handled by .audio-button */
    .muted { opacity: 0.6; }

    @media (max-width: 600px) {
        /* make the center glass much smaller and mobile-friendly */
    .glass-box {
        width: 72%;
        padding: 20px 18px;
        border-radius: 18px;
        max-height: 78vh;
        overflow: hidden;
    }
        h1 { font-size: 1.8rem; margin-bottom: 8px; }
        p { font-size: 0.95rem; }
        #highlight { width: 220px; height: 220px; filter: blur(44px); }
        /* show mobile controls */
        .mobile-controls { display: flex; gap:8px; position: fixed; right: 12px; top: 12px; z-index: 60; }
    .mobile-controls .mc-btn { display:inline-flex; align-items:center; justify-content:center; padding:8px 10px; border-radius:10px; background: rgba(255,255,255,0.03); color:white; border:1px solid rgba(255,255,255,0.04); font-weight:700; touch-action: manipulation; }
        .mobile-controls .mc-cooldown { font-size:0.8rem; padding:8px 10px; border-radius:10px; background: rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.03); align-self:center }
    .mobile-controls .mc-btn.disabled { opacity: 0.45; pointer-events: none; }
        .gesture-hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: 86px; z-index: 61; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); padding:8px 12px; border-radius:12px; display:flex; gap:10px; align-items:center; border:1px solid rgba(255,255,255,0.06); }
        .gesture-hint .gh-text { font-size: 0.86rem; opacity:0.95 }
        .gesture-hint .gh-close { background: transparent; border:0; color: white; font-size: 1.1rem; padding:0 6px; cursor:pointer }
    }
    /* hide mobile controls on larger screens */
    .mobile-controls { display: none; }
    .gesture-hint { display: none; }

    /* When the viewport is narrow, move the audio widget to the center above
       the links box so it doesn't overlap. Hide the separate fixed mute/fav
       buttons which would otherwise collide with the links. */
    @media (max-width: 720px) {
        #audio-widget {
            right: auto;
            left: 50%;
            transform: translateX(-50%);
            bottom: 100px; /* sits above the links-box (26px) with spacing */
            align-items: center;
            text-align: center;
        }
        #audio-widget .audio-buttons { justify-content: center; }
        #audio-slider-div {
            right: auto;
            left: 50%;
            transform: translateX(-50%);
            bottom: 146px;
            width: auto;
        }
        /* Hide individually positioned buttons (duplicates) on small screens */
        #mute-btn {
            right: auto;
            left: 10%;
            transform: translateX(-50%);
            bottom: 45px;
            width: calc(auto + 20px);
        }
        #fav-btn {
            right: auto;
            left: 90%;
            transform: translateX(-50%);
            bottom: 45px;
            width: calc(auto + 20px);
        }
        /* Make sure the links box remains visible and not covered */
        .links-box { bottom: 26px; }
    }

    /* Penice send UI (glass-styled) */
    .penice-send-box {
        position: fixed;
        left: 50%;
        bottom: 128px;
        transform: translateX(-50%);
        z-index: 99998;
        display: flex;
        gap: 12px;
        align-items: center;
        min-width: 320px;
        padding: 12px 14px;
        border-radius: 14px;
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
        border: 1px solid var(--glass-border);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        backdrop-filter: blur(14px) saturate(160%);
        box-shadow: 0 12px 40px rgba(10,8,18,0.6), 0 0 30px rgba(181,112,255,0.06);
    }
    .penice-send-input {
        flex: 1;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.04);
        background: rgba(255,255,255,0.02);
        color: white;
        font-weight: 600;
        outline: none;
    }
    .penice-send-input::placeholder { color: rgba(255,255,255,0.55); font-weight:500 }
    .penice-send-btn {
        padding: 10px 14px;
        border-radius: 10px;
        border: 0;
        cursor: pointer;
        background: linear-gradient(90deg, rgba(34, 34, 34, 0.342), rgba(61, 0, 66, 0.233));
        color: #6c6c6c;
        font-weight: 800;
        box-shadow: 0 10px 28px rgba(183,120,255,0.14);
        transition: transform 120ms ease, box-shadow 120ms ease;
    }
    .penice-send-btn:active { transform: translateY(1px) }
    .penice-send-close {
        background: transparent;
        border: 0;
        color: rgba(255,255,255,0.9);
        font-size: 1.05rem;
        padding: 8px 10px;
        border-radius: 8px;
        cursor: pointer;
    }

    /* Disable text selection and touch callout globally but allow editing when necessary */
    html, body, * {
        -webkit-touch-callout: none; /* iOS Safari */
        -webkit-user-select: none;   /* Safari */
        -moz-user-select: none;      /* Old Firefox */
        -ms-user-select: none;       /* IE10+ */
        user-select: none;           /* Standard */
        /* Disable touch gestures including pinch-zoom */
        touch-action: none;
        -ms-touch-action: none;
    }

    /* In-page toast for remote/local notifications */
    .site-toast {
        position: fixed;
        left: 50%;
        top: 18px;
        transform: translateX(-50%);
        background: linear-gradient(90deg, rgba(24, 24, 28, 0.315), rgba(40, 12, 60, 0.418));
        color: #fff;
        padding: 10px 16px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.06);
        box-shadow: 0 8px 30px rgba(0,0,0,0.6);
        z-index: 99999;
        font-weight: 700;
        opacity: 0;
        transition: opacity 220ms ease, transform 320ms ease;
        pointer-events: none;
    }
    .site-toast.show {
        opacity: 0.71;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }


    #audio-controls {
        position: fixed;
        bottom: 20px;
        right: 20px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
        z-index: 80;
    }
    /* Allow selection inside explicit editable elements (if added later) */
    input, textarea, [contenteditable="true"] {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
        /* allow touch gestures on inputs so users can interact normally */
        touch-action: manipulation;
        -ms-touch-action: manipulation;
    }

    /* FPS counter styling (hidden by default; shown after typing the sequence 'fps') */
    .fps-counter {
        position: fixed;
        top: 12px;
        right: 12px;
        padding: 6px 10px;
        border-radius: 8px;
        background: rgba(10,8,18,0.7);
        color: #ffffff;
        font-family: monospace;
        font-weight: 700;
        font-size: 0.9rem;
        z-index: 100000;
        pointer-events: none;
        box-shadow: 0 6px 20px rgba(0,0,0,0.6);
        display: none;
        opacity: 0;
        transition: opacity 200ms ease, transform 200ms ease;
    }
    .fps-counter.visible { display: block; opacity: 1; transform: translateY(0); }