:root {
    --bg: #07110b;
    --card: rgba(8, 16, 11, 0.82);
    --line: rgba(198, 255, 74, 0.2);
    --lime: #c6ff4a;
    --ink: #f4f7ef;
    --muted: #b7c4ae;
    --red: #ff3355;
    --yellow: #ffe14a;
    --blue: #4d8dff;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
body { overflow-x: hidden; }

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: Outfit, "Segoe UI", sans-serif;
    background:
        radial-gradient(900px 520px at 50% -12%, rgba(198, 255, 74, 0.16), transparent 58%),
        #07110b;
}

.scene {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.shape { position: absolute; display: block; }

.ring {
    width: 220px;
    height: 220px;
    border: 16px solid rgba(255, 51, 85, 0.72);
    border-radius: 50%;
    top: 8%;
    left: max(-40px, calc(50% - 560px));
}

.square {
    width: 120px;
    height: 120px;
    background: rgba(255, 225, 74, 0.9);
    top: 14%;
    right: max(-20px, calc(50% - 540px));
    transform: rotate(14deg);
}

.bar {
    width: 34px;
    height: 150px;
    background: rgba(77, 141, 255, 0.9);
    bottom: 12%;
    left: max(10px, calc(50% - 500px));
    transform: rotate(18deg);
    border-radius: 8px;
}

.tri {
    width: 0;
    height: 0;
    border-left: 58px solid transparent;
    border-right: 58px solid transparent;
    border-bottom: 100px solid rgba(138, 223, 47, 0.9);
    bottom: 16%;
    right: max(0px, calc(50% - 520px));
}

.glow {
    width: 460px;
    height: 460px;
    left: 50%;
    top: 80px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(198, 255, 74, 0.16), transparent 68%);
}

.card {
    position: relative;
    z-index: 1;
    width: min(480px, calc(100% - 28px));
    margin: 36px auto 48px;
    padding: 22px 18px 18px;
    border-radius: 32px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    animation: fade-up 0.7s cubic-bezier(0.22, 0.7, 0.2, 1) both;
    transition: width 0.45s ease;
}

.card.wide { width: min(960px, calc(100% - 28px)); }

.langs {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.langs a {
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 6px 10px;
    border-radius: 999px;
}

.langs a.on {
    background: var(--lime);
    color: #142000;
}

.identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: min(440px, 100%);
    margin: 0 auto;
}

.avatar-wrap {
    position: relative;
    width: 124px;
    height: 124px;
    margin-top: 58px;
    border-radius: 28px;
    padding: 3px;
    background: rgba(198, 255, 74, 0.35);
    animation: pop 0.65s cubic-bezier(0.22, 0.8, 0.2, 1) 0.08s both;
}

.avatar-wrap.is-live {
    background: linear-gradient(140deg, var(--red), var(--lime));
    animation:
        pop 0.65s cubic-bezier(0.22, 0.8, 0.2, 1) 0.08s both,
        live-glow 2.6s ease-in-out 0.7s infinite;
}

.avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    border-radius: 25px;
    display: block;
    background: #8adf2f;
}

.avatar-live {
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 3px 8px;
    border-radius: 999px;
}

h1 {
    margin: 18px 0 0;
    font-family: Syne, Outfit, sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: -0.045em;
    line-height: 1;
}

h1 span {
    display: inline-block;
    margin-left: 4px;
    padding: 5px 8px 4px;
    border-radius: 999px;
    background: var(--lime);
    color: #142000;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    vertical-align: 8px;
}

.handle, .tagline { margin: 0; }

.handle {
    margin-top: 8px;
    color: var(--lime);
    font-weight: 600;
}

.tagline {
    margin-top: 6px;
    color: var(--muted);
}

.followers {
    margin: 8px 0 0;
    font-weight: 700;
    color: var(--lime);
}

.followers[hidden] { display: none; }

.share {
    appearance: none;
    margin-top: 12px;
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(198, 255, 74, 0.45);
    background: rgba(198, 255, 74, 0.08);
    color: var(--lime);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.share svg {
    width: 16px;
    height: 16px;
    display: block;
}

.share.done {
    background: var(--lime);
    color: #142000;
    border-color: transparent;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.chips[hidden],
.chip[hidden],
.stage[hidden],
.panel[hidden],
.mini-live[hidden],
.stream-title[hidden],
.stream-game[hidden] {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.92rem;
    font-weight: 600;
}

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5d6b58;
    flex: none;
}

.chip.on {
    color: var(--ink);
    border-color: rgba(255, 51, 85, 0.55);
    background: rgba(255, 51, 85, 0.1);
}

.chip.on .chip-dot,
.live-pill .chip-dot {
    background: var(--red);
    box-shadow: 0 0 0 0 rgba(255, 51, 85, 0.65);
    animation: pulse 1.6s infinite;
}

.chip-state { color: #ffd0d8; font-weight: 600; }

.chip-state:empty { display: none; }

.stage {
    width: min(860px, 100%);
    margin: 22px auto 0;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tab {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}

.tab.on {
    background: var(--lime);
    color: #142000;
    border-color: transparent;
}

.panel-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--red);
    color: white;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 8px;
}

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

.stream-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.stream-game {
    margin: 0 0 12px;
    color: var(--lime);
    font-weight: 600;
}

.player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}

