:root {
    --bg: #03050a;
    --panel: rgba(7, 13, 24, .82);
    --blue: #18a8ff;
    --blue2: #006eff;
    --text: #eaf7ff;
    --muted: #7f94aa;
    --border: rgba(24, 168, 255, .25);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

body {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   BACKGROUND
========================================================= */

.ambient {
    position: fixed;
    inset: -20%;
    pointer-events: none;
    z-index: 0;

    background:
        radial-gradient(
            circle at 20% 25%,
            rgba(0, 110, 255, .20),
            transparent 23%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(0, 190, 255, .13),
            transparent 25%
        ),
        radial-gradient(
            circle at 50% 110%,
            rgba(0, 75, 255, .14),
            transparent 30%
        );

    filter: blur(30px);

    animation:
        ambientMove
        12s
        ease-in-out
        infinite
        alternate;
}

@keyframes ambientMove {

    to {
        transform:
            translate(3%, -2%)
            scale(1.06);
    }
}


.scanline {
    position: fixed;
    inset: 0;

    pointer-events: none;

    z-index: 1;

    opacity: .035;

    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 3px,
            #fff 4px
        );

    mix-blend-mode: overlay;
}


/* =========================================================
   HEADER
========================================================= */

.topbar,
.simple-header,
.room-header {
    position: relative;

    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 25px 5vw;
}

.room-header {
    border-bottom:
        1px solid
        rgba(24, 168, 255, .10);
}


.logo {
    font-weight: 900;

    letter-spacing: .18em;

    font-size: 18px;

    text-shadow:
        0 0 18px
        rgba(24, 168, 255, .8);
}

.logo b {
    color: #42b9ff;
}


.room-meta {
    display: flex;

    align-items: center;

    gap: 12px;

    color: #7891a7;

    font-size: 11px;
}


/* =========================================================
   LIVE
========================================================= */

.live-pill {
    font-size: 11px;

    letter-spacing: .12em;

    border:
        1px solid
        var(--border);

    background:
        rgba(0, 110, 255, .08);

    padding: 8px 12px;

    border-radius: 999px;

    box-shadow:
        0 0 18px
        rgba(0, 110, 255, .12);
}

.live-pill i,
.status-dot {
    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #1ba7ff;

    box-shadow:
        0 0 12px
        #1ba7ff;

    margin-right: 6px;

    animation:
        blink
        1.2s
        infinite;
}

@keyframes blink {

    50% {
        opacity: .3;
    }
}


/* =========================================================
   BUTTON
========================================================= */

.btn {
    border:
        1px solid
        var(--border);

    border-radius: 12px;

    padding: 13px 19px;

    font-weight: 800;

    color: var(--text);

    transition: .2s;

    position: relative;

    overflow: hidden;
}

.btn:before {
    content: "";

    position: absolute;

    top: 0;
    left: -70%;

    width: 40%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.35),
            transparent
        );

    transform:
        skewX(-20deg);

    animation:
        runlight
        4s
        infinite;
}

@keyframes runlight {

    0%,
    70% {
        left: -70%;
    }

    100% {
        left: 140%;
    }
}

.btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 0 25px
        rgba(24, 168, 255, .28);
}

.primary {
    background:
        linear-gradient(
            135deg,
            #008cff,
            #064eff
        );

    border-color: #25aaff;

    box-shadow:
        0 0 24px
        rgba(0, 126, 255, .30);
}

.ghost {
    background:
        rgba(255,255,255,.025);
}

.full {
    width: 100%;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;

    z-index: 2;

    min-height:
        calc(100vh - 100px);

    display: grid;

    grid-template-columns:
        1.05fr .95fr;

    gap: 6vw;

    align-items: center;

    padding:
        30px
        8vw
        80px;
}

.eyebrow {
    color: #38b6ff;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: .2em;

    margin-bottom: 15px;
}

.hero h1,
.form-wrap h1 {
    font-size:
        clamp(
            46px,
            7vw,
            92px
        );

    line-height: .92;

    margin: 0;

    letter-spacing: -.055em;
}

.hero h1 span {
    color: #2faeff;

    text-shadow:
        0 0 30px
        rgba(24,168,255,.45);
}

.lead {
    max-width: 610px;

    color: var(--muted);

    font-size: 17px;

    line-height: 1.8;

    margin: 28px 0;
}

.actions {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;
}

.features {
    display: flex;

    gap: 25px;

    margin-top: 45px;
}

.features div {
    display: flex;

    align-items: center;

    gap: 9px;

    color: #8297ac;

    font-size: 12px;
}

.features b {
    color: #38b6ff;

    font-size: 18px;

    text-shadow:
        0 0 12px
        #009cff;
}


