/* GAME-SPECIFIC STYLES (Variables loaded from /css/common.css) */

/* Light Theme Overrides */
body.light-theme {
    --bg-dark: #f0f2f5;
    --bg-panel: #ffffff;
    --text-main: #1a1a2e;
    --text-muted: #64748b;
    --glass-border: 1px solid rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

body.light-theme h1 {
    background: linear-gradient(45deg, #2c3e50, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .glass-panel,
body.light-theme .setting-card,
body.light-theme .active-players-panel,
body.light-theme .modal-panel {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

body.light-theme input,
body.light-theme select {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

body.light-theme input::placeholder {
    color: #94a3b8;
}

/* Reduce Motion */
body.reduce-motion * {
    animation: none !important;
    transition: none !important;
}

body.light-theme .app-background {
    background: radial-gradient(circle at 50% 120%, #e2e8f0 0%, #f1f5f9 60%);
}

.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    background-attachment: fixed;
    color: var(--text-main);
    height: 100vh;
    width: 100vw;
    margin: 0;
    max-width: none;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.game-center-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 2rem;
}

/* Hide original header elements that moved to sidebar if they still exist in CSS */

/* BACKGROUND FX */
.app-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 120%, #1e1e2f 0%, #0a0a0f 60%);
    z-index: -2;
}

.scanlines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* SCREEN MANAGEMENT */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Force height to viewport */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scroll mobile */
}

/* Footer layout fix */
/* Footer layout fix */
#game-screen footer {
    width: 100%;
    padding: 1.5rem 0;
    margin-top: auto; /* Push to bottom of flex container */
    background: transparent;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

/* Removing default flex centering for game screen specifically */
#game-screen {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Stretch to fill */
    overflow: hidden; /* Internal scrolling handled by sidebar/main */
}

.screen.hidden {
    display: none;
}

.screen.active {
    pointer-events: all;
    transform: scale(1);
}

/* SETUP SCREEN */
#setup-screen {
    justify-content: center;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #fff, #a4b0be);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle-badge {
    background: var(--primary);
    color: white;
    font-size: 0.9rem;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.input-group {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.error-message {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.error-message.hidden {
    display: none;
}

input {
    background: var(--glass-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    padding: 1rem;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    background: var(--glass-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1), var(--shadow-md);
    transform: translateY(-1px);
}

/* iOS STYLE BUTTONS */
.btn-twitch {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.9) 0%, rgba(119, 44, 232, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    border: var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md), 0 4px 20px rgba(145, 70, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-twitch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-twitch:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-lg), 0 8px 30px rgba(145, 70, 255, 0.5);
    background: linear-gradient(135deg, rgba(169, 112, 255, 0.95) 0%, rgba(139, 92, 246, 0.95) 100%);
}

.btn-twitch:active {
    transform: translateY(0) scale(0.98);
}

.btn-twitch:disabled {
    background: var(--glass-bg);
    cursor: not-allowed;
    box-shadow: var(--shadow-sm);
    transform: none;
    opacity: 0.5;
}

.btn-twitch svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* GAME RULES SECTION */
.game-rules {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.game-rules h3 {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.rules-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rule-item .icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 50%;
    line-height: 1;
}

.rule-item p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-muted);
    margin: 0;
}

.rule-item strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0051D5 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-md), 0 4px 16px rgba(0, 122, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0A84FF 0%, #0066CC 100%);
}

/* GAME SCREEN */
header {
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-box {
    text-align: center;
}

.stats-box .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.stats-box .value {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-small {
    font-weight: 900;
    opacity: 0.5;
    letter-spacing: 4px;
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none; /* FORCE FULL WIDTH */
    gap: 2rem;
}

.product-showcase {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.image-container {
    width: 600px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5); /* Deep shadow */
    border: var(--glass-border);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.price-tag {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--gold);
    color: #000;
    font-weight: 900;
    font-size: 2.5rem;
    padding: 1rem 2rem;
    border-radius: 20px;
    transform: rotate(-5deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 10;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.price-tag.hidden {
    opacity: 0;
    transform: rotate(-5deg) scale(0.5);
    pointer-events: none;
}

#product-name {
    margin-top: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

/* TIMER */
.timer-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-ring {
    transform: rotate(-90deg);
}

.timer-ring-circle {
    stroke-dasharray: 326;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-text {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

/* STREAMER INPUT */
.streamer-input-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    padding: 1.5rem 3rem;
    border-radius: 50px;
    border: var(--glass-border);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(10px);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    font-size: 1.5rem;
    width: 150px;
    padding-right: 2rem;
}

.currency {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.btn-secondary {
    background: var(--glass-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    border: var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-secondary:not(:disabled):hover {
    background: var(--glass-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255,255,255,0.25);
}

/* FOOTER */
footer {
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.btn-action {
    background: linear-gradient(135deg, var(--accent) 0%, #A67FFF 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    border: var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.2rem 4rem;
    border-radius: var(--radius-lg);
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-md), 0 4px 20px rgba(145, 70, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.btn-action:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 8px 30px rgba(145, 70, 255, 0.6);
    background: linear-gradient(135deg, #B58CFF 0%, #9146FF 100%);
}

.btn-action:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(145, 70, 255, 0.5);
}

.status-bar {
    position: absolute;
    bottom: 10px;
    left: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* RESULTS OVERLAY */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.3s;
}

/* Glass Rule Item */
.rule-item-glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: var(--glass-border);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-glass);
    max-width: 600px;
    margin-top: 1rem;
}

.rule-item-glass .icon {
    font-size: 1.5rem;
}

.rule-item-glass p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: left;
}

.rule-item-glass strong {
    color: var(--accent);
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.result-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    width: 700px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    animation: popIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.comparison {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 3rem 0;
}

.result-box {
    flex: 1;
}

.result-box h3 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 0.7;
}

.guess-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.diff-display {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 5px;
}

.diff-display.winner {
    color: var(--accent);
}

.diff-display.loser {
    color: var(--danger);
}

.vs-badge {
    background: rgba(255,255,255,0.1);
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-style: italic;
}

.winner-announce {
    background: linear-gradient(90deg, transparent, rgba(255, 165, 2, 0.1), transparent);
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.best-viewer-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(255, 165, 2, 0.3);
}

.winner-text {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
    display: block;
    margin-top: 0.5rem;
}

.real-price-display {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.real-price-display span {
    color: white;
    font-weight: 700;
}

/* GAME OVER SCREEN */
.game-over-panel {
    text-align: center;
    width: 600px;
    padding: 3rem;
}

.final-scores {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
}

.score-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-card .score-value {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
}

.vs-divider {
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0.5;
}

/* SETTINGS */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.setting-item label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.setting-item.checkbox-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    padding: 0 1rem;
    border-radius: 12px;
    border: var(--glass-border);
    transition: background 0.3s;
}

.setting-item.checkbox-item:hover {
    background: rgba(255,255,255,0.05);
}

.setting-item input[type="text"], 
.setting-item input[type="number"] {
    width: 100%;
    margin: 0;
}

/* STREAMER MODE */
.streamer-blur {
    filter: blur(8px);
    transition: filter 0.3s;
}

.streamer-blur:focus, .streamer-blur:hover {
    filter: blur(5px); /* Less blur on focus but still hidden */
}

/* LEADERBOARD IN SIDEBAR */
.leaderboard-panel {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.leaderboard-panel h3 {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 800;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.leaderboard-table th {
    text-align: left;
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table td {
    padding: 0.5rem;
    vertical-align: middle;
}

.leaderboard-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Rank column */
.leaderboard-table td:first-child {
    font-weight: 700;
    width: 30px;
    text-align: center;
}

/* Player column */
.leaderboard-table td:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Score column */
.leaderboard-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: var(--accent);
}

.leaderboard-table tr:first-child td {
    color: var(--gold);
}

/* USER PROFILE BAR */
.user-profile-bar {
    position: absolute;
    top: 20px;
    right: 380px; /* Offset for Chat Sidebar (350px) + margin */
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: var(--glass-border);
    box-shadow: var(--shadow-glass);
    z-index: 5;
    transition: all 0.3s ease;
}

.user-profile-bar:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(2px);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    object-fit: cover;
}

.profile-info span {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.profile-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.btn-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.btn-logout {
    background: rgba(255, 71, 87, 0.2);
}

.btn-logout:hover {
    background: var(--danger);
}

/* SETTINGS MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-panel {
    background: rgba(20, 20, 29, 0.9);
    border: var(--glass-border);
    backdrop-filter: blur(24px);
    border-radius: 20px;
    width: 600px;
    max-width: 90%;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* SELECT DROPDOWN */
select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

select option {
    background: var(--bg-panel);
    color: white;
}

/* TOOLTIP */
.tooltip {
    font-size: 0.75rem;
    opacity: 0.6;
    font-style: italic;
}

/* ACTIVE PLAYERS PANEL */
/* GAME LAYOUT GRID */
.game-layout {
    display: flex;
    width: 100%;
    flex: 1; /* Take remaining vertical space */
    min-height: 0; /* Allow shrinking */
    overflow: hidden;
    position: relative;
}

/* LEFT SIDEBAR - iOS Glass */
.game-sidebar-left {
    width: 300px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: var(--glass-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1);
}

.game-sidebar-left .stats-box {
    width: 100%;
    background: var(--glass-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-sidebar-left .stats-box:hover {
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.game-sidebar-left .stats-box.large .value {
    font-size: 3rem;
    color: var(--primary);
}

/* ACTIVE PLAYERS PANEL - iOS Glass */
.active-players-panel {
    flex: 1;
    background: var(--glass-bg-light);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* RIGHT SIDEBAR - iOS Glass */
.game-sidebar-right {
    width: 350px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-left: var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.1);
}

#twitch-chat-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
}

#twitch-chat-embed {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.active-players-panel h3 {
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    text-align: center;
}

.active-players-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.active-players-scroll::-webkit-scrollbar {
    width: 6px;
}

.active-players-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.active-players-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.player-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--glass-bg-light);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInSlide 0.3s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.player-item:hover {
    background: var(--glass-bg);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-left-width: 4px;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.player-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.player-participation {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.player-guess {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.no-players {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-style: italic;
    font-size: 0.9rem;
}

/* ACTIONS MULTI (for settings page) */
.actions-multi {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-danger {
    background: var(--danger);
    border: none;
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-danger:hover {
    background: #ff2f41;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* Responsive for Active Players Panel */
@media (max-width: 1400px) {
    .active-players-panel {
        width: 250px;
    }
}

@media (max-width: 1200px) {
    .active-players-panel {
        display: none;
    }
}

/* ========== TOAST NOTIFICATIONS ========== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 250px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-weight: 600;
    color: white;
}

.toast-success {
    border-left-color: var(--accent);
}

.toast-success .toast-icon {
    color: var(--accent);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning {
    border-left-color: #ffaa00;
}

.toast-warning .toast-icon {
    color: #ffaa00;
}

.toast-info {
    border-left-color: var(--primary);
}

.toast-info .toast-icon {
    color: var(--primary);
}

/* ========== MODALS (Pause/Resume) ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-panel {
    background: rgba(20, 20, 35, 0.9);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    text-align: center;
}

.modal-body {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-footer button {
    flex: 1;
    max-width: 200px;
}



/* Mode Streamer - Masquage CSS de l input sans utiliser type=password */
input.password-style {
    -webkit-text-security: disc !important;
    font-family: text-security-disc !important;
    letter-spacing: 0.125em;
}

/* Groupe de boutons streamer (VALIDER + Oeil) */
.streamer-btn-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Bouton oeil toggle pendant le round */
.btn-eye-toggle {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.6);
}

.btn-eye-toggle:not(:disabled):hover {
    background: rgba(145, 70, 255, 0.2);
    border-color: rgba(145, 70, 255, 0.5);
    color: #9146FF;
    transform: scale(1.05);
}

.btn-eye-toggle:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-eye-toggle.active {
    background: rgba(145, 70, 255, 0.3);
    border-color: rgba(145, 70, 255, 0.6);
    color: #B58CFF;
    box-shadow: 0 0 15px rgba(145, 70, 255, 0.4);
}

.btn-eye-toggle svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.btn-eye-toggle:not(:disabled):hover svg {
    transform: scale(1.1);
}

/* Ajuster la taille du bouton VALIDER pour correspondre */
.streamer-btn-group .btn-secondary {
    flex: 1;
    height: 48px;
}

/* Badge HOST pour le streamer */
.streamer-badge {
    background: linear-gradient(135deg, #9146FF 0%, #B58CFF 100%);
    color: white !important;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(145, 70, 255, 0.4);
}

.streamer-item {
    background: rgba(145, 70, 255, 0.1);
    border: 1px solid rgba(145, 70, 255, 0.3);
}

/* Indicateur joueurs cachés (optimisation 300+ joueurs) */
.hidden-players-info {
    text-align: center;
    padding: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.5rem;
}
