@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --background-color: #120e1f;
    --primary-container-bg: rgba(32, 28, 52, 0.82);
    --secondary-container-bg: rgba(44, 39, 68, 0.82);
    --accent-color-light: rgba(138, 120, 226, 0.35);
    --accent-color-strong: rgba(110, 86, 207, 0.75);
    --text-primary: #FFFFFF;
    --text-secondary: #A09CB8;
    --primary-accent: #7f6aed;
    --primary-accent-light: #9b89ff;
    --border-radius-main: 22px;
    --border-radius-inner: 18px;
    --padding-main: clamp(20px, 5vw, 40px);
    --surface-border: rgba(255, 255, 255, 0.09);
    --surface-glow: rgba(127, 106, 237, 0.18);
    --shadow-elevated: 0 28px 70px rgba(6, 4, 20, 0.55);
    --shadow-soft: 0 12px 30px rgba(13, 10, 30, 0.42);
    --panel-gradient: linear-gradient(150deg, rgba(36, 30, 58, 0.95) 0%, rgba(18, 15, 36, 0.95) 100%);
    --panel-glow-primary: rgba(127, 106, 237, 0.22);
    --panel-glow-secondary: rgba(202, 82, 140, 0.2);
}

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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(120% 160% at 82% 12%, rgba(137, 118, 230, 0.28) 0%, rgba(18, 14, 31, 0) 52%),
        radial-gradient(120% 160% at 12% 88%, rgba(210, 77, 135, 0.22) 0%, rgba(18, 14, 31, 0) 62%),
        linear-gradient(135deg, #151129 0%, #08050f 100%);
    color: var(--text-primary);
    padding: 0;
    overflow-x: hidden;
}

.main-container {
    position: relative;
    width: 100%;
    margin: 0;
    background: var(--primary-container-bg);
    border-radius: 0;
    padding: clamp(26px, 4vw, 36px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-elevated);
    backdrop-filter: blur(24px);
    overflow: hidden;
}

.main-container::before {
    content: '';
    position: absolute;
    inset: -160px;
    background:
        radial-gradient(280px at 24% 22%, var(--panel-glow-primary), transparent 70%),
        radial-gradient(340px at 78% 68%, var(--panel-glow-secondary), transparent 78%);
    opacity: 0.82;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.main-container > * {
    position: relative;
    z-index: 1;
}

/* Header / Nav */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(20px, 4vw, 34px);
    padding: 18px 24px;
    background: var(--panel-gradient);
    border-radius: calc(var(--border-radius-inner) + 4px);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    gap: 24px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    height: 34px;
    filter: drop-shadow(0 4px 10px rgba(127, 106, 237, 0.4));
}

