:root {
    --bg-color: #0d0a14;
    --text-primary: #ffffff;
    --text-secondary: #a395b5;

    --card-bg: rgba(30, 20, 45, 0.4);
    --card-border: rgba(255, 0, 0, 0.2);
    --card-hover: rgba(255, 0, 0, 0.4);

    --shadow-heavy: rgba(0, 0, 0, 0.8);
    --shadow-subtle: rgba(0, 0, 0, 0.5);

    --accent: #ff0000;
    --glass-blur: blur(12px);

    /* Cores das Marcas */
    --c-twitch: #9146FF;
    --c-youtube: #FF0000;
    --c-tiktok: #00f2fe;
    --c-steam-white: #ffffff;
    --c-amazon: #FF9900;
    --c-kabum: #FF6500;
    --c-exitlag: #FF3C00;
    --c-livepix: #00E096;
    --c-gold: #fbbf24;
}

[data-theme="light"] {
    --bg-color: #f7f5fa;
    --text-primary: #1e1332;
    --text-secondary: #6b5a82;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 0, 0, 0.3);
    --card-hover: rgba(255, 230, 230, 0.9);
    --shadow-heavy: rgba(255, 0, 0, 0.15);
    --shadow-subtle: rgba(255, 0, 0, 0.1);
    --accent: #cc0000;
    --c-steam-white: #1b2838;
}

/* Overrides Premium para o Tema Claro (Sorteio e Jogo Plinko Royale) */
[data-theme="light"] .giveaway-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(251, 191, 36, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.15);
}

[data-theme="light"] .form-group input[type="text"],
[data-theme="light"] .form-group input[type="password"] {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: inset 0 2px 6px rgba(147, 51, 234, 0.08);
}

[data-theme="light"] .form-group input[type="text"]::placeholder,
[data-theme="light"] .form-group input[type="password"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

[data-theme="light"] .locked-nick-box {
    background: rgba(145, 70, 255, 0.15);
    border: 1px solid rgba(145, 70, 255, 0.4);
}

[data-theme="light"] .wave-status-box {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.1);
}

[data-theme="light"] .wave-players-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--card-border);
}

[data-theme="light"] .leaderboard-box {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
}


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

.hidden {
    display: none !important;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    transition: background-color 0.4s ease;
    background-image: radial-gradient(circle at center, rgba(255, 0, 0, 0.15) 0%, var(--bg-color) 90%);
    overflow: hidden;
    /* Fim absoluto do scroll na body */
    position: relative;
}

/* ================= FUNDO VIVO DE PARTÍCULAS E AMBIENTE ================= */
body::before,
body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
}

body::before {
    background: radial-gradient(circle at 35% 25%, rgba(255, 0, 0, 0.08) 0%, transparent 65%);
    animation: ambientPulseBackground 8s infinite alternate ease-in-out;
}

body::after {
    background: radial-gradient(circle at 65% 75%, rgba(255, 50, 50, 0.06) 0%, transparent 65%);
    animation: ambientPulseBackground 10s infinite alternate-reverse ease-in-out;
}

@keyframes ambientPulseBackground {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 0.8;
    }
}

.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 0, 0, 0.4) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle 12s infinite linear;
    will-change: transform, opacity;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: var(--max-opacity, 0.6);
    }

    90% {
        opacity: var(--max-opacity, 0.6);
    }

    100% {
        transform: translateY(-120px) rotate(360deg);
        opacity: 0;
    }
}

/* ================= BALÃO DE FALA (EASTER EGG) ================= */
.speech-bubble {
    position: absolute;
    transform: translateX(-50%) scale(1);
    background: rgba(13, 10, 20, 0.95);
    border: 2px solid var(--accent);
    padding: 14px 22px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.6);
    font-weight: 700;
    font-size: 1rem;
    color: white;
    width: max-content;
    max-width: 300px;
    text-align: center;
    z-index: 9999999;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(8px);
}

.speech-bubble.hidden {
    opacity: 0 !important;
    transform: translateX(-50%) scale(0.5) !important;
    pointer-events: none;
}

.speech-bubble::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent var(--accent) transparent;
}

/* Responsividade do Balãozinho para Celular */
@media (max-width: 768px) {
    .speech-bubble {
        transform: translateX(-35px) scale(1);
        max-width: 260px;
    }

    .speech-bubble.hidden {
        transform: translateX(-35px) scale(0.5) !important;
    }

    .speech-bubble::after {
        left: 35px;
        transform: translateX(-50%);
    }
}