/* =========================================================
   NEON CARD
========================================================= */

.neon-card {
    position: relative;

    background:
        linear-gradient(
            145deg,
            rgba(11,20,35,.92),
            rgba(3,8,16,.88)
        );

    border:
        1px solid
        rgba(24,168,255,.3);

    border-radius: 20px;

    box-shadow:
        0 0 45px
        rgba(0,103,255,.11),

        inset 0 0 35px
        rgba(0,140,255,.035);

    overflow: hidden;
}

.neon-card:after {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    padding: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #1aa9ff,
            transparent
        );

    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);

    -webkit-mask-composite: xor;

    mask-composite: exclude;

    animation:
        borderRun
        5s
        linear
        infinite;

    pointer-events: none;
}

@keyframes borderRun {

    to {
        transform:
            rotate(360deg);
    }
}


/* =========================================================
   HERO VISUAL
========================================================= */

.hero-visual {
    position: relative;

    min-height: 470px;

    display: grid;

    place-items: center;
}

.visual-card {
    width:
        min(
            500px,
            100%
        );

    padding: 12px;

    transform:
        rotate(2deg);
}

.visual-top {
    display: flex;

    justify-content: space-between;

    padding: 10px;

    color: #7fa2bd;

    font-size: 10px;

    letter-spacing: .12em;
}

.fake-player {
    height: 270px;

    border-radius: 13px;

    background:
        radial-gradient(
            circle at center,
            rgba(0,145,255,.22),
            transparent 35%
        ),
        #02050a;

    display: grid;

    place-items: center;

    border:
        1px solid
        rgba(255,255,255,.05);
}

.play {
    width: 70px;
    height: 70px;

    border:
        1px solid
        #25aaff;

    border-radius: 50%;

    display: grid;

    place-items: center;

    color: #42b9ff;

    box-shadow:
        0 0 35px
        rgba(24,168,255,.3);
}

.mini-chat {
    padding: 14px;

    font-size: 12px;

    color: #8297ac;

    line-height: 2;
}

.mini-chat b {
    color: #38b6ff;
}


/* =========================================================
   ORBIT
========================================================= */

.orbit {
    position: absolute;

    border:
        1px solid
        rgba(0,154,255,.12);

    border-radius: 50%;

    animation:
        spin
        15s
        linear
        infinite;
}

.orbit-a {
    width: 540px;
    height: 300px;

    transform:
        rotate(25deg);
}

.orbit-b {
    width: 350px;
    height: 520px;

    transform:
        rotate(-40deg);

    animation-duration: 21s;
}

@keyframes spin {

    to {
        transform:
            rotate(385deg);
    }
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    position: relative;

    z-index: 2;

    text-align: center;

    color: #42576a;

    font-size: 10px;

    letter-spacing: .14em;

    padding: 20px;
}


/* =========================================================
   FORM
========================================================= */

.center-page {
    min-height: 100vh;

    display: flex;

    flex-direction: column;
}

.form-wrap {
    position: relative;

    z-index: 2;

    width:
        min(
            540px,
            90%
        );

    margin: 8vh auto;
}

.form-wrap h1 {
    font-size: 52px;
}

.muted {
    color: var(--muted);

    line-height: 1.7;
}

.form-card {
    margin-top: 25px;

    padding: 26px;
}

.form-card label {
    display: block;

    color: #9bb0c2;

    font-size: 12px;

    font-weight: 700;

    margin-bottom: 17px;
}


/* =========================================================
   INPUT
========================================================= */

input {
    width: 100%;

    background:
        rgba(0,0,0,.3);

    border:
        1px solid
        rgba(24,168,255,.2);

    color: white;

    padding: 14px;

    border-radius: 11px;

    outline: 0;

    margin-top: 8px;
}

input:focus {
    border-color: #21aaff;

    box-shadow:
        0 0 20px
        rgba(24,168,255,.1);
}

.error {
    color: #ff6f91;

    font-size: 12px;

    margin-top: 12px;
}


/* =========================================================
   INSTALL
========================================================= */

.install-card {
    position: relative;

    z-index: 2;

    width:
        min(
            560px,
            90%
        );

    margin: auto;

    padding: 35px;

    text-align: center;
}

.install-card h1 {
    font-size: 40px;
}


/* =========================================================
   ROOM
========================================================= */

.room-grid {
    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        370px;

    gap: 20px;

    padding:
        30px
        4vw
        50px;

    max-width: 1500px;

    margin: auto;
}

.room-title {
    margin-bottom: 17px;
}

.room-title h1 {
    font-size:
        clamp(
            28px,
            4vw,
            46px
        );

    margin: 0;
}

.room-title p {
    color: #71879b;

    font-size: 12px;
}


