:root {
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

html, body, .screen {
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
::-webkit-scrollbar {
    display: none; 
}

/* ── USUNIĘTE POŚWIATY I HOVERY ──────────────── */

/* Usuwa poświatę zza logo */
.sh-hero-wrap::after {
  display: none !important;
}

/* Wyłącza hover i wskaźnik kursora na karcie profilu */
.sh-profile-card { transition: none !important; cursor: default !important; }
.sh-profile-card:hover {
  background: rgba(255, 255, 255, 0.05) !important; /* Zostawiamy bazowy kolor */
  border-color: rgba(255,255,255,0.05) !important;
}

/* Ukrywa strzałkę i efekty przesunięcia przy hoverze */
.sh-profile-arrow { display: none !important; }
.sh-profile-card:hover .sh-coins-badge { transform: none !important; }

body { 
    user-select: none; -webkit-user-select: none; 
    font-family: 'Outfit', sans-serif; 
    overflow-x: hidden; /* Ukrywamy tylko scroll na boki */
    color: #f8fafc;
    background: linear-gradient(-45deg, #090306, #14070e, #2b0d1d, #0b0408);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh; /* Pozwalamy stronie rosnąć w dół! */
    width: 100vw;
}

#wheel-container {
    transition: transform 5s cubic-bezier(0.1, 0, 0.1, 1);
}

    /* Elegancka animacja wejścia całego panelu */
    @keyframes wheelCinematic {
        0% { transform: translateY(40px) scale(0.95); opacity: 0; filter: blur(10px); }
        100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
    }
    .animate-wheel-cinematic { 
        animation: wheelCinematic 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; 
    }

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.theme-light { 
    background: linear-gradient(-45deg, #fffafa, #fef2f2, #f8fafc, #ffe5f2);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #1e293b;
}

/* Dostosowanie poświat w tle dla jasnego motywu (zamiast rozjaśniania mix-blend-screen) */
body.theme-light .fixed.inset-0.pointer-events-none.z-\[-1\] div[class*="bg-"] {
    mix-blend-mode: multiply !important;
    opacity: 0.12 !important;
}

body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light h5,
body.theme-light h6 {
    color: #0f172a !important;
}

body.theme-light .glass-panel,
body.theme-light #rules-content,
body.theme-light #coin-content,
body.theme-light #join-content,
body.theme-light #join-inline-panel,
body.theme-light #guest-inline-panel,
body.theme-light #kick-content,
body.theme-light #dialog-content {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05) !important;
}

body.theme-light .glass-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #334155;
}
body.theme-light .glass-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(252, 135, 194, 0.4);
    color: #0f172a;
}

body.theme-light .modern-input {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #0f172a !important;
}
body.theme-light .modern-input:focus {
    background: #ffffff !important;
    border-color: rgba(232, 104, 169, 0.5) !important;
    box-shadow: 0 0 15px rgba(232, 104, 169, 0.15) !important;
}