/* ================= EFEITOS VISUAIS TEMPORÁRIOS (EASTER EGG) ================= */
/* 1. Confetti */
.ee-confetti {
    position: fixed;
    top: -20px;
    width: 12px;
    height: 24px;
    pointer-events: none;
    z-index: 999999;
    animation: eeConfettiFall 4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes eeConfettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* 2. Heart Explosion */
.ee-heart {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    color: var(--accent);
    font-size: 2rem;
    animation: eeHeartExplode 3s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes eeHeartExplode {
    0% {
        transform: translate(0, 0) scale(0.2);
        opacity: 0;
    }

    15% {
        transform: translate(calc(var(--ee-tx) * 0.2), calc(var(--ee-ty) * 0.2)) scale(1.1);
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--ee-tx), var(--ee-ty)) scale(1.5);
        opacity: 0;
    }
}

/* 3. Matrix Rain */
.ee-matrix {
    position: fixed;
    top: -50px;
    color: #00ff41;
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 999999;
    animation: eeMatrixFall 3.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    text-shadow: 0 0 8px #00ff41;
}

@keyframes eeMatrixFall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh);
        opacity: 0;
    }
}

/* 4. Neon Pulse */
body.ee-neon-pulse {
    animation: eeNeonPulseAnim 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes eeNeonPulseAnim {
    0% {
        box-shadow: inset 0 0 0px transparent, inset 0 0 0px transparent;
    }

    15% {
        box-shadow: inset 0 0 40px var(--accent), inset 0 0 80px var(--c-livepix);
    }

    30% {
        box-shadow: inset 0 0 20px var(--accent), inset 0 0 40px var(--c-livepix);
    }

    45% {
        box-shadow: inset 0 0 60px var(--accent), inset 0 0 120px var(--c-livepix);
    }

    60% {
        box-shadow: inset 0 0 30px var(--accent), inset 0 0 60px var(--c-livepix);
    }

    75% {
        box-shadow: inset 0 0 80px var(--accent), inset 0 0 150px var(--c-livepix);
    }

    100% {
        box-shadow: inset 0 0 0px transparent, inset 0 0 0px transparent;
    }
}

/* 5. Earthquake */
body.ee-earthquake {
    animation: eeEarthquakeMaster 4s ease-in-out forwards;
}

@keyframes eeEarthquakeMaster {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    5%,
    15%,
    25%,
    35%,
    45%,
    55%,
    65%,
    75%,
    85% {
        transform: translate(3px, 2px) rotate(1deg);
    }

    10%,
    20%,
    30%,
    40%,
    50%,
    60%,
    70%,
    80%,
    90% {
        transform: translate(-3px, -2px) rotate(-1deg);
    }

    95% {
        transform: translate(1px, 1px) rotate(0.5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* 6. Stars Fall */
.ee-star {
    position: fixed;
    color: #ffd700;
    font-size: 2.5rem;
    pointer-events: none;
    z-index: 999999;
    animation: eeStarFallAnim 3.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    filter: drop-shadow(0 0 12px #ffd700);
}

@keyframes eeStarFallAnim {
    0% {
        transform: translate(0, -50px) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--ee-tx), 110vh) rotate(540deg) scale(1.5);
        opacity: 0;
    }
}

/* 7. Laser Show */
.ee-laser {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200vw;
    height: 10px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--c-livepix), transparent);
    pointer-events: none;
    z-index: 999998;
    transform-origin: center;
    animation: eeLaserAnim 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    filter: blur(2px) drop-shadow(0 0 20px var(--accent));
}

@keyframes eeLaserAnim {
    0% {
        transform: translate(-50%, -50%) rotate(var(--ee-deg)) scaleY(0);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -50%) rotate(calc(var(--ee-deg) + 72deg)) scaleY(2);
        opacity: 1;
    }

    80% {
        transform: translate(-50%, -50%) rotate(calc(var(--ee-deg) + 288deg)) scaleY(2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) rotate(calc(var(--ee-deg) + 360deg)) scaleY(0);
        opacity: 0;
    }
}

/* 8. Rainbow BG */
body.ee-rainbow {
    animation: eeRainbowAnim 4s ease-in-out forwards;
}