.logo-container .logo-text {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: linear-gradient(120deg, #fff 10%, #c8c1ff 50%, #9c8cff 100%);
    -webkit-background-clip: text;
    color: transparent;
}

.logo-container .beta-tag {
    background-color: var(--accent-color-light);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 10px;
    font-weight: 500;
}

.navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(34, 30, 55, 0.72);
    padding: 12px 24px;
    border-radius: var(--border-radius-inner);
    gap: 28px;
    position: relative;
    border: 1px solid var(--surface-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(12, 8, 30, 0.45);
    backdrop-filter: blur(18px);
}

.navigation::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: calc(var(--border-radius-inner) - 6px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.nav-item {
    padding: 0;
    margin: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    background-color: transparent;
    position: relative;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(127, 106, 237, 0.25);
    transform: translateY(-2px);
}

.nav-item img {
    height: 22px;
    vertical-align: middle;
    opacity: 0.95;
}

.nav-item.active {
    background: radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 44%),
        linear-gradient(180deg, #a495ff 0%, #7f6aed 100%);
    box-shadow: 0 16px 36px rgba(127, 106, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.nav-item.active img {
    opacity: 1;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -16px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9587ff;
    box-shadow: 0 0 0 2px rgba(149, 135, 255, 0.28), 0 6px 16px rgba(127, 106, 237, 0.6);
}


/* Main Content Area */
.content-area {
    display: flex;
    flex-grow: 1;
    gap: clamp(18px, 4vw, 32px);
    overflow: hidden;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vw, 28px);
    overflow-y: auto;
    padding-right: 4px;
}

.right-panel {
    flex: 0 0 clamp(280px, 28vw, 320px);
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vw, 28px);
    overflow-y: auto;
    padding-left: 4px;
}

.scoring-system {
    position: relative;
    background: var(--panel-gradient);
    border-radius: var(--border-radius-inner);
    padding: clamp(22px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.scoring-system::before {
    content: '';
    position: absolute;
    inset: -140px -60px -110px -80px;
    background:
        radial-gradient(260px at 84% 12%, var(--panel-glow-primary), transparent 72%),
        radial-gradient(300px at 14% 96%, var(--panel-glow-secondary), transparent 78%);
    opacity: 0.75;
    pointer-events: none;
}

.scoring-system > * {
    position: relative;
    z-index: 1;
}

.scoreboard-players {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.player-score-item {
    position: relative;
    background: linear-gradient(140deg, rgba(31, 26, 52, 0.94) 0%, rgba(18, 15, 36, 0.94) 100%);
    border-radius: 14px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 28px rgba(11, 7, 26, 0.45);
    cursor: pointer;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border 0.28s ease;
    overflow: hidden;
}

.player-score-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(127, 106, 237, 0.45), rgba(202, 82, 140, 0.16));
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.player-score-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 10, 38, 0.6);
    border-color: rgba(150, 132, 255, 0.35);
}

.player-score-item:hover::before {
    opacity: 0.35;
}

.player-score-item.is-judge {
    border-color: rgba(255, 200, 100, 0.4);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1), 
        0 12px 28px rgba(11, 7, 26, 0.45),
        0 0 0 2px rgba(255, 200, 100, 0.2);
}

.player-name-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.player-name-wrap .player-name-display {
    flex: 1;
    width: auto;
}

.score-adjust {
    display: flex;
    align-items: center;
    gap: 6px;
}

.score-adjust-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.score-adjust-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.score-adjust-btn:hover::before {
    opacity: 1;
}

.score-adjust-btn span {
    position: relative;
    z-index: 1;
}

.score-adjust-btn--up {
    background: rgba(100, 220, 160, 0.18);
    color: #6ef5a8;
}

.score-adjust-btn--up:hover {
    background: rgba(100, 220, 160, 0.28);
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 4px 12px rgba(100, 220, 160, 0.25);
}

.score-adjust-btn--up:active {
    transform: translateY(0) scale(1.02);
}

.score-adjust-btn--down {
    background: rgba(255, 100, 120, 0.18);
    color: #ff8094;
}

.score-adjust-btn--down:hover {
    background: rgba(255, 100, 120, 0.28);
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 4px 12px rgba(255, 100, 120, 0.25);
}

.score-adjust-btn--down:active {
    transform: translateY(0) scale(1.02);
}

.score-adjust-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.player-name-display {
    color: var(--text-primary);
    padding: 6px 0;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
}

.player-score-display {
    font-weight: 700;
    font-size: 20px;
    padding-right: 6px;
    color: #e0dcff;
    position: relative;
    z-index: 1;
}



.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: clamp(16px, 3vw, 24px);
    gap: 20px;
}

.section-header .header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-header .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 18px;
}

.section-header h3 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: linear-gradient(120deg, #fff 5%, #c9c2ff 45%, #a18fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.frame-progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(18px, 3vw, 28px);
    width: 100%;
}

.game-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(164, 149, 255, 0.2) 0%, rgba(202, 82, 140, 0.15) 100%);
    border: 1px solid rgba(164, 149, 255, 0.3);
    border-radius: 999px;
    padding: 8px 16px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(127, 106, 237, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.pill-icon {
    color: rgba(200, 192, 255, 0.9);
    flex-shrink: 0;
}

.pill-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(230, 225, 255, 0.95);
    letter-spacing: 0.02em;
}