/* Widoczność placeholderów w jasnym motywie */
body.theme-light ::placeholder { color: #64748b !important; opacity: 0.8 !important; }
body.theme-light ::-webkit-input-placeholder { color: #64748b !important; opacity: 0.8 !important; }
body.theme-light :-ms-input-placeholder { color: #64748b !important; opacity: 0.8 !important; }

/* Panel czatu i jego zawartość */

/* Nadpisanie niestandardowych ciemnych teł z Tailwind w jasnym motywie */
body.theme-light .bg-\[\#100609\],
body.theme-light .bg-\[\#0e0608\],
body.theme-light .bg-\[\#0B0F19\],
body.theme-light .bg-\[\#0b0f19\] {
    background-color: #fffafa !important;
}
body.theme-light .bg-\[\#12070a\]\/70,
body.theme-light .bg-\[\#0b0f19\]\/60 {
    background-color: rgba(255, 255, 255, 0.72) !important;
}
body.theme-light .bg-\[\#0a0a0c\]\/80 {
    background-color: rgba(255, 255, 255, 0.85) !important;
}
body.theme-light .bg-\[\#0a0a0c\]\/90 {
    background-color: rgba(255, 255, 255, 0.92) !important;
}
body.theme-light .bg-\[\#0b0c10\] {
    background-color: rgba(255, 255, 255, 0.85) !important;
}
body.theme-light .bg-\[\#100609\]\/80,
body.theme-light .bg-\[\#0B0F19\]\/80 {
    background-color: rgba(255, 255, 255, 0.82) !important;
}
body.theme-light .bg-\[\#100609\]\/40,
body.theme-light .bg-\[\#0B0F19\]\/40 {
    background-color: rgba(255, 255, 255, 0.5) !important;
}
body.theme-light .bg-\[\#16080c\]\/80,
body.theme-light .bg-\[\#0f1423\]\/80 {
    background-color: rgba(255, 255, 255, 0.84) !important;
}
body.theme-light .bg-\[\#100609\]\/70,
body.theme-light .bg-\[\#080a14\]\/60 {
    background-color: rgba(255, 255, 255, 0.78) !important;
}
body.theme-light .bg-\[\#1f0b11\]\/80,
body.theme-light .bg-\[\#151a30\]\/80 {
    background-color: rgba(255, 245, 250, 0.9) !important;
}
body.theme-light .bg-\[\#221015\],
body.theme-light .bg-\[\#1e293b\] {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Jasne tło do wyboru celu podczas głosowania (zamiast muddy dark-crimson) */
body.theme-light .bg-tuneit-950\/20 {
    background-color: rgba(252, 135, 194, 0.12) !important;
    border-color: rgba(252, 135, 194, 0.35) !important;
}

/* Obsługa przezroczystych nakładek na karty (zamiast białych na białym tle robimy ciemniejsze szklane nakładki) */
body.theme-light .bg-white\/5 {
    background-color: rgba(15, 23, 42, 0.05) !important;
}
body.theme-light .bg-white\/10 {
    background-color: rgba(15, 23, 42, 0.08) !important;
}
body.theme-light .bg-white\/20 {
    background-color: rgba(15, 23, 42, 0.15) !important;
}
body.theme-light .hover\:bg-white\/5:hover {
    background-color: rgba(15, 23, 42, 0.08) !important;
}
body.theme-light .hover\:bg-white\/10:hover {
    background-color: rgba(15, 23, 42, 0.12) !important;
}
body.theme-light .hover\:bg-white\/20:hover {
    background-color: rgba(15, 23, 42, 0.2) !important;
}

/* Kolorystyka tekstów */
body.theme-light .text-slate-50,
body.theme-light .text-slate-100 {
    color: #0f172a !important;
}
body.theme-light .text-slate-200 {
    color: #1e293b !important;
}
body.theme-light .text-slate-300 {
    color: #334155 !important;
}
body.theme-light .text-slate-400 {
    color: #475569 !important;
}
body.theme-light .text-slate-500 {
    color: #64748b !important;
}
body.theme-light .text-white {
    color: #0f172a !important;
}

/* Wymuszenie zachowania białego koloru czcionki na przyciskach o pełnym, kolorowym tle */
body.theme-light .bg-red-600,
body.theme-light .bg-red-600 *,
body.theme-light .bg-red-500,
body.theme-light .bg-red-500 *,
body.theme-light .bg-emerald-600,
body.theme-light .bg-emerald-600 *,
body.theme-light .bg-emerald-500,
body.theme-light .bg-emerald-500 *,
body.theme-light .bg-tuneit-600,
body.theme-light .bg-tuneit-600 *,
body.theme-light .bg-tuneit-500,
body.theme-light .bg-tuneit-500 *,
body.theme-light .bg-amber-600,
body.theme-light .bg-amber-600 *,
body.theme-light .bg-amber-500,
body.theme-light .bg-amber-500 * {
    color: #ffffff !important;
}

/* Odpowiedni kontrast ikon i kolorów statusu */
body.theme-light .text-amber-400 { color: #b45309 !important; }
body.theme-light .text-amber-300 { color: #d97706 !important; }
body.theme-light .text-emerald-400 { color: #047857 !important; }
body.theme-light .text-emerald-300 { color: #059669 !important; }
body.theme-light .text-emerald-500 { color: #059669 !important; }
body.theme-light .text-tuneit-300 { color: #e868a9 !important; }
body.theme-light .text-tuneit-400 { color: #cc4b8d !important; }
body.theme-light .text-tuneit-500 { color: #e868a9 !important; }
body.theme-light .text-red-400 { color: #e868a9 !important; }
body.theme-light .text-red-500 { color: #e868a9 !important; }
body.theme-light .text-white\/70 { color: rgba(15, 23, 42, 0.7) !important; }

/* Dostosowanie ciemnych nakładek i tła wnęk w jasnym motywie */
body.theme-light .bg-black\/10 {
    background-color: rgba(15, 23, 42, 0.03) !important;
}
body.theme-light .bg-black\/20 {
    background-color: rgba(15, 23, 42, 0.05) !important;
}
body.theme-light .bg-black\/30 {
    background-color: rgba(15, 23, 42, 0.08) !important;
}
body.theme-light .bg-black\/40 {
    background-color: rgba(15, 23, 42, 0.12) !important;
}
body.theme-light .bg-black\/50 {
    background-color: rgba(15, 23, 42, 0.18) !important;
}
body.theme-light .bg-black\/60 {
    background-color: rgba(15, 23, 42, 0.35) !important;
}

/* Obramowania kart */
body.theme-light .border-white\/5 {
    border-color: rgba(15, 23, 42, 0.05) !important;
}
body.theme-light .border-white\/10 {
    border-color: rgba(15, 23, 42, 0.08) !important;
}
body.theme-light .border-white\/20 {
    border-color: rgba(15, 23, 42, 0.12) !important;
}
body.theme-light .border-white\/30 {
    border-color: rgba(15, 23, 42, 0.18) !important;
}
body.theme-light .border-tuneit-500\/10 {
    border-color: rgba(232, 104, 169, 0.15) !important;
}
body.theme-light .border-tuneit-500\/20 {
    border-color: rgba(232, 104, 169, 0.25) !important;
}
body.theme-light .border-tuneit-500\/30 {
    border-color: rgba(232, 104, 169, 0.35) !important;
}

/* Jednolite przyciemnienie tła pod modalem i szufladą czatu w jasnym motywie */
body.theme-light #settings-modal,
body.theme-light #rules-modal,
body.theme-light #shop-modal,
body.theme-light #custom-dialog,
body.theme-light #chat-backdrop {
    background-color: rgba(15, 23, 42, 0.35) !important;
    backdrop-filter: blur(8px) !important;
}

body.theme-light img, body.theme-light .keep-colors { 
    filter: none !important; 
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}
.glass-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Definicja płynnego wjazdu ekranu */
@keyframes screenFadeIn {
    0% { 
        opacity: 0; 
        transform: scale(0.97) translateY(15px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

.screen { 
    display: none; 
    min-height: 100vh; 
    width: 100%; 
    padding-bottom: 2rem;
}

.screen.active { 
    display: flex; 
    /* Animacja odpala się za każdym razem, gdy ekran staje się aktywny */
    animation: screenFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}

#toast { 
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    transform: translate(-50%, 150%); 
    opacity: 0; 
    pointer-events: none; 
    z-index: 9999;
}
#toast.show { 
    transform: translate(-50%, 0); 
    opacity: 1; 
}

.dc-avatar { object-fit: cover; }

.streamer-blur { filter: blur(7px); opacity: 0.72; cursor: pointer; transition: filter 0.25s ease, opacity 0.25s ease; }
.streamer-blur.revealed { filter: blur(0); opacity: 1; }

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    white-space: nowrap;
}

.profile-badge--default {
    background: rgba(100, 116, 139, 0.1);
    color: #cbd5e1;
    border-color: rgba(100, 116, 139, 0.2);
}

.profile-badge--guest {
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.2);
}

.profile-badge--premium {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.profile-badge--streamer {
    background: rgba(139, 92, 246, 0.1);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.2);
}

.blur-text { filter: blur(8px); user-select: none; color: transparent; text-shadow: 0 0 20px rgba(252, 135, 194,1); transition: filter 0.5s; }

.btn-ready-pulse { animation: readyPulse 2s infinite; }
@keyframes readyPulse {
    0% { box-shadow: 0 0 0 0 rgba(232, 104, 169, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(232, 104, 169, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 104, 169, 0); }
}

.settings-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
    will-change: max-height, opacity;
}
.settings-panel.open {
    opacity: 1;
}

/* Subtelne karty rozwijanych sekcji w lobby (Parametry Gry / Pule Haseł) */
.accordion-card {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.accordion-card:hover {
    border-color: rgba(252, 135, 194, 0.22);
}

.accordion-card--open {
    border-color: rgba(252, 135, 194, 0.34) !important;
    box-shadow: 0 18px 40px -16px rgba(232, 104, 169, 0.22), var(--glass-shadow);
}

.accordion-card__chevron {
    width: 2rem;
    height: 2rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.group:hover .accordion-card__chevron {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.accordion-card--open .accordion-card__chevron {
    background: rgba(252, 135, 194, 0.16);
    border-color: rgba(252, 135, 194, 0.35);
    color: #ffcce6;
}

.settings-panel > div {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.35rem;
    padding-top: 0.85rem;
}

/* Karty graczy w lobby */
.player-card {
    background: rgba(8, 10, 18, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.player-card:hover {
    background: rgba(15, 19, 32, 0.68);
    border-color: rgba(255, 255, 255, 0.14);
}

.player-card--me {
    background: linear-gradient(135deg, rgba(252, 135, 194, 0.16), rgba(15, 18, 30, 0.56));
    border-color: rgba(252, 135, 194, 0.42);
    box-shadow: 0 8px 20px -12px rgba(252, 135, 194, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.player-card--me:hover {
    background: linear-gradient(135deg, rgba(252, 135, 194, 0.2), rgba(18, 21, 34, 0.65));
    border-color: rgba(252, 135, 194, 0.55);
}

.player-card--offline {
    opacity: 0.52;
    filter: grayscale(0.75);
}

.player-kick-btn {
    height: 26px;
    padding: 0 0.625rem;
    margin-left: 0.375rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    transition: max-width 0.24s cubic-bezier(0.22, 1, 0.36, 1), padding 0.24s cubic-bezier(0.22, 1, 0.36, 1), margin-left 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    .player-kick-btn {
        max-width: 0;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        border-color: transparent;
        opacity: 0;
        pointer-events: none;
    }

    .player-card:hover .player-kick-btn,
    .player-card:focus-within .player-kick-btn {
        max-width: 112px;
        padding-left: 0.625rem;
        padding-right: 0.625rem;
        margin-left: 0.375rem;
        border-color: rgba(255, 255, 255, 0.14);
        opacity: 1;
        pointer-events: auto;
    }
}

.player-kick-btn:hover {
    background: rgba(252, 135, 194, 0.22);
    border-color: rgba(255, 168, 212, 0.6) !important;
    color: #ffe5f2;
    box-shadow: 0 6px 18px -6px rgba(252, 135, 194, 0.55);
}

.guest-stat-tile {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.guest-stat-tile--amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-color: rgba(245, 158, 11, 0.22);
}

.guest-rule-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}

.guest-rule-pill--on {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.09);
}

body.theme-light .guest-stat-tile {
    background: rgba(248, 250, 252, 0.92);
    border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .guest-stat-tile--amber {
    background: rgba(254, 243, 199, 0.55);
    border-color: rgba(217, 119, 6, 0.24);
}

body.theme-light .guest-rule-pill {
    background: rgba(248, 250, 252, 0.85);
    border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .guest-rule-pill--on {
    background: rgba(209, 250, 229, 0.65);
    border-color: rgba(16, 185, 129, 0.3);
}

.kick-target-box {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kick-action-btn {
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
}

.kick-action-btn--neutral {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kick-action-btn--neutral:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.kick-action-btn--danger {
    background: rgba(252, 135, 194, 0.12);
    border: 1px solid rgba(252, 135, 194, 0.32);
}

.kick-action-btn--danger:hover {
    background: rgba(252, 135, 194, 0.22);
    border-color: rgba(255, 168, 212, 0.58);
    box-shadow: 0 10px 24px -12px rgba(252, 135, 194, 0.55);
}

body.theme-light .player-kick-btn {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.12);
    color: #475569;
}

body.theme-light .player-kick-btn:hover {
    background: rgba(232, 104, 169, 0.12);
    border-color: rgba(232, 104, 169, 0.45);
    color: #cc4b8d;
}

body.theme-light .kick-target-box {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(15, 23, 42, 0.09);
}

body.theme-light .kick-action-btn--neutral {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(15, 23, 42, 0.1);
}

body.theme-light .kick-action-btn--danger {
    background: rgba(255, 245, 250, 0.95);
    border-color: rgba(232, 104, 169, 0.3);
}

body.theme-light .player-card {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .player-card:hover {
    background: rgba(15, 23, 42, 0.07);
    border-color: rgba(15, 23, 42, 0.14);
}

body.theme-light .player-card--me {
    background: linear-gradient(135deg, rgba(252, 135, 194, 0.12) 0%, rgba(255, 245, 250, 0.8) 100%);
    border-color: rgba(232, 104, 169, 0.35);
    box-shadow: 0 6px 16px -10px rgba(232, 104, 169, 0.2);
}

body.theme-light .player-card--me:hover {
    background: linear-gradient(135deg, rgba(252, 135, 194, 0.17) 0%, rgba(255, 245, 250, 0.92) 100%);
    border-color: rgba(232, 104, 169, 0.48);
}

/* Animacje po oznaczeniu gotowości */
.player-card--ready:not(.player-card--me) {
    border-color: rgba(16, 185, 129, 0.28);
}

.player-card__shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.player-card__shine::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -65%;
    width: 55%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(52, 211, 153, 0.08) 50%,
        transparent 100%
    );
    opacity: 0;
}

.player-card--just-ready {
    animation: playerReadyGlow 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--ready-delay, 0ms);
}

.player-card--just-ready .player-card__shine::after {
    animation: readySoftSweep 0.8s ease-in-out var(--ready-delay, 0ms);
}

.ready-badge--pending {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ready-badge--just-ready {
    animation: readyBadgeFadeIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) var(--ready-delay, 0ms);
}

.ready-avatar--just-ready {
    animation: readyAvatarSmooth 0.42s cubic-bezier(0.16, 1, 0.3, 1) var(--ready-delay, 0ms);
}

.ready-btn--burst {
    animation: readyBtnSmooth 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.ready-btn--burst .ready-icon--pop {
    display: inline-block;
    animation: readyIconSmooth 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes playerReadyGlow {
    35% {
        border-color: rgba(52, 211, 153, 0.48);
        box-shadow: 0 8px 22px -12px rgba(16, 185, 129, 0.35);
    }
}

@keyframes readySoftSweep {
    0% {
        left: -65%;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        left: 120%;
        opacity: 0;
    }
}

@keyframes readyBadgeFadeIn {
    0% {
        opacity: 0;
        transform: translateX(6px) scale(0.94);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes readyAvatarSmooth {
    0% {
        transform: scale(0.94);
    }
    100% {
        transform: scale(1.05);
    }
}

.lobby-ready-btn {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, color 0.25s ease, transform 0.15s ease;
}

.lobby-ready-btn:hover {
    background: rgba(148, 163, 184, 0.11);
    border-color: rgba(148, 163, 184, 0.24);
    color: #cbd5e1;
}

.lobby-ready-btn--active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(52, 211, 153, 0.2) 50%, rgba(5, 150, 105, 0.28) 100%);
    border-color: rgba(52, 211, 153, 0.65);
    color: #ffffff;
    box-shadow: 0 0 26px -4px rgba(16, 185, 129, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.lobby-ready-btn--active:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.36) 0%, rgba(52, 211, 153, 0.26) 50%, rgba(5, 150, 105, 0.36) 100%);
    border-color: rgba(110, 231, 183, 0.78);
    color: #ffffff;
    box-shadow: 0 0 32px -3px rgba(16, 185, 129, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body.theme-light .ready-badge--pending {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.2);
    color: #64748b;
    box-shadow: none;
}

body.theme-light .lobby-ready-btn {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.2);
    color: #64748b;
}

body.theme-light .lobby-ready-btn:hover {
    background: rgba(100, 116, 139, 0.14);
    border-color: rgba(100, 116, 139, 0.32);
    color: #334155;
}

body.theme-light .lobby-ready-btn--active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.14) 100%);
    border-color: rgba(16, 185, 129, 0.55);
    color: #065f46;
    box-shadow: 0 6px 22px -6px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.theme-light .lobby-ready-btn--active:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.7);
    color: #064e3b;
}

@keyframes readyBtnSmooth {
    0% {
        transform: scale(0.99);
        filter: brightness(0.94);
    }
    45% {
        filter: brightness(1.12);
        box-shadow: 0 0 34px -2px rgba(52, 211, 153, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes readyIconSmooth {
    0% {
        opacity: 0.4;
        transform: scale(0.78);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

body.no-vfx .player-card--just-ready,
body.no-vfx .player-card--just-ready .player-card__shine::after,
body.no-vfx .ready-badge--just-ready,
body.no-vfx .ready-avatar--just-ready,
body.no-vfx .ready-btn--burst,
body.no-vfx .ready-btn--burst .ready-icon--pop {
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .player-card--just-ready,
    .player-card--just-ready .player-card__shine::after,
    .ready-badge--just-ready,
    .ready-avatar--just-ready,
    .ready-btn--burst,
    .ready-btn--burst .ready-icon--pop {
        animation: none !important;
    }
}

/* Nowoczesne kafelki wyboru kategorii w Puli Haseł */
.category-tile {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.625rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
    transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.category-tile:hover:not(:disabled):not(.category-tile--readonly) {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.category-tile:active:not(:disabled):not(.category-tile--readonly) {
    transform: scale(0.97);
}

.category-tile--readonly {
    cursor: default;
}

.category-tile--readonly.category-tile--inactive {
    opacity: 0.65;
}

.category-tile--active {
    background: linear-gradient(135deg, rgba(252, 135, 194, 0.22) 0%, rgba(232, 104, 169, 0.1) 55%, rgba(16, 6, 9, 0.55) 100%);
    border-color: rgba(252, 135, 194, 0.5);
    color: #ffffff;
    box-shadow: 0 6px 16px -6px rgba(252, 135, 194, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.category-tile--active:hover:not(:disabled):not(.category-tile--readonly) {
    background: linear-gradient(135deg, rgba(252, 135, 194, 0.28) 0%, rgba(232, 104, 169, 0.15) 55%, rgba(16, 6, 9, 0.5) 100%);
    border-color: rgba(255, 168, 212, 0.7);
}

.category-tile--locked {
    opacity: 0.45;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.38);
    border-color: rgba(255, 255, 255, 0.05);
    color: #64748b;
}

.category-tile__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #94a3b8;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover:not(:disabled):not(.category-tile--active):not(.category-tile--readonly) .category-tile__icon {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.category-tile--active .category-tile__icon {
    background: linear-gradient(135deg, #fc87c2, #e868a9);
    border-color: rgba(255, 204, 230, 0.45);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(252, 135, 194, 0.4);
}

.category-tile__label {
    flex: 1;
    min-width: 0;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-tile__check {
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.32);
    color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.category-tile--active .category-tile__check {
    background: rgba(252, 135, 194, 0.28);
    border-color: rgba(255, 168, 212, 0.7);
    color: #ffcce6;
}

/* Nowoczesne karty i kontrolki w Parametrach Gry */
.param-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.param-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.14);
}

.param-card--amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(0, 0, 0, 0.34) 70%);
    border-color: rgba(245, 158, 11, 0.26);
}

.param-card--amber:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(0, 0, 0, 0.3) 70%);
    border-color: rgba(251, 191, 36, 0.42);
}

.param-card--disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
}

.param-card__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(252, 135, 194, 0.1);
    border: 1px solid rgba(252, 135, 194, 0.22);
    color: #ffa8d4;
}

.param-card--amber .param-card__icon {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.param-card--disabled .param-card__icon {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.param-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.param-stepper--amber {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.26);
}

.param-stepper__btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #cbd5e1;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.param-stepper__btn:hover:not(:disabled) {
    background: rgba(252, 135, 194, 0.22);
    color: #ffffff;
}

.param-stepper__btn:active:not(:disabled) {
    transform: scale(0.92);
}

.param-stepper--amber .param-stepper__btn {
    color: #fbbf24;
}

.param-stepper--amber .param-stepper__btn:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.22);
    color: #fde68a;
}

.param-stepper__readout {
    min-width: 2.35rem;
    padding: 0 0.2rem;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.param-stepper__val {
    font-weight: 900;
    font-size: 0.875rem;
    color: #ffffff;
    line-height: 1;
}

.param-stepper--amber .param-stepper__val {
    color: #fbbf24;
}

.param-stepper__unit {
    font-size: 0.625rem;
    font-weight: 800;
    color: #94a3b8;
    margin-left: 1px;
}

.custom-scrollbar::-webkit-scrollbar { display: none; width: 0; }
.custom-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.frame-gold { box-shadow: 0 0 20px rgba(250,204,21,0.5); border: 2px solid #facc15; }
.frame-neon { box-shadow: 0 0 25px rgba(217,70,239,0.6); border: 2px solid #d946ef; }
.frame-fire { box-shadow: 0 0 30px rgba(239,68,68,0.8); border: 2px solid #ef4444; animation: pulseFire 2s infinite; }

/* CZAT W PRAWYM PANELU */
#chat-backdrop { 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s ease; 
    background: rgba(0, 0, 0, 0.8); /* Zmienione na głęboką, ciemną poświatę */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#chat-backdrop.open { 
    opacity: 1; 
    pointer-events: auto; 
}

#btn-leave-room {
    width: 3rem;
    padding: 0;
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), padding 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

#btn-leave-room .btn-leave-label {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, margin-left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

#btn-leave-room.btn-leave--armed {
    width: 6.75rem;
    padding: 0 0.9rem;
    background: rgba(252, 135, 194, 0.25);
    border-color: rgba(255, 168, 212, 0.5);
    color: #ffe5f2;
}

#btn-leave-room.btn-leave--armed:hover {
    background: rgba(252, 135, 194, 0.38);
}

#btn-leave-room.btn-leave--armed .btn-leave-label {
    max-width: 4.5rem;
    opacity: 1;
    margin-left: 0.4rem;
}

#chat-panel { 
    background:
        radial-gradient(circle at 100% 0%, rgba(252, 135, 194, 0.11) 0%, transparent 48%),
        linear-gradient(180deg, rgba(22, 9, 13, 0.92) 0%, rgba(16, 6, 9, 0.95) 100%);
    backdrop-filter: blur(22px); 
    -webkit-backdrop-filter: blur(22px); 
    border: 1px solid rgba(255, 255, 255, 0.09); 
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.97); 
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease; 
    z-index: 200;
    display: flex; flex-direction: column;
    box-shadow: 0 22px 55px -12px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
#chat-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

#chat-scroll-container {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

body.theme-light #chat-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 22px 55px -12px rgba(15, 23, 42, 0.22);
    color: #0f172a;
}

body.theme-light #chat-panel h2,
body.theme-light #chat-panel #chat-input {
    color: #0f172a;
}

.chat-bubble--me {
    background: linear-gradient(135deg, #fc87c2 0%, #e868a9 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: 0 4px 14px -6px rgba(252, 135, 194, 0.55);
}

.chat-bubble--other {
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #f1f5f9;
}

.chat-reply-quote {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.2rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chat-reply-quote:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(252, 135, 194, 0.28);
}

.chat-system-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 10.5px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    max-width: 92%;
}

.chat-system-pill--join,
.chat-system-pill--reconnect {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.chat-system-pill--kick,
.chat-system-pill--ban {
    border-color: rgba(252, 135, 194, 0.3);
    background: rgba(252, 135, 194, 0.1);
    color: #ffcce6;
}

.chat-system-pill--host,
.chat-system-pill--waiting {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
}

.chat-msg-actions {
    position: absolute;
    top: -14px;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px) scale(0.96);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.chat-msg-actions--me {
    right: 4px;
}

.chat-msg-actions--other {
    left: 4px;
}

.chat-msg-group:hover .chat-msg-actions,
.chat-msg-group:focus-within .chat-msg-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

@media (hover: none), (pointer: coarse) {
    .chat-msg-actions {
        position: static;
        margin-top: 2px;
        opacity: 0.85;
        pointer-events: auto;
        transform: none;
    }
}

@keyframes chatMsgFlash {
    0% { box-shadow: 0 0 0 0 rgba(252, 135, 194, 0); background-color: rgba(252, 135, 194, 0.22); }
    40% { box-shadow: 0 0 0 6px rgba(252, 135, 194, 0.25); background-color: rgba(252, 135, 194, 0.18); }
    100% { box-shadow: 0 0 0 0 rgba(252, 135, 194, 0); background-color: transparent; }
}

.chat-msg--flash {
    border-radius: 1rem;
    animation: chatMsgFlash 1.4s ease-out;
}

body.theme-light .chat-bubble--other {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

body.theme-light .chat-reply-quote {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.1);
    border-left-color: #e868a9;
}

body.theme-light .chat-system-pill {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.1);
    color: #475569;
}

.modern-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.3s;
    border-radius: 1rem;
}
.modern-input:focus {
    background: rgba(0, 0, 0, 0.6);
    /* GŁÓWNA ZMIANA: Crimson border */
    border-color: rgba(232, 104, 169, 0.5); 
    box-shadow: 0 0 15px rgba(232, 104, 169, 0.3);
    outline: none;
}

.icon-svg { 
    width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; 
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; 
}

#input-room-code {
    text-shadow: 0 0 10px rgba(255, 204, 230, 0.3);
}

#input-room-code:focus {
    box-shadow: inset 0 0 20px rgba(232, 104, 169, 0.1);
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(232, 104, 169, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(232, 104, 169, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 104, 169, 0); }
}

/* Płynny wjazd z dołu */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtelna lewitacja (np. dla awatarów) */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Custom stylizacja suwaka głośności */
input[type="range"]#input-settings-volume {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.4);
    height: 6px;
    border-radius: 9999px;
    outline: none;
}
input[type="range"]#input-settings-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fc87c2, #e868a9);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease, background 0.1s ease;
}
input[type="range"]#input-settings-volume::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: linear-gradient(135deg, #ffa8d4, #fc87c2);
}
input[type="range"]#input-settings-volume::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fc87c2, #e868a9);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease, background 0.1s ease;
}
input[type="range"]#input-settings-volume::-moz-range-thumb:hover {
    transform: scale(1.15);
    background: linear-gradient(135deg, #ffa8d4, #fc87c2);
}

/* Wyłączenie efektów wizualnych */
body.no-vfx {
    animation: none !important;
    background: #0d0507 !important;
}
body.theme-light.no-vfx {
    animation: none !important;
    background: #f1f5f9 !important;
}

/* --- COSMETIC ANIMATIONS FROM PLAYPARADISE --- */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(1); }
  75% { transform: scale(1.1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
@keyframes flip {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(360deg); }
}
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 5px currentColor); }
  50% { filter: drop-shadow(0 0 20px currentColor); }
}
@keyframes swing {
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(5deg); }
  80% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}
@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(-3px, -2px); }
  60% { transform: translate(3px, 2px); }
  80% { transform: translate(3px, -2px); }
}
@keyframes squash {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.4, 0.6); }
}
@keyframes stretch {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(0.6, 1.4); }
}
@keyframes neon {
  0%, 100% { filter: drop-shadow(0 0 5px #f0f) drop-shadow(0 0 10px #0ff); }
  50% { filter: drop-shadow(0 0 5px #0ff) drop-shadow(0 0 10px #f0f); }
}
@keyframes wobble {
  0%, 100% { transform: translateX(0%) rotate(0deg); }
  15% { transform: translateX(-10px) rotate(-5deg); }
  30% { transform: translateX(8px) rotate(3deg); }
  45% { transform: translateX(-8px) rotate(-3deg); }
  60% { transform: translateX(4px) rotate(2deg); }
  75% { transform: translateX(-4px) rotate(-1deg); }
}

/* Custom animation classes override/extension for Tailwind */
.animate-float { animation: float 3s ease-in-out infinite !important; }
.animate-heartbeat { animation: heartbeat 1.5s ease-in-out infinite !important; }
.animate-shake { animation: shake 0.5s ease-in-out infinite !important; }
.animate-flip { animation: flip 2s linear infinite !important; }
.animate-glowPulse { animation: glowPulse 2s ease-in-out infinite !important; }
.animate-swing { animation: swing 2s ease-in-out infinite !important; }
.animate-glitch { animation: glitch 0.2s linear infinite !important; }
.animate-squash { animation: squash 1s ease-in-out infinite !important; }
.animate-stretch { animation: stretch 1s ease-in-out infinite !important; }
.animate-neon { animation: neon 1.5s ease-in-out infinite !important; }
.animate-wobble { animation: wobble 1s ease-in-out infinite !important; }

/* Style dla segmentów kodu w panelu Dołącz do gry */
.join-slot {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    aspect-ratio: 1 / 1 !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.join-slot.slot-active {
    border-color: rgba(255, 168, 212, 0.9) !important;
    background: rgba(252, 135, 194, 0.12) !important;
    box-shadow: 0 0 16px rgba(252, 135, 194, 0.3), inset 0 0 10px rgba(252, 135, 194, 0.15) !important;
    transform: translateY(-2px) scale(1.02);
}
.join-slot.slot-filled {
    border-color: rgba(255, 168, 212, 0.72) !important;
    background: linear-gradient(135deg, rgba(252, 135, 194, 0.22), rgba(232, 104, 169, 0.15)) !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(252, 135, 194, 0.26) !important;
    transform: translateY(-1px);
}
.join-slot.slot-loading {
    border-color: rgba(255, 168, 212, 0.9) !important;
    background: rgba(252, 135, 194, 0.18) !important;
    box-shadow: 0 0 16px rgba(252, 135, 194, 0.35) !important;
    animation: pulseSubtle 1.2s ease-in-out infinite !important;
}
.join-slot.slot-success {
    border-color: rgba(52, 211, 153, 0.9) !important;
    background: rgba(16, 185, 129, 0.18) !important;
    color: #6ee7b7 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
    transform: scale(1.02);
}
.join-slot.slot-error {
    border-color: rgba(252, 135, 194, 0.95) !important;
    background: rgba(232, 104, 169, 0.2) !important;
    color: #ffcce6 !important;
    box-shadow: 0 0 20px rgba(252, 135, 194, 0.45) !important;
    transform: scale(1.02);
}

body.theme-light .join-slot {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
}
body.theme-light .join-slot .slot-dot {
    color: #94a3b8 !important;
}
body.theme-light .join-slot.slot-active {
    border-color: rgba(232, 104, 169, 0.8) !important;
    background: #ffffff !important;
    box-shadow: 0 0 16px rgba(232, 104, 169, 0.2) !important;
}
body.theme-light .join-slot.slot-filled {
    background: rgba(255, 245, 250, 0.95) !important;
    border-color: rgba(232, 104, 169, 0.6) !important;
    color: #822857 !important;
    box-shadow: 0 0 15px rgba(232, 104, 169, 0.15) !important;
}
body.theme-light .join-slot.slot-loading {
    border-color: rgba(232, 104, 169, 0.8) !important;
    background: rgba(255, 245, 250, 0.95) !important;
    box-shadow: 0 0 15px rgba(232, 104, 169, 0.2) !important;
}
body.theme-light .join-slot.slot-success {
    border-color: #059669 !important;
    background: rgba(209, 250, 229, 0.9) !important;
    color: #065f46 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2) !important;
}
body.theme-light .join-slot.slot-error {
    border-color: #e868a9 !important;
    background: rgba(255, 229, 242, 0.9) !important;
    color: #cc4b8d !important;
    box-shadow: 0 0 15px rgba(232, 104, 169, 0.2) !important;
}

/* Animacje dla radaru/portalu w panelu Dołącz do gry */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes spinReverseSlow {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}
@keyframes pulseSubtle {
    0%, 100% { opacity: 0.95; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}
.animate-spin-slow {
    animation: spinSlow 12s linear infinite !important;
}
.animate-spin-reverse {
    animation: spinReverseSlow 8s linear infinite !important;
}
.animate-orbit {
    animation: spinSlow 4s linear infinite !important;
}
.animate-pulse-subtle {
    animation: pulseSubtle 3s ease-in-out infinite !important;
}

/* Style dla panelu Graj jako Gość */
#guest-input-wrapper {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
#guest-input-wrapper.wrapper-loading {
    border-color: rgba(255, 168, 212, 0.9) !important;
    background: rgba(252, 135, 194, 0.14) !important;
    box-shadow: 0 0 16px rgba(252, 135, 194, 0.35) !important;
}
#guest-input-wrapper.wrapper-success {
    border-color: rgba(52, 211, 153, 0.9) !important;
    background: rgba(16, 185, 129, 0.18) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
}
#guest-input-wrapper.wrapper-error {
    border-color: rgba(252, 135, 194, 0.95) !important;
    background: rgba(232, 104, 169, 0.2) !important;
    box-shadow: 0 0 20px rgba(252, 135, 194, 0.45) !important;
}
body.theme-light #guest-input-wrapper {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}
body.theme-light #guest-input-wrapper.wrapper-loading {
    border-color: rgba(232, 104, 169, 0.8) !important;
    background: rgba(255, 245, 250, 0.95) !important;
    box-shadow: 0 0 15px rgba(232, 104, 169, 0.2) !important;
}
body.theme-light #guest-input-wrapper.wrapper-success {
    border-color: #059669 !important;
    background: rgba(209, 250, 229, 0.9) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2) !important;
}
body.theme-light #guest-input-wrapper.wrapper-error {
    border-color: #e868a9 !important;
    background: rgba(255, 229, 242, 0.9) !important;
    box-shadow: 0 0 15px rgba(232, 104, 169, 0.2) !important;
}
body.theme-light #guest-name-input {
    color: #0f172a !important;
}
body.theme-light #guest-name-input::placeholder {
    color: #94a3b8 !important;
}
#btn-submit-guest,
#btn-submit-guest:hover,
#btn-submit-guest:active,
#btn-submit-guest:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
body.theme-light #btn-submit-guest,
body.theme-light #btn-submit-guest:hover,
body.theme-light #btn-submit-guest:active,
body.theme-light #btn-submit-guest:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #64748b !important;
}
body.theme-light #btn-submit-guest:hover {
    color: #0f172a !important;
}