@keyframes eeRainbowAnim {
    0% {
        background-color: var(--bg-color);
    }

    20% {
        background-color: #2b0f54;
    }

    40% {
        background-color: #0f5428;
    }

    60% {
        background-color: #540f1a;
    }

    80% {
        background-color: #0f3854;
    }

    100% {
        background-color: var(--bg-color);
    }
}

/* 9. Floating Subs */
.ee-sub {
    position: fixed;
    bottom: -50px;
    font-size: 2.5rem;
    color: var(--accent);
    pointer-events: none;
    z-index: 999999;
    animation: eeSubFloat 4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    filter: drop-shadow(0 0 15px var(--accent));
}

@keyframes eeSubFloat {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }

    15% {
        opacity: 1;
        transform: translateY(-15vh) scale(1);
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translateY(-110vh) scale(1.8);
        opacity: 0;
    }
}

/* 10. Fireworks */
.ee-firework {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    animation: eeFireworkExplode 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes eeFireworkExplode {
    0% {
        transform: scale(0.1);
        box-shadow: 0 0 0 0 #fff;
        opacity: 0;
    }

    15% {
        transform: scale(0.5);
        box-shadow: 0 0 30px 10px var(--accent);
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 60px 30px var(--accent), 0 0 100px 50px var(--c-livepix), 0 0 140px 70px #fff;
        opacity: 1;
    }

    100% {
        transform: scale(3.5);
        box-shadow: 0 0 200px 100px transparent;
        opacity: 0;
    }
}

/* ================= LOADER PREMIUM ================= */
.site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at center, rgba(255, 0, 0, 0.15) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.site-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.loader-avatar-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff4a4a 100%);
    box-shadow: 0 0 35px rgba(255, 0, 0, 0.4);
    animation: slowPulseAvatar 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.loader-avatar-wrapper::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px dashed var(--accent);
    animation: rotateRing 10s linear infinite;
    opacity: 0.5;
}

@keyframes rotateRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
}

@keyframes slowPulseAvatar {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(255, 0, 0, 0.3);
    }

    50% {
        transform: scale(1.12);
        box-shadow: 0 0 50px rgba(255, 0, 0, 0.6);
    }
}

.loader-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(270deg, var(--accent) 0%, var(--text-primary) 50%, var(--c-tiktok) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 3s ease-in-out infinite, floatText 3s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.4));
    margin: 0;
}

@keyframes shimmerText {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

@keyframes floatText {

    0%,
    100% {
        transform: translateY(0px);
        filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.3));
    }

    50% {
        transform: translateY(-4px);
        filter: drop-shadow(0 0 18px rgba(255, 0, 0, 0.7));
    }
}

/* ================= 3-COLUMN LAYOUT ================= */
.split-container {
    width: 100vw;
    height: 100vh;
    padding: 1.2rem;
    display: flex;
    gap: 1.2rem;
    align-items: stretch;
    justify-content: center;
    position: relative;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 1. Mídia (Esquerda) */
.media-panel {
    flex: 1;
    /* Ocupa todo o espaço restante (Gigante) */
    background: #000;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.ambient-glow {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 75%);
    filter: blur(90px);
    opacity: 0.35;
    animation: ambientPulseGlow 5s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes ambientPulseGlow {
    0% {
        transform: scale(0.9);
        opacity: 0.25;
    }

    100% {
        transform: scale(1.15);
        opacity: 0.45;
    }
}

.media-panel.collapsed,
.chat-panel.collapsed {
    flex: 0 0 0px !important;
    width: 0px !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.media-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0px;
    position: relative;
    z-index: 100;
}

.toggle-media-btn {
    width: 24px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateX(-12px);
    opacity: 0.5;
}

.toggle-media-btn:hover {
    background: transparent;
    color: var(--accent);
    opacity: 1;
    box-shadow: none;
    transform: translateX(-12px) scale(1.25);
}

.media-panel.collapsed~.media-toggle-wrapper .toggle-media-btn {
    transform: translateX(12px);
    opacity: 0.7;
}

.media-panel.collapsed~.media-toggle-wrapper .toggle-media-btn:hover {
    opacity: 1;
    transform: translateX(12px) scale(1.25);
}

.media-panel.collapsed~.media-toggle-wrapper .toggle-media-btn i {
    transform: rotate(180deg);
}

.player-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-wrapper.hidden {
    display: none !important;
}

#youtube-embed {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: radial-gradient(circle at center, rgba(255, 0, 0, 0.12) 0%, var(--bg-color) 80%);
    padding: 20px;
}

.youtube-header {
    width: 82%;
    max-width: 1050px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 10px 30px var(--shadow-subtle);
}

.yt-header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.yt-logo-icon {
    font-size: 2.4rem;
    color: #ff0000;
    filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.4));
}