.section-header .player-count {
    color: var(--text-secondary);
    font-size: 16px;
}

.player-table {
    width: 100%;
    border-collapse: collapse;
}

.player-table th, .player-table td {
    padding: 15px 10px;
    text-align: left;
    border-bottom: 1px solid var(--accent-color-light);
}

.player-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.player-info {
    display: flex;
    align-items: center;
}

.player-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.player-name {
    font-weight: 600;
}

.rating-bar {
    width: 100%;
    height: 5px;
    background-color: var(--accent-color-light);
    border-radius: 2.5px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background-color: var(--primary-accent);
    border-radius: 2.5px;
}

.player-actions button {
    background: none;
    border: 1px solid var(--accent-color-light);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.player-actions button:hover {
    background-color: var(--accent-color-light);
    color: var(--text-primary);
}


.arena-controls button {
    padding: 11px 24px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.28s ease, border-color 0.28s ease, color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
    font-size: 15px;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 22px rgba(15, 10, 40, 0.35);
}

.btn-primary {
    background: linear-gradient(135deg, #a495ff 0%, #7f6aed 100%);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #b3a8ff 0%, #9180ff 100%);
    box-shadow: 0 16px 32px rgba(127, 106, 237, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(150, 132, 255, 0.18);
    color: var(--text-primary);
    border-color: rgba(150, 132, 255, 0.38);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(127, 106, 237, 0.35);
}

/* ===================== */
/* Guess the Frame Arena */
/* ===================== */
.game-arena {
    position: relative;
    background: var(--panel-gradient);
    border-radius: var(--border-radius-inner);
    padding: clamp(24px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.game-arena::before {
    content: '';
    position: absolute;
    inset: -120px -80px -140px -20px;
    background:
        radial-gradient(220px at 18% 18%, var(--panel-glow-primary), transparent 72%),
        radial-gradient(260px at 92% 82%, var(--panel-glow-secondary), transparent 78%);
    opacity: 0.65;
    pointer-events: none;
}

.game-arena > * {
    position: relative;
    z-index: 1;
}

.game-arena .section-header {
    margin-bottom: 0;
}

.arena-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.frame-stage {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(120% 160% at 28% 20%, rgba(127, 106, 237, 0.28) 0%, rgba(32, 27, 56, 0.9) 55%),
        linear-gradient(160deg, rgba(20, 16, 36, 0.95) 0%, rgba(9, 7, 22, 0.98) 100%);
    aspect-ratio: 16 / 9;
    width: 100%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 80px rgba(12, 8, 30, 0.65), 0 22px 48px rgba(10, 6, 28, 0.6);
}

.frame-progress {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    flex: 1 1 0;
}

.frame-progress__label {
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 12px;
    color: rgba(200, 192, 255, 0.9);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.frame-progress__label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b5a9ff 0%, #8a77ff 100%);
    box-shadow: 
        0 0 8px rgba(149, 135, 255, 0.6),
        0 0 16px rgba(127, 106, 237, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

.frame-progress__track {
    position: relative;
    width: 100%;
    height: 14px;
    padding: 2px;
    border-radius: 999px;
    background: transparent;
    overflow: visible;
}

.frame-progress__segments {
    --segments: 10;
    display: grid;
    grid-template-columns: repeat(var(--segments), 1fr);
    gap: 6px;
    height: 100%;
    padding: 0 2px;
}

.frame-progress__segment {
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        rgba(80, 70, 130, 0.35) 0%,
        rgba(60, 50, 100, 0.25) 100%
    );
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.frame-progress__segment::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.frame-progress__segment--active {
    opacity: 1;
    background: linear-gradient(
        135deg,
        #d4ccff 0%,
        #a495ff 50%,
        #8870f5 100%
    );
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 0 16px rgba(164, 149, 255, 0.6),
        0 4px 12px rgba(127, 106, 237, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    animation: segment-activate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.frame-progress__segment--active::before {
    opacity: 1;
}

.frame-progress__segment--active::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        circle at center,
        rgba(164, 149, 255, 0.4) 0%,
        transparent 60%
    );
    filter: blur(8px);
    opacity: 0.8;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes segment-activate {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.frame-stage .frame-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: blur(24px);
    transition: transform 0.45s ease, filter 0.35s ease;
}

.frame-stage .frame-image.is-blurred {
    filter: blur(24px);
}

.frame-stage .frame-image:not(.is-blurred) {
    filter: blur(0);
}

.frame-stage:hover .frame-image:not(.is-blurred) {
    transform: scale(1.03);
}

.dialogue-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 6vw, 80px);
    background: 
        radial-gradient(circle at 50% 50%, rgba(164, 149, 255, 0.08) 0%, transparent 70%),
        linear-gradient(135deg, rgba(31, 26, 52, 0.95) 0%, rgba(18, 15, 36, 0.95) 100%);
    z-index: 1;
}

.dialogue-text {
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    filter: blur(12px);
    transition: filter 0.35s ease;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    max-width: 90%;
}

.dialogue-text::before {
    content: '"';
    font-size: 1.5em;
    opacity: 0.5;
    margin-right: 0.1em;
}

.dialogue-text::after {
    content: '"';
    font-size: 1.5em;
    opacity: 0.5;
    margin-left: 0.1em;
}

.dialogue-card:not(.is-blurred) .dialogue-text {
    filter: blur(0);
}

.riddle-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
    background: 
        radial-gradient(circle at 50% 30%, rgba(164, 149, 255, 0.12) 0%, transparent 60%),
        linear-gradient(135deg, rgba(31, 26, 52, 0.95) 0%, rgba(18, 15, 36, 0.95) 100%);
    gap: clamp(24px, 4vw, 36px);
    z-index: 1;
}

.riddle-card.is-blurred .riddle-question,
.riddle-card.is-blurred .riddle-options {
    filter: blur(12px);
    transition: filter 0.35s ease;
}

.riddle-card:not(.is-blurred) .riddle-question,
.riddle-card:not(.is-blurred) .riddle-options {
    filter: blur(0);
}

.riddle-question {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    max-width: 90%;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.riddle-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 600px;
}

.riddle-option {
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid rgba(164, 149, 255, 0.3);
    background: linear-gradient(135deg, rgba(31, 26, 52, 0.8) 0%, rgba(18, 15, 36, 0.8) 100%);
    color: var(--text-primary);
    font-family: inherit;
    font-size: clamp(14px, 2.5vw, 16px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(12, 8, 30, 0.4);
}

.riddle-option:hover {
    background: linear-gradient(135deg, rgba(164, 149, 255, 0.25) 0%, rgba(127, 106, 237, 0.15) 100%);
    border-color: rgba(164, 149, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(127, 106, 237, 0.3);
}

.riddle-option:active {
    transform: translateY(0);
}

.riddle-option.selected {
    background: linear-gradient(135deg, #a495ff 0%, #7f6aed 100%);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 8px 20px rgba(127, 106, 237, 0.5);
}

.riddle-option.correct {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: rgba(74, 222, 128, 0.5);
    color: white;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.5);
    pointer-events: none;
}

.riddle-option.wrong {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.5);
    color: white;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.5);
    pointer-events: none;
}

.timer {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(11, 9, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(9, 5, 26, 0.55);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.timer-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.16);
    stroke-width: 3.4;
}

.timer-ring .ring-progress {
    fill: none;
    stroke: #a796ff;
    stroke-linecap: round;
    stroke-width: 3.6;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.95s linear;
}

.countdown {
    position: absolute;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.04em;
}

.answer-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 9, 24, 0.2), rgba(12, 9, 24, 0.88));
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.answer-overlay.dialogue-answer {
    background: 
        radial-gradient(circle at 50% 50%, rgba(127, 106, 237, 0.15) 0%, transparent 60%),
        linear-gradient(180deg, rgba(18, 15, 36, 0.65), rgba(18, 15, 36, 0.88));
}

.answer-overlay .answer-title {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.hidden { display: none; }

/* Winner Overlay */
.winner-overlay {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 20%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 120, 226, 0.2) 0%, transparent 50%),
        rgba(9, 6, 20, 0.95);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.winner-overlay:not(.hidden) {
    display: flex;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.winner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 4vw, 40px);
    max-width: 900px;
    width: 100%;
    animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.winner-trophy {
    color: #ffd700;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.winner-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
    margin: 0;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.9));
    }
}