/* Sekcja Hero: Lockup Paradise × Impostor i animowana typografia tytułu */
.hero-logo-tile {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 280ms ease,
                border-color 280ms ease;
}

.hero-logo-tile:hover {
    transform: translateY(-2px) scale(1.04);
}

.hero-logo-tile--paradise,
.hero-logo-tile--impostor {
    background: linear-gradient(155deg, rgba(252, 135, 194, 0.18) 0%, rgba(232, 104, 169, 0.06) 100%);
    border: 1px solid rgba(252, 135, 194, 0.3);
    box-shadow: 0 10px 28px rgba(252, 135, 194, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.hero-logo-tile--paradise:hover,
.hero-logo-tile--impostor:hover {
    border-color: rgba(252, 135, 194, 0.5);
    box-shadow: 0 12px 34px rgba(252, 135, 194, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-paradise-img {
    filter: drop-shadow(0 0 12px rgba(252, 135, 194, 0.52));
}

.hero-impostor-glyph {
    filter: drop-shadow(0 0 14px rgba(252, 135, 194, 0.72));
}

.hero-bridge-line {
    width: 10px;
    height: 1px;
    border-radius: 9999px;
}

.hero-bridge-line--left {
    background: linear-gradient(90deg, rgba(252, 135, 194, 0.6), rgba(226, 232, 240, 0.22));
}

.hero-bridge-line--right {
    background: linear-gradient(270deg, rgba(252, 135, 194, 0.6), rgba(226, 232, 240, 0.22));
}

.hero-collab-x {
    color: rgba(226, 232, 240, 0.72);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.18));
}

@keyframes impostorTextSweep {
    0%, 25% {
        background-position: 100% 50%, 0% 0%;
    }
    75%, 100% {
        background-position: 0% 50%, 0% 0%;
    }
}

@keyframes impostorGlowPulse {
    0%, 100% {
        filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.08))
                drop-shadow(0 6px 18px rgba(252, 135, 194, 0.24))
                drop-shadow(0 4px 12px rgba(2, 6, 23, 0.65));
    }
    50% {
        filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.14))
                drop-shadow(0 10px 30px rgba(252, 135, 194, 0.52))
                drop-shadow(0 4px 12px rgba(2, 6, 23, 0.65));
    }
}