.yt-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.yt-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ff4a4a;
    text-transform: uppercase;
    display: inline-block;
}

.yt-video-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-channel-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff0000;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.yt-channel-link:hover {
    background: #ff0000;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
    transform: translateY(-2px);
}

#youtube-embed iframe {
    width: 82%;
    height: 70%;
    max-width: 1050px;
    max-height: 520px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 15px 40px var(--shadow-heavy), 0 0 30px rgba(255, 0, 0, 0.15);
}

/* 2. Chat (Meio) */
.chat-panel {
    width: 320px;
    flex-shrink: 0;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 20;
    transform: translateZ(0);
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), flex 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.twitch-login-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: radial-gradient(circle at top left, rgba(145, 70, 255, 0.15) 0%, var(--card-bg) 100%);
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.twitch-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.twitch-banner-icon {
    font-size: 1.4rem;
    color: var(--c-twitch);
    flex-shrink: 0;
}

.twitch-banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.twitch-banner-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: normal;
    word-break: break-word;
}

.twitch-banner-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    margin-top: 2px;
}

.twitch-banner-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--c-twitch);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.twitch-banner-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.4);
}

.twitch-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.twitch-banner-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.twitch-banner-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

#chat_embed {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 30;
    transform: translateZ(0);
}


/* 3. Opções (Direita) */
.options-panel {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Scroll APENAS nesta coluna, SE a tela for muito baixa */
    padding-right: 8px;
    position: relative;
    /* FUNDAMENTAL para o modal absoluto ficar preso aqui! */
}

/* Scrollbar da Opções */
.options-panel::-webkit-scrollbar {
    width: 4px;
}

.options-panel::-webkit-scrollbar-track {
    background: transparent;
}

.options-panel::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

/* ================= CONTROLES ================= */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.email-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    backdrop-filter: var(--glass-blur);
    transition: 0.3s;
    font-weight: 500;
}

.email-btn:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

.email-btn i {
    margin-right: 6px;
    color: var(--accent);
}

.email-btn.copied {
    background: rgba(0, 224, 150, 0.2);
    border-color: var(--c-livepix);
    color: var(--c-livepix);
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: var(--glass-blur);
    transition: 0.3s;
    position: relative;
}

.theme-toggle:hover {
    background: var(--card-hover);
    transform: scale(1.05);
}

.theme-toggle i {
    position: absolute;
    transition: 0.3s;
}

[data-theme="dark"] .light-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

[data-theme="light"] .dark-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* ================= PERFIL ================= */
.profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.profile-img {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--card-border);
    transition: 0.3s;
}

.profile-img:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ================= SORTEIO CARD ================= */
.giveaway-card {
    background: linear-gradient(135deg, rgba(30, 20, 45, 0.6), rgba(60, 40, 20, 0.3));
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.1);
    flex-shrink: 0;
}

.giveaway-title {
    color: var(--c-gold);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.6rem;
    letter-spacing: 0.5px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.giveaway-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.giveaway-wish {
    color: var(--c-livepix);
    font-weight: 600;
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

.winner-box {
    margin-top: 0.8rem;
    background: rgba(251, 191, 36, 0.15);
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--c-gold);
    font-weight: 700;
    font-size: 0.85rem;
}

.winner-box.hidden {
    display: none;
}

.winner-box a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--c-gold);
}

/* ================= COREOGRAFIA DE ENTRADA ================= */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.25s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.55s;
}

/* ================= LINKS GRID ================= */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    flex-shrink: 0;
    padding-bottom: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.icon-left {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Shimmer Sweep Effect */
.link-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: none;
    z-index: 1;
    pointer-events: none;
}

.link-btn:hover::before {
    animation: shimmerSweep 0.8s ease-in-out;
}