.winner-player-name {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.winner-score {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 600;
    color: #a495ff;
    letter-spacing: 0.02em;
}

.winner-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(16px, 3vw, 32px);
    margin-top: clamp(20px, 3vw, 40px);
    width: 100%;
}

.podium-item {
    background: linear-gradient(140deg, rgba(31, 26, 52, 0.95) 0%, rgba(18, 15, 36, 0.95) 100%);
    border-radius: 18px;
    padding: clamp(20px, 3vw, 32px) clamp(16px, 2vw, 24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(10, 6, 28, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: clamp(120px, 20vw, 180px);
    animation: slideUp 0.6s ease-out backwards;
}

.podium-second {
    order: 1;
    border-color: rgba(192, 192, 192, 0.4);
    animation-delay: 0.2s;
}

.podium-third {
    order: 2;
    border-color: rgba(205, 127, 50, 0.4);
    animation-delay: 0.3s;
}

.podium-fourth {
    order: 3;
    border-color: rgba(127, 106, 237, 0.4);
    animation-delay: 0.4s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.podium-rank {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.podium-second .podium-rank {
    color: #c0c0c0;
    text-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
}

.podium-third .podium-rank {
    color: #cd7f32;
    text-shadow: 0 0 20px rgba(205, 127, 50, 0.6);
}

.podium-fourth .podium-rank {
    color: #a495ff;
    text-shadow: 0 0 20px rgba(164, 149, 255, 0.6);
}

.podium-name {
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 600;
    color: rgba(230, 225, 255, 0.95);
    letter-spacing: 0.02em;
}

.podium-score {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: #a495ff;
    letter-spacing: 0.02em;
}

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


.guess-modal {
    position: fixed;
    inset: 0;
    background: rgba(9, 6, 20, 0.6);
    display: none;
    place-items: center;
    backdrop-filter: blur(12px);
    padding: 20px;
}

.guess-modal:not(.hidden) {
    display: grid;
}

.guess-dialog {
    background: rgba(32, 28, 50, 0.92);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: clamp(22px, 4vw, 32px);
    width: min(420px, 92vw);
    display: grid;
    gap: 16px;
    box-shadow: 0 28px 60px rgba(9, 6, 24, 0.55);
}

.guess-dialog h3 {
    font-size: 22px;
    letter-spacing: 0.04em;
}

.guessing-player {
    color: rgba(202, 197, 230, 0.82);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.guess-input {
    padding: 13px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 15, 30, 0.75);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.guess-input:focus {
    outline: none;
    border-color: rgba(150, 132, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(150, 132, 255, 0.18);
}


.guess-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@media (max-width: 1024px) {
    .content-area {
        flex-direction: column;
        overflow: visible;
    }

    .left-panel,
    .right-panel {
        padding: 0;
    }

    .right-panel {
        flex: 1 1 auto;
    }
}

@media (max-width: 860px) {
    .main-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 18px;
    }

    .navigation {
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .logo-container {
        order: 1;
    }

    .user-actions {
        order: 2;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    body {
        padding: clamp(16px, 5vw, 24px);
    }

    .arena-controls button {
        flex: 1 1 120px;
    }

    .timer {
        width: 72px;
        height: 72px;
        right: 12px;
        top: 12px;
    }
}