.player iframe,
.player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    object-fit: contain;
}

.player.portrait {
    aspect-ratio: 9 / 16;
    width: min(100%, 380px, calc(72vh * 9 / 16));
    max-height: 72vh;
    margin-inline: auto;
}

.open-row { margin: 10px 0 0; }

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

.open-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.open-link:hover { color: var(--lime); }

.open-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: none;
}

.open-icon svg { width: 16px; height: 16px; display: block; }

.open-icon.twitch { color: #d0b4ff; background: rgba(145, 70, 255, 0.16); }
.open-icon.youtube { color: #ff7388; background: rgba(255, 0, 60, 0.14); }
.open-icon.tiktok { color: #fff; background: rgba(255, 255, 255, 0.08); }

.tiktok-fallback {
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.note { margin: 0 0 14px; line-height: 1.45; }

.watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px 0 10px;
    border-radius: 14px;
    background: var(--lime);
    color: #142000;
    font-weight: 800;
    text-decoration: none;
}

.watch .open-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.links {
    width: min(440px, 100%);
    margin: 18px auto 0;
    display: grid;
    gap: 10px;
}

.site-foot {
    width: min(440px, 100%);
    margin: 18px auto 4px;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.site-foot p { margin: 4px 0 0; }

.site-foot a {
    color: var(--lime);
    font-weight: 600;
    text-decoration: none;
}

.site-foot a:hover { text-decoration: underline; }

.link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 12px;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: fade-up 0.55s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.link:nth-child(1) { animation-delay: 0.08s; }
.link:nth-child(2) { animation-delay: 0.14s; }
.link:nth-child(3) { animation-delay: 0.2s; }
.link:nth-child(4) { animation-delay: 0.26s; }
.link:nth-child(5) { animation-delay: 0.32s; }
.link:nth-child(6) { animation-delay: 0.38s; }
.link:nth-child(7) { animation-delay: 0.44s; }

.link:hover {
    border-color: rgba(198, 255, 74, 0.45);
    background: rgba(198, 255, 74, 0.06);
}

.icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: none;
}

.icon svg { width: 22px; height: 22px; display: block; }

.icon.discord { color: #9aafff; background: rgba(88, 101, 242, 0.16); }
.icon.bot,
.icon.code { color: var(--lime); background: rgba(198, 255, 74, 0.1); }
.icon.bot svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon.twitch { color: #d0b4ff; background: rgba(145, 70, 255, 0.16); }
.icon.tiktok { color: #fff; background: rgba(255, 255, 255, 0.08); }
.icon.instagram { color: #ff9ab8; background: rgba(255, 70, 120, 0.14); }
.icon.youtube { color: #ff7388; background: rgba(255, 0, 60, 0.14); }

.link-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.link-copy strong { font-weight: 600; }
.link-copy small { color: var(--muted); }

.mini-live {
    background: var(--red);
    color: white;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 7px;
    flex: none;
}

.go {
    color: var(--muted);
    flex: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.ring { animation: float-y 14s ease-in-out infinite; }
.square { animation: float-square 16s ease-in-out infinite; }
.bar { animation: float-bar 18s ease-in-out infinite; }
.tri { animation: float-y 15s ease-in-out infinite reverse; }
.glow { animation: glow-breathe 8s ease-in-out infinite; }

.share,
.chip,
.go {
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.share:active,
.link:active,
.chip:active {
    scale: 0.98;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 7px rgba(255, 51, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 85, 0); }
}

@keyframes fade-up {
    from { opacity: 0; translate: 0 16px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes pop {
    from { opacity: 0; scale: 0.86; }
    to { opacity: 1; scale: 1; }
}

@keyframes live-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 51, 85, 0.45); }
    50% { box-shadow: 0 0 0 10px rgba(255, 51, 85, 0); }
}

@keyframes float-y {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, var(--drift, 14px), 0); }
}

@keyframes float-square {
    0%, 100% { transform: rotate(14deg) translate3d(0, 0, 0); }
    50% { transform: rotate(14deg) translate3d(0, calc(var(--drift, 14px) * -1), 0); }
}

@keyframes float-bar {
    0%, 100% { transform: rotate(18deg); }
    50% { transform: rotate(18deg) translate3d(0, var(--drift, 14px), 0); }
}

@keyframes glow-breathe {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
    50% { transform: translateX(-50%) scale(1.07); opacity: 1; }
}

@media (hover: hover) and (pointer: fine) {
    .link,
    .share,
    .chip {
        transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }

    .link:hover,
    .share:hover,
    .chip:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 640px) {
    .card { margin-top: 16px; border-radius: 26px; }
    h1 { font-size: 2.15rem; }
    .ring, .square, .bar, .tri { opacity: 0.45; --drift: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