@keyframes shimmerSweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.link-btn:hover {
    transform: translateY(-3px);
    background: var(--card-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.link-btn:hover .icon-left {
    transform: scale(1.2) rotate(-5deg);
}

.link-btn:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Cores Hover Premium com Glow */
.btn-twitch:hover {
    border-color: var(--c-twitch);
    background: rgba(145, 70, 255, 0.15);
    box-shadow: 0 8px 25px rgba(145, 70, 255, 0.35);
}

.btn-twitch .icon-left {
    color: var(--c-twitch);
}

.btn-livepix:hover {
    border-color: var(--c-livepix);
    background: rgba(0, 224, 150, 0.15);
    box-shadow: 0 8px 25px rgba(0, 224, 150, 0.35);
}

.btn-livepix .icon-left {
    color: var(--c-livepix);
}

.btn-sub:hover {
    border-color: var(--c-twitch);
    box-shadow: 0 8px 25px rgba(145, 70, 255, 0.25);
}

.btn-sub .icon-left {
    color: var(--c-twitch);
}

.btn-youtube:hover {
    border-color: var(--c-youtube);
    background: rgba(255, 0, 0, 0.15);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.35);
}

.btn-youtube .icon-left {
    color: var(--c-youtube);
}

.btn-instagram:hover {
    border-color: #e6683c;
    box-shadow: 0 8px 25px rgba(230, 104, 60, 0.35);
}

.btn-instagram .icon-left {
    background: -webkit-linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-tiktok:hover {
    border-color: var(--c-tiktok);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.35);
}

.btn-tiktok .icon-left {
    color: var(--text-primary);
    text-shadow: 1px 1px 0px #fe0979, -1px -1px 0px #00f2fe;
}

.btn-steam:hover {
    border-color: var(--c-steam-white);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
}

.btn-steam .icon-left {
    color: var(--c-steam-white);
}

.btn-amazon:hover {
    border-color: var(--c-amazon);
    background: rgba(255, 153, 0, 0.15);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.35);
}

.btn-amazon .icon-left {
    color: var(--c-amazon);
}

.btn-exitlag:hover {
    border-color: var(--c-exitlag);
    background: rgba(255, 60, 0, 0.15);
    box-shadow: 0 8px 25px rgba(255, 60, 0, 0.35);
}

.btn-exitlag .icon-left {
    color: var(--c-exitlag);
}

.btn-kabum:hover {
    border-color: var(--c-kabum);
    background: rgba(255, 101, 0, 0.15);
    box-shadow: 0 8px 25px rgba(255, 101, 0, 0.35);
}

.btn-kabum .icon-left {
    color: var(--c-kabum);
}

.btn-setup {
    font-family: inherit;
    cursor: pointer;
    color: var(--text-secondary);
    border-style: dashed;
}

.btn-setup:hover {
    color: var(--text-primary);
    border-style: solid;
    border-color: var(--card-border);
    box-shadow: 0 8px 25px var(--shadow-subtle);
}

/* ================= RODAPÉ ================= */
.site-footer {
    position: fixed;
    bottom: 16px;
    right: 20px;
    z-index: 1000;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
    pointer-events: none;
}

.site-footer .copyright {
    font-size: 0.65rem;
    color: var(--text-secondary);
    pointer-events: auto;
}

.site-footer .developed-by {
    font-size: 0.6rem;
    color: rgba(163, 149, 181, 0.6);
    pointer-events: auto;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
    pointer-events: auto;
}

.site-footer a:hover {
    color: var(--c-livepix);
    text-decoration: underline;
}

/* ================= MODAL ================= */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 10, 20, 0.85);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(16px);
    border-radius: 16px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-color);
    width: 95%;
    max-height: 95%;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.2);
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    transition: none;
}

.modal.active .modal-content {
    animation: modalSpringEntry 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalSpringEntry {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text-primary);
}

.setup-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 4px;
}

.setup-list::-webkit-scrollbar {
    width: 4px;
}

.setup-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.setup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.setup-item i {
    color: var(--accent);
    width: 20px;
    text-align: center;
}

.setup-item span {
    font-size: 0.85rem;
}

/* ================= JOGO PLINKO ROYALE ================= */
.btn-game:hover {
    border-color: var(--c-livepix);
    box-shadow: 0 0 15px rgba(0, 224, 150, 0.4);
}

.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
    font-family: inherit;
}

.btn-submit:hover {
    background: var(--c-twitch);
    transform: translateY(-2px);
}

.status-msg {
    margin-top: 1rem;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
}

.game-modal-content {
    padding: 1.5rem;
}

.locked-nick-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--accent);
    padding: 10px 14px;
    border-radius: 10px;
}