@keyframes impostorGlowPulseLight {
    0%, 100% {
        filter: drop-shadow(0 4px 12px rgba(232, 104, 169, 0.12))
                drop-shadow(0 2px 6px rgba(15, 23, 42, 0.08));
    }
    50% {
        filter: drop-shadow(0 8px 22px rgba(232, 104, 169, 0.28))
                drop-shadow(0 2px 6px rgba(15, 23, 42, 0.12));
    }
}

.hero-impostor-title {
    font-size: clamp(2.9rem, 13.5vw, 4.6rem);
    line-height: 0.94;
    letter-spacing: 0.06em;
    padding-left: 0.06em;
    background-image:
        linear-gradient(
            110deg,
            transparent 0%,
            transparent 37%,
            rgba(255, 255, 255, 0.96) 46%,
            rgba(255, 168, 212, 0.92) 50%,
            rgba(255, 255, 255, 0.92) 54%,
            transparent 63%,
            transparent 100%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f1f5f9 44%,
            #cbd5e1 76%,
            #ffcce6 100%
        );
    background-size: 340% 100%, 100% 100%;
    background-position: 100% 50%, 0% 0%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: impostorTextSweep 4.8s ease-in-out infinite,
               impostorGlowPulse 3.6s ease-in-out infinite;
    will-change: background-position, filter;
}