/* =========================================================
   PLAYER
========================================================= */

.player-shell {
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #010205;

    position: relative;
}

#player {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;
}

.player-notice {
    position: absolute;

    inset: 0;

    display: grid;

    place-items: center;

    color: #698196;

    background:
        radial-gradient(
            circle,
            rgba(0,115,255,.12),
            transparent 45%
        );

    font-size: 13px;

    z-index: 3;

    pointer-events: none;
}


/* =========================================================
   HOST PANEL
========================================================= */

.host-panel {
    margin-top: 15px;

    padding: 16px;
}

.panel-title {
    font-size: 10px;

    letter-spacing: .15em;

    color: #36b4ff;

    font-weight: 800;

    margin-bottom: 10px;
}

.input-row {
    display: flex;

    gap: 8px;
}

.input-row input {
    margin: 0;
}

.input-row .btn {
    white-space: nowrap;
}

.host-buttons {
    display: flex;

    gap: 8px;

    margin-top: 10px;
}

.host-buttons .btn {
    padding: 9px 12px;

    font-size: 11px;
}

.host-help {
    font-size: 10px;

    color: #60768b;

    margin-top: 10px;
}

.hidden {
    display: none !important;
}


/* =========================================================
   CHAT
========================================================= */

.chat-card {
    height:
        calc(
            100vh - 150px
        );

    min-height: 500px;

    display: flex;

    flex-direction: column;
}

.chat-head {
    padding: 17px;

    border-bottom:
        1px solid
        rgba(24,168,255,.12);

    display: flex;

    justify-content: space-between;
}

.chat-head b {
    display: block;

    font-size: 11px;

    letter-spacing: .12em;
}

.chat-head small {
    display: block;

    color: #3baeff;

    font-size: 9px;

    margin-top: 4px;
}

#memberCount {
    color: #3baeff;

    font-weight: 800;

    font-size: 12px;
}


/* =========================================================
   MESSAGES
========================================================= */

.messages {
    flex: 1;

    overflow-y: auto;

    padding: 15px;

    scrollbar-width: thin;
}

.messages::-webkit-scrollbar {
    width: 5px;
}

.messages::-webkit-scrollbar-thumb {
    background: rgba(24,168,255,.25);

    border-radius: 20px;
}

.message {
    padding: 9px 0;

    border-bottom:
        1px solid
        rgba(255,255,255,.035);

    font-size: 12px;

    line-height: 1.5;

    word-break: break-word;
}

.message b {
    color: #3eb7ff;

    margin-right: 7px;
}

.message span {
    color: #a4b4c2;
}


/* =========================================================
   CHAT FORM
========================================================= */

.chat-form {
    display: flex;

    gap: 7px;

    padding: 12px;

    border-top:
        1px solid
        rgba(24,168,255,.12);
}

.chat-form input {
    margin: 0;
}

.chat-form button {
    width: 45px;

    min-width: 45px;

    border:
        1px solid
        #168fff;

    background:
        #006eff;

    color: white;

    border-radius: 10px;

    transition: .2s;
}

.chat-form button:hover {
    box-shadow:
        0 0 18px
        rgba(0,126,255,.5);

    transform:
        translateY(-1px);
}


/* =========================================================
   COPY BUTTON
========================================================= */

.icon-btn {
    border:
        1px solid
        var(--border);

    background:
        rgba(0,110,255,.07);

    color: #9ddcff;

    border-radius: 10px;

    padding: 8px 11px;

    transition: .2s;
}

.icon-btn:hover {
    background:
        rgba(0,110,255,.16);

    box-shadow:
        0 0 18px
        rgba(0,126,255,.2);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;

        padding:
            50px
            7vw;
    }

    .hero-visual {
        min-height: 400px;
    }

    .room-grid {
        grid-template-columns: 1fr;

        padding:
            20px
            3vw;
    }

    .chat-card {
        height: 500px;

        min-height: 0;
    }
}


@media (max-width: 560px) {

    .topbar,
    .simple-header,
    .room-header {
        padding: 20px;
    }

    .live-pill {
        display: none;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero-visual {
        min-height: 330px;
    }

    .fake-player {
        height: 190px;
    }

    .features {
        gap: 13px;
    }

    .features div {
        font-size: 10px;
    }

    .form-wrap h1 {
        font-size: 42px;
    }

    .input-row {
        flex-direction: column;
    }

    .input-row .btn {
        width: 100%;
    }

    .host-buttons {
        flex-wrap: wrap;
    }

    .host-buttons .btn {
        flex: 1;
    }

    .room-meta {
        gap: 6px;
    }

    #online {
        display: none;
    }

    .room-title h1 {
        font-size: 30px;
    }
}