.logout-game-btn {
    background: transparent;
    border: none;
    color: #ff4a4a;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.logout-game-btn:hover {
    transform: scale(1.1);
    color: #ff1a1a;
}

.user-badge {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid var(--c-gold);
    color: var(--c-gold);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
}

.wave-status-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.wave-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wave-title {
    font-weight: 800;
    font-size: 1rem;
    color: #ff4a4a;
    letter-spacing: 0.5px;
}

.wave-timer {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--c-livepix);
    text-shadow: 0 0 10px rgba(0, 224, 150, 0.5);
}

.wave-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.wave-join-btn {
    margin-top: 0;
    background: linear-gradient(45deg, var(--accent), var(--c-livepix));
}

.wave-join-btn:hover {
    box-shadow: 0 0 20px rgba(0, 224, 150, 0.6);
}

.wave-join-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--card-border);
    box-shadow: none;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    animation: fadeIn 0.3s ease;
    text-align: center;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#overlay-title {
    color: var(--c-gold);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

#overlay-subtitle {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.wave-players-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
}

.wave-players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 90px;
    overflow-y: auto;
    padding-right: 4px;
}

.wave-players-list::-webkit-scrollbar {
    width: 4px;
}

.wave-players-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.player-tag {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid var(--accent);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaderboard-box {
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 10px 12px;
    border-radius: 10px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 2px;
}

.leaderboard-list::-webkit-scrollbar {
    width: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.4);
    border-radius: 4px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    min-width: 0;
    gap: 4px;
}

.leaderboard-item.rank-1 {
    border-color: var(--c-gold);
    background: rgba(251, 191, 36, 0.15);
    font-weight: bold;
}

.leaderboard-item.rank-2 {
    border-color: #c0c0c0;
    background: rgba(192, 192, 192, 0.1);
    font-weight: bold;
}

.leaderboard-item.rank-3 {
    border-color: #cd7f32;
    background: rgba(205, 127, 50, 0.1);
    font-weight: bold;
}

/* ================= RESPONSIVO (MOBILE/TABLET) ================= */
@media (max-width: 1050px) {
    body {
        overflow-y: auto;
        position: relative;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* OTIMIZAÇÃO EXTREMA DE GPU E BATERIA NO MOBILE: Desativa animações pesadas de fill-rate, gradientes radiais gigantes e blur! */
    body::before,
    body::after,
    .ambient-glow,
    .bg-particles {
        display: none !important;
        animation: none !important;
    }

    .split-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1.5rem;
        flex: 1;
    }

    .media-panel {
        width: 100%;
        height: auto;
        min-height: 320px;
        padding-bottom: 0;
        flex: none;
        border-radius: 16px;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .player-wrapper {
        position: relative;
        height: auto;
        width: 100%;
    }

    #twitch-embed.player-wrapper {
        height: 250px;
    }

    #twitch-embed iframe {
        height: 250px !important;
    }

    #youtube-embed {
        padding: 16px 12px;
        gap: 16px;
        background: radial-gradient(circle at center, rgba(255, 0, 0, 0.15) 0%, var(--card-bg) 100%);
        border-radius: 16px;
        border: 1px solid var(--card-border);
    }

    .youtube-header {
        width: 100%;
        max-width: 100%;
        padding: 14px 16px;
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
        text-align: center;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .yt-header-left {
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .yt-logo-icon {
        font-size: 2.2rem;
    }

    .yt-video-title {
        font-size: 1.15rem;
        -webkit-line-clamp: 2;
        white-space: normal;
        line-height: 1.3;
    }

    .yt-channel-link {
        justify-content: center;
        padding: 12px;
        font-size: 0.95rem;
    }

    #youtube-embed iframe {
        width: 100%;
        max-width: 100%;
        height: 230px;
        border-radius: 12px;
        box-sizing: border-box;
    }

    .media-toggle-wrapper {
        display: none !important;
    }

    .chat-panel {
        width: 100%;
        height: 400px;
        flex: none;
    }

    .options-panel {
        width: 100%;
        overflow-y: visible;
        padding-right: 0;
    }

    .site-footer {
        position: relative;
        bottom: auto;
        right: auto;
        text-align: center;
        padding: 1.5rem 1rem 1rem 1rem;
        margin-top: auto;
        width: 100%;
        background: var(--bg-color);
        border-top: 1px solid var(--card-border);
        pointer-events: auto;
    }

    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 999999;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
}