body.no-vfx .hero-impostor-title {
    animation: none !important;
    background-position: 100% 50%, 0% 0%;
}

/* Wersja jasnego motywu dla sekcji Hero */
body.theme-light .hero-logo-tile--paradise,
body.theme-light .hero-logo-tile--impostor {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 245, 250, 0.78) 100%);
    border-color: rgba(252, 135, 194, 0.28);
    box-shadow: 0 8px 24px rgba(252, 135, 194, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-light .hero-impostor-glyph {
    filter: drop-shadow(0 2px 8px rgba(232, 104, 169, 0.24));
}

body.theme-light .hero-collab-x {
    color: rgba(51, 65, 85, 0.75);
    filter: none;
}

body.theme-light .hero-bridge-line--left {
    background: linear-gradient(90deg, rgba(232, 104, 169, 0.5), rgba(100, 116, 139, 0.22));
}

body.theme-light .hero-bridge-line--right {
    background: linear-gradient(270deg, rgba(232, 104, 169, 0.5), rgba(100, 116, 139, 0.22));
}

body.theme-light .hero-impostor-title {
    background-image:
        linear-gradient(
            110deg,
            transparent 0%,
            transparent 37%,
            rgba(255, 255, 255, 0.85) 47%,
            rgba(252, 135, 194, 0.9) 50%,
            rgba(255, 255, 255, 0.85) 53%,
            transparent 63%,
            transparent 100%
        ),
        linear-gradient(
            180deg,
            #0f172a 0%,
            #1e293b 52%,
            #334155 78%,
            #cc4b8d 100%
        );
    background-size: 340% 100%, 100% 100%;
    background-position: 100% 50%, 0% 0%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation: impostorTextSweep 4.8s ease-in-out infinite,
               impostorGlowPulseLight 3.6s ease-in-out infinite;
}

/* Zakryta karta roli w sekcji skojarzeń */
.role-cover-card {
    background:
        radial-gradient(circle at 50% 44%, rgba(252, 135, 194, 0.16) 0%, rgba(204, 75, 141, 0.06) 38%, rgba(16, 6, 9, 0.96) 76%),
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.015) 0px,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 14px
        ),
        #12070b;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        inset 0 0 60px rgba(0, 0, 0, 0.72);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.role-cover-card__corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: rgba(255, 168, 212, 0.35);
    pointer-events: none;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.role-cover-card:hover .role-cover-card__corner {
    border-color: rgba(255, 168, 212, 0.65);
}

.role-cover-card__emblem {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(252, 135, 194, 0.22), rgba(20, 9, 13, 0.9));
    border: 1px solid rgba(255, 168, 212, 0.35);
    box-shadow:
        0 0 32px -6px rgba(252, 135, 194, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.role-cover-card__ring {
    position: absolute;
    inset: -9px;
    border-radius: 9999px;
    border: 1px dashed rgba(255, 168, 212, 0.28);
    animation: roleCoverOrbit 18s linear infinite;
}

.role-cover-card:hover .role-cover-card__emblem {
    transform: scale(1.06);
    border-color: rgba(255, 168, 212, 0.6);
    box-shadow:
        0 0 42px -4px rgba(252, 135, 194, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.role-cover-card:active .role-cover-card__emblem {
    transform: scale(0.95);
}

@keyframes roleCoverOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.no-vfx .role-cover-card__ring {
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .role-cover-card__ring {
        animation: none !important;
    }
}

body.theme-light .role-cover-card {
    background:
        radial-gradient(circle at 50% 44%, rgba(252, 135, 194, 0.14) 0%, rgba(255, 168, 212, 0.06) 40%, rgba(248, 250, 252, 0.97) 78%),
        #f8fafc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 36px rgba(15, 23, 42, 0.06);
}

body.theme-light .role-cover-card__emblem {
    background: radial-gradient(circle at 30% 30%, rgba(252, 135, 194, 0.16), rgba(255, 255, 255, 0.95));
    border-color: rgba(232, 104, 169, 0.35);
    box-shadow: 0 12px 26px -10px rgba(232, 104, 169, 0.25);
}

body.theme-light .role-cover-card__ring {
    border-color: rgba(232, 104, 169, 0.28);
}

body.theme-light .role-cover-card__hint {
    background: rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}

/* Odsłonięta karta roli w sekcji skojarzeń */
.role-revealed-card {
    --role-accent: 252, 135, 194;
    background:
        radial-gradient(circle at 50% 34%, rgba(var(--role-accent), 0.22) 0%, rgba(var(--role-accent), 0.06) 44%, rgba(16, 6, 9, 0.96) 80%),
        #12070b;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 56px rgba(0, 0, 0, 0.68);
    -webkit-user-select: none;
    user-select: none;
}

.role-revealed-card--citizen {
    --role-accent: 16, 185, 129;
}

.role-revealed-card--impostor {
    --role-accent: 252, 135, 194;
}

.role-revealed-card__corner {
    border-color: rgba(var(--role-accent), 0.42);
}

.role-revealed-card__pill {
    background: rgba(var(--role-accent), 0.12);
    border: 1px solid rgba(var(--role-accent), 0.3);
}

.role-revealed-card__emblem {
    width: 72px;
    height: 72px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(var(--role-accent), 0.24), rgba(16, 8, 12, 0.9));
    border: 1px solid rgba(var(--role-accent), 0.4);
    box-shadow:
        0 0 28px -6px rgba(var(--role-accent), 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.role-revealed-card__vault {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.62));
    border: 1px solid rgba(var(--role-accent), 0.26);
    box-shadow:
        0 10px 24px -14px rgba(var(--role-accent), 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-light .role-revealed-card {
    background:
        radial-gradient(circle at 50% 34%, rgba(var(--role-accent), 0.16) 0%, rgba(var(--role-accent), 0.05) 45%, rgba(248, 250, 252, 0.98) 82%),
        #f8fafc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 32px rgba(15, 23, 42, 0.05);
}

body.theme-light .role-revealed-card__emblem {
    background: radial-gradient(circle at 30% 30%, rgba(var(--role-accent), 0.18), rgba(255, 255, 255, 0.95));
}

body.theme-light .role-revealed-card__vault {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(var(--role-accent), 0.3);
    box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.15);
}

/* Karta "Czekamy" po zatwierdzeniu skojarzenia (bez zieleni + animacja finalizacji) */
.typing-submitted-card {
    background:
        radial-gradient(circle at 12% 0%, rgba(252, 135, 194, 0.14) 0%, transparent 55%),
        radial-gradient(circle at 92% 100%, rgba(232, 104, 169, 0.09) 0%, transparent 55%),
        rgba(18, 9, 13, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 18px 42px -18px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.typing-submitted-card__word {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.58));
    border: 1px solid rgba(252, 135, 194, 0.24);
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.45),
        0 0 22px -14px rgba(252, 135, 194, 0.38);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.typing-submitted-card--complete {
    border-color: rgba(255, 168, 212, 0.55);
    box-shadow:
        0 18px 46px -14px rgba(252, 135, 194, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    animation: typingCardCompletePulse 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.typing-submitted-card--complete::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.14) 50%, transparent 80%);
    transform: translateX(-115%);
    pointer-events: none;
    animation: typingCardCompleteSweep 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.typing-submitted-card--complete .typing-submitted-card__word {
    border-color: rgba(255, 168, 212, 0.5);
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.4),
        0 0 28px -10px rgba(252, 135, 194, 0.48);
}

@keyframes typingCardCompletePulse {
    0% { transform: scale(0.99); }
    45% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

@keyframes typingCardCompleteSweep {
    0% { transform: translateX(-115%); opacity: 0.95; }
    100% { transform: translateX(120%); opacity: 0; }
}

body.no-vfx .typing-submitted-card--complete,
body.no-vfx .typing-submitted-card--complete::after {
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .typing-submitted-card--complete,
    .typing-submitted-card--complete::after {
        animation: none !important;
    }
}

body.theme-light .typing-submitted-card {
    background:
        radial-gradient(circle at 12% 0%, rgba(252, 135, 194, 0.11) 0%, transparent 55%),
        rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 14px 30px -16px rgba(15, 23, 42, 0.14);
}

body.theme-light .typing-submitted-card__word {
    background: rgba(241, 245, 249, 0.92);
    border-color: rgba(252, 135, 194, 0.32);
    box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.06);
}

/* Tablica skojarzeń w fazie dyskusji (2 kolumny obok siebie bez scrolla) */
.clue-tile {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.045) 0%, rgba(0, 0, 0, 0.38) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px -14px rgba(0, 0, 0, 0.65);
    transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}

.clue-tile:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.065) 0%, rgba(0, 0, 0, 0.34) 100%);
}

.clue-tile--me {
    border-color: rgba(252, 135, 194, 0.35);
    background: linear-gradient(160deg, rgba(252, 135, 194, 0.12) 0%, rgba(16, 6, 9, 0.55) 100%);
}

.clue-tile__word {
    background: transparent;
    border: none;
}

body.theme-light .clue-tile {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 6px 16px -12px rgba(15, 23, 42, 0.16);
}

body.theme-light .clue-tile--me {
    border-color: rgba(232, 104, 169, 0.35);
    background: rgba(255, 245, 250, 0.92);
}

body.theme-light .clue-tile__word {
    background: transparent;
    border: none;
}

/* Przebudowana sekcja gotowości do głosowania (czyste okrągłe żetony bez boxów) & ekstra czas */
.vote-avatar-node {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    opacity: 0.45;
}

.vote-avatar-node__avatar {
    filter: grayscale(0.85) brightness(0.75);
    transition: filter 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.vote-avatar-node--ready {
    opacity: 1;
    transform: translateY(-2px);
}

.vote-avatar-node--ready .vote-avatar-node__avatar {
    filter: none;
    box-shadow: 0 0 18px -4px rgba(16, 185, 129, 0.72);
}

.extra-time-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0%, rgba(0, 0, 0, 0.28) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.extra-time-card--active {
    border-color: rgba(245, 158, 11, 0.32);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, rgba(0, 0, 0, 0.28) 100%);
}

.extra-time-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.extra-time-btn:hover {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fde68a;
}

.extra-time-btn--voted {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.18) 100%);
    border-color: rgba(251, 191, 36, 0.6);
    color: #fef3c7;
    box-shadow: 0 6px 18px -8px rgba(245, 158, 11, 0.65);
}

@keyframes timerExtendedPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
    35% { transform: scale(1.07); box-shadow: 0 0 22px rgba(245, 158, 11, 0.55); border-color: rgba(251, 191, 36, 0.7); color: #fde68a; }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
}

.game-timer-pill--extended {
    animation: timerExtendedPulse 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

body.theme-light .extra-time-card {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(15, 23, 42, 0.1);
}

body.theme-light .extra-time-card--active {
    background: rgba(255, 251, 235, 0.95);
    border-color: rgba(217, 119, 6, 0.38);
}

body.theme-light .extra-time-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.14);
    color: #334155;
}

body.theme-light .extra-time-btn--voted {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.12) 100%);
    border-color: rgba(217, 119, 6, 0.55);
    color: #92400e;
}

/* Sekcja głosowania — Wybierz podejrzanego */
.suspect-card {
    background-color: rgba(16, 17, 24, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px -16px rgba(0, 0, 0, 0.7);
    transition: border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease, transform 0.14s ease;
    transform: translateZ(0);
}

.suspect-card::before,
.suspect-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.suspect-card::before {
    background: linear-gradient(155deg, rgba(252, 135, 194, 0.2) 0%, rgba(28, 7, 13, 0.72) 100%);
}

.suspect-card::after {
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.2) 0%, rgba(8, 22, 17, 0.72) 100%);
}

.suspect-card--interactive {
    cursor: pointer;
}

.suspect-card--interactive:hover {
    border-color: rgba(252, 135, 194, 0.48);
    box-shadow: 0 12px 28px -14px rgba(252, 135, 194, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.suspect-card--interactive:hover::before {
    opacity: 0.65;
}

.suspect-card--interactive:active {
    transform: scale(0.99);
}

.suspect-card--dimmed {
    opacity: 0.56;
}

.suspect-card--dimmed:hover {
    opacity: 0.92;
}

.suspect-card--interactive:hover .suspect-card__cta {
    background: rgba(252, 135, 194, 0.9);
    border-color: rgba(255, 204, 230, 0.55);
    color: #ffffff;
    box-shadow: 0 0 14px -4px rgba(252, 135, 194, 0.65);
}

.suspect-card--confirming {
    border-color: rgba(252, 135, 194, 0.74);
    box-shadow: 0 12px 30px -12px rgba(252, 135, 194, 0.52), inset 0 1px 0 rgba(255, 229, 242, 0.16);
}

.suspect-card--confirming::before {
    opacity: 1;
}

.suspect-card--confirming .suspect-card__cta {
    background: rgba(252, 135, 194, 0.9);
    border-color: rgba(255, 204, 230, 0.6);
    color: #ffffff;
}

.suspect-card--selected {
    border-color: rgba(16, 185, 129, 0.58);
    box-shadow: 0 10px 26px -12px rgba(16, 185, 129, 0.38), inset 0 1px 0 rgba(167, 243, 208, 0.18);
}

.suspect-card--selected::after {
    opacity: 1;
}

.suspect-card--locked {
    opacity: 0.66;
}

.suspect-card__cta {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffcce6;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.suspect-card__footer {
    position: relative;
    height: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.22s ease;
}

.suspect-card--confirming .suspect-card__footer {
    border-top-color: rgba(252, 135, 194, 0.28);
}

.suspect-card--selected .suspect-card__footer {
    border-top-color: rgba(16, 185, 129, 0.26);
}

.suspect-card__footer-layer {
    position: absolute;
    inset: 4px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.suspect-card__footer-layer--passive {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}

.suspect-card__footer-layer--passive.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.suspect-card__footer-layer--confirm {
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
}

.suspect-card__footer-layer--confirm.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

body.theme-light .suspect-card {
    background-color: rgba(255, 255, 255, 0.94);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 18px -12px rgba(15, 23, 42, 0.14);
}

body.theme-light .suspect-card::before {
    background: linear-gradient(155deg, rgba(252, 135, 194, 0.14) 0%, rgba(255, 229, 242, 0.65) 100%);
}

body.theme-light .suspect-card::after {
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.14) 0%, rgba(209, 250, 229, 0.65) 100%);
}

body.theme-light .suspect-card--interactive:hover {
    border-color: rgba(232, 104, 169, 0.45);
}

body.theme-light .suspect-card--confirming {
    border-color: rgba(232, 104, 169, 0.65);
    box-shadow: 0 10px 24px -12px rgba(232, 104, 169, 0.26);
}

body.theme-light .suspect-card--selected {
    border-color: rgba(16, 185, 129, 0.55);
}

body.theme-light .suspect-card__cta {
    background: rgba(252, 135, 194, 0.08);
    border-color: rgba(252, 135, 194, 0.25);
    color: #e868a9;
}

body.theme-light .suspect-card__footer {
    border-top-color: rgba(15, 23, 42, 0.08);
}

/* Ostatnia Szansa (Unified Glass Showdown Stage) */
.lastchance-clue-tile {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lastchance-terminal-box {
    background: rgba(0, 0, 0, 0.36);
    border: 1.5px solid rgba(252, 135, 194, 0.32);
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.lastchance-terminal-box:focus-within {
    background: rgba(0, 0, 0, 0.48);
    border-color: rgba(255, 168, 212, 0.85);
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.5), 0 0 24px -6px rgba(252, 135, 194, 0.5);
}

.lastchance-submit-btn {
    background: linear-gradient(135deg, #e868a9 0%, #fc87c2 55%, #ffa8d4 100%);
    border: 1px solid rgba(255, 229, 242, 0.28);
    box-shadow: 0 12px 28px -12px rgba(252, 135, 194, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.lastchance-submit-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 16px 34px -10px rgba(252, 135, 194, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

#lastchance-timer-pill.is-urgent {
    background-color: rgba(252, 135, 194, 0.24);
    border-color: rgba(255, 168, 212, 0.65);
    box-shadow: 0 0 22px -6px rgba(252, 135, 194, 0.65);
}

.lastchance-defend-card {
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.45) 100%);
    border: 1px solid rgba(16, 185, 129, 0.28);
    box-shadow: inset 0 1px 0 rgba(167, 243, 208, 0.14), 0 12px 28px -16px rgba(16, 185, 129, 0.35);
}

@keyframes radarSweep {
    0% { transform: scale(0.95); opacity: 0.65; }
    75% { transform: scale(1.22); opacity: 0; }
    100% { transform: scale(1.22); opacity: 0; }
}

.lastchance-radar-ring {
    animation: radarSweep 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes eqBar {
    0%, 100% { transform: scaleY(0.35); opacity: 0.55; }
    50% { transform: scaleY(1); opacity: 1; }
}

.lastchance-eq-bar {
    transform-origin: bottom center;
    animation: eqBar 1.1s ease-in-out infinite;
}

body.theme-light .lastchance-clue-tile {
    background: rgba(248, 250, 252, 0.94);
    border-color: rgba(15, 23, 42, 0.1);
}

body.theme-light .lastchance-terminal-box {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(232, 104, 169, 0.35);
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.theme-light .lastchance-defend-card {
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.14) 0%, rgba(236, 253, 245, 0.9) 100%);
    border-color: rgba(16, 185, 129, 0.35);
}




