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

:root {
    --primary-gradient: linear-gradient(135deg, #FF8940 0%, #D64DC2 50%, #902CEF 100%);
    --secondary-gradient: linear-gradient(135deg, #4DDBA8 0%, #00B8EB 50%, #602BFF 100%);
    --accent-gradient: radial-gradient(circle at top left, #FAFA39 0%, #FF8940 25%, #D64DC2 60%, #902CEF 100%);
    --invalid-gradient: linear-gradient(135deg, #FF577B 0%, #D12977 50%, #8100B0 100%);

    --bg-dark: #0a0420;
    --bg-overlay: rgba(10, 4, 32, 0.85);
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.12);

    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-dark: #1a1a2e;

    --success: #4DDBA8;
    --error: #FF577B;
    --warning: #FF8940;

    --shadow-lg: 0 20px 60px rgba(144, 44, 239, 0.4);
    --shadow-xl: 0 30px 80px rgba(214, 77, 194, 0.5);
    --glow: 0 0 40px rgba(250, 250, 57, 0.6);
}

body {
    font-family: 'Balsamiq Sans', 'Comic Neue', 'Quicksand', cursive, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 30%, rgba(250, 250, 57, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 60%, rgba(214, 77, 194, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(144, 44, 239, 0.15) 0%, transparent 45%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.screen {
    display: none;
    animation: screenFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
    display: block;
}

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

.logo {
    text-align: center;
    margin: 40px 0 50px;
    position: relative;
}

.logo h1 {
    font-family: 'Londrina Solid', 'Fredoka One', 'Righteous', sans-serif;
    font-size: 6.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 5px 20px rgba(250, 250, 57, 0.5)) drop-shadow(0 0 60px rgba(214, 77, 194, 0.4));
    animation: logoBreath 4s ease-in-out infinite;
    margin-bottom: 15px;
    position: relative;
}

@keyframes logoBreath {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 5px 20px rgba(250, 250, 57, 0.5)); }
    50% { transform: scale(1.03); filter: drop-shadow(0 8px 30px rgba(250, 250, 57, 0.8)); }
}

.logo p {
    color: var(--text-muted);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.card {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 50px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin: 25px auto;
    max-width: 700px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(250, 250, 57, 0.4);
}

.card-large {
    max-width: 1100px;
}

.btn {
    display: inline-block;
    padding: 18px 42px;
    border-radius: 60px;
    border: none;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::after {
    width: 400px;
    height: 400px;
}

.btn:active {
    transform: scale(0.93);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 12px 40px rgba(214, 77, 194, 0.6), var(--glow);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
    border: 3px solid transparent;
    position: relative;
    background-clip: padding-box;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 60px;
    padding: 3px;
    background: var(--secondary-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.btn-secondary:hover {
    color: var(--text-dark);
    background: var(--secondary-gradient);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(77, 219, 168, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #00B8EB);
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-success:hover {
    box-shadow: 0 12px 40px rgba(77, 219, 168, 0.6);
}

.btn-block {
    display: block;
    width: 100%;
    margin: 16px 0;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    filter: grayscale(1);
}

.input-group {
    margin: 28px 0;
}

.input-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-light);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 18px 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-weight: 600;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #FF8940;
    box-shadow: 0 0 0 5px rgba(255, 137, 64, 0.25), 0 8px 30px rgba(255, 137, 64, 0.4);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.flex {
    display: flex;
    gap: 15px;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.avatar-selector {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 28px 0;
}

.avatar-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.avatar-option:hover {
    transform: scale(1.2) rotate(8deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 137, 64, 0.5);
    background: rgba(255, 137, 64, 0.2);
}

.avatar-option.selected {
    background: rgba(0, 0, 0, 0.4);
    border: 4px solid #FF8940;
    box-shadow: 0 0 30px rgba(250, 250, 57, 0.6), 0 8px 30px rgba(214, 77, 194, 0.4);
    transform: scale(1.25);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(250, 250, 57, 0.5); }
    50% { box-shadow: 0 0 50px rgba(250, 250, 57, 0.9), 0 0 80px rgba(214, 77, 194, 0.6); }
}

.player-list {
    margin: 28px 0;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    gap: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.player-item:hover {
    background: var(--card-hover);
    border-color: rgba(255, 137, 64, 0.5);
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(255, 137, 64, 0.3);
}

.player-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 900;
    font-size: 1.35rem;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.player-status {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.player-score {
    font-weight: 900;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #FAFA39, #FF8940);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(250, 250, 57, 0.5));
}

.ready-badge {
    background: var(--success);
    color: var(--text-dark);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 6px 20px rgba(77, 219, 168, 0.5);
    animation: badgePulse 2.5s ease infinite;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 20px rgba(77, 219, 168, 0.5); }
    50% { transform: scale(1.08); box-shadow: 0 8px 30px rgba(77, 219, 168, 0.8); }
}

.chat-container {
    margin: 28px 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.chat-messages {
    height: 260px;
    overflow-y: auto;
    padding: 24px;
}

.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

.chat-message {
    margin: 12px 0;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 1rem;
    border-left: 4px solid;
    border-image: var(--secondary-gradient) 1;
    animation: chatSlide 0.4s ease;
}

@keyframes chatSlide {
    from {
        opacity: 0;
        transform: translateX(-25px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-message strong {
    color: #4DDBA8;
    margin-right: 10px;
    font-weight: 900;
}

.chat-input {
    display: flex;
    padding: 20px;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.15);
}

.chat-input input {
    flex: 1;
    padding: 14px 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 60px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-weight: 600;
}

.chat-input input:focus {
    outline: none;
    border-color: #FF8940;
    box-shadow: 0 0 0 3px rgba(255, 137, 64, 0.2);
}

.chat-input button {
    padding: 14px 32px;
    border-radius: 60px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-input button:hover {
    box-shadow: 0 6px 25px rgba(214, 77, 194, 0.6);
    transform: translateY(-2px) scale(1.03);
}

.phase-indicator {
    text-align: center;
    margin: 28px 0;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4);
}

.phase-indicator h2 {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.phase-indicator .timer {
    font-size: 4.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FAFA39, #FF8940);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    filter: drop-shadow(0 6px 20px rgba(250, 250, 57, 0.6));
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.rule-item {
    text-align: center;
    padding: 28px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.rule-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 40px rgba(255, 137, 64, 0.4);
    border-color: rgba(255, 137, 64, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.rule-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: iconFloat 3s ease-in-out infinite;
}

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

.rule-item h3 {
    margin-bottom: 10px;
    color: #4DDBA8;
    font-weight: 900;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rule-item p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.question-display {
    background: var(--primary-gradient);
    padding: 50px;
    border-radius: 28px;
    text-align: center;
    margin: 28px 0;
    font-size: 2.8rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 20px 60px rgba(214, 77, 194, 0.6);
    animation: questionPulse 3s ease-in-out infinite;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes questionPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 20px 60px rgba(214, 77, 194, 0.6); }
    50% { transform: scale(1.02); box-shadow: 0 25px 70px rgba(214, 77, 194, 0.8); }
}

.answer-hint {
    background: rgba(250, 250, 57, 0.15);
    padding: 15px;
    border-radius: 16px;
    margin-top: 12px;
    text-align: center;
    color: #FAFA39;
    font-weight: 900;
    border: 2px solid rgba(250, 250, 57, 0.4);
    animation: hintGlow 2s ease-in-out infinite;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes hintGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(250, 250, 57, 0.4); }
    50% { box-shadow: 0 0 30px rgba(250, 250, 57, 0.7); }
}

.results-container {
    margin: 28px 0;
}

.result-group {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    animation: resultSlide 0.6s ease backwards;
}

@keyframes resultSlide {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-group.best-sync {
    border-color: rgba(250, 250, 57, 0.6);
    box-shadow: 0 0 40px rgba(250, 250, 57, 0.4);
    background: rgba(250, 250, 57, 0.08);
}

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

.result-answer {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-count {
    font-size: 1.3rem;
    font-weight: 900;
    color: #4DDBA8;
}

.result-bar-container {
    width: 100%;
    height: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
}

.result-bar {
    height: 100%;
    background: var(--secondary-gradient);
    border-radius: 12px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fillBar 1.2s ease;
    box-shadow: 0 0 20px rgba(77, 219, 168, 0.6);
}

@keyframes fillBar {
    from { width: 0; }
}

.result-players {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.result-player {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    border: 2px solid transparent;
    font-weight: 700;
}

.result-player.saboteur {
    background: rgba(255, 87, 123, 0.2);
    border-color: var(--error);
    animation: saboteurGlow 1.5s ease-in-out infinite;
}

@keyframes saboteurGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 87, 123, 0.4); }
    50% { box-shadow: 0 0 30px rgba(255, 87, 123, 0.7); }
}

.scoreboard-sidebar {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255, 255, 255, 0.15);
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

.scoreboard-sidebar h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.scoreboard-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.scoreboard-mini-item.me {
    border: 2px solid rgba(250, 250, 57, 0.6);
    box-shadow: 0 0 20px rgba(250, 250, 57, 0.4);
    background: rgba(250, 250, 57, 0.1);
}

.scoreboard-mini-item .rank {
    font-weight: 900;
    width: 28px;
    color: var(--text-muted);
}

.scoreboard-mini-item .avatar {
    font-size: 1.4rem;
}

.scoreboard-mini-item .name {
    flex: 1;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scoreboard-mini-item .score {
    font-weight: 900;
    color: #FAFA39;
    font-size: 1.1rem;
}

.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 4, 32, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.4s ease;
}

.countdown-overlay.fade-out {
    animation: fadeOut 0.6s ease;
}

.countdown-number {
    font-size: 12rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: countdownPop 1s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 10px 40px rgba(250, 250, 57, 0.8));
    text-transform: uppercase;
}

@keyframes countdownPop {
    0% {
        transform: scale(0.3) rotate(-15deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

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

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

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        color: var(--text-light);
    }
    50% {
        transform: scale(1.25);
        color: #FF577B;
        filter: drop-shadow(0 0 30px rgba(255, 87, 123, 0.8));
    }
}

.saboteur-targets {
    margin: 25px 0;
}

.saboteur-target {
    display: flex;
    align-items: center;
    padding: 24px;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    gap: 20px;
    border: 2px solid rgba(255, 87, 123, 0.5);
    transition: all 0.3s ease;
    animation: chatSlide 0.4s ease;
}

.saboteur-target:hover {
    background: var(--card-hover);
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(255, 87, 123, 0.4);
}

.saboteur-notification {
    background: rgba(255, 87, 123, 0.15);
    border: 3px solid var(--error);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: #FF577B;
    animation: saboteurNotif 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes saboteurNotif {
    0% {
        transform: scale(0.85) rotate(-3deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.08) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.podium-container {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: 28px;
    overflow: hidden;
    transition: all 1s ease;
}

.podium-container.dark {
    background: #000;
}

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 25px;
    animation: podiumRise 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.podium-place {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    border-radius: 20px 20px 0 0;
    padding: 25px;
    min-width: 200px;
}

.podium-place.first {
    height: 300px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    order: 2;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.6);
}

.podium-place.second {
    height: 240px;
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
    order: 1;
    box-shadow: 0 15px 50px rgba(192, 192, 192, 0.5);
}

.podium-place.third {
    height: 200px;
    background: linear-gradient(135deg, #CD7F32, #E69958);
    order: 3;
    box-shadow: 0 12px 40px rgba(205, 127, 50, 0.5);
}

.podium-number {
    position: absolute;
    top: 25px;
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.25);
}

.podium-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.podium-player.animate-in {
    animation: playerDrop 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes playerDrop {
    0% {
        opacity: 0;
        transform: translateY(-80px) scale(0.4) rotate(-10deg);
    }
    60% {
        transform: translateY(15px) scale(1.15) rotate(3deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.podium-avatar {
    font-size: 4.5rem;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.podium-player.winner .podium-avatar {
    animation: winnerBounce 2.5s ease-in-out infinite;
}

@keyframes winnerBounce {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 20px 60px rgba(255, 215, 0, 0.9);
    }
}

.podium-nickname {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-dark);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.podium-score {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text-dark);
}

.spotlight {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.5) 0%, transparent 70%);
    pointer-events: none;
    animation: spotlightFlicker 3s ease-in-out infinite;
}

@keyframes spotlightFlicker {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

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

.confetti-piece {
    position: absolute;
    width: 12px;
    height: 12px;
    top: -15px;
    opacity: 0;
    animation: confettiFall 3.5s linear infinite;
}

@keyframes confettiFall {
    0% {
        top: -15px;
        opacity: 1;
        transform: rotate(0deg);
    }
    100% {
        top: 100%;
        opacity: 0;
        transform: rotate(900deg);
    }
}

.other-players {
    margin-top: 50px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    animation: fadeIn 0.6s ease;
}

.other-players h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #4DDBA8;
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.question-submission-container {
    max-width: 900px;
    margin: 0 auto;
}

.question-input-group {
    margin: 24px 0;
}

.question-input-group input {
    width: 100%;
    padding: 18px 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transition: all 0.3s ease;
    font-weight: 600;
}

.question-input-group input:focus {
    outline: none;
    border-color: #FF8940;
    box-shadow: 0 0 0 5px rgba(255, 137, 64, 0.25);
    transform: translateY(-2px);
}

.question-input-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-light);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.waiting-message {
    text-align: center;
    padding: 70px 25px;
    animation: badgePulse 2.5s ease infinite;
}

.waiting-message h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.answers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.answer-option {
    background: rgba(255, 255, 255, 0.08);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.answer-option:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: rgba(255, 137, 64, 0.6);
    box-shadow: 0 10px 30px rgba(255, 137, 64, 0.4);
    background: rgba(255, 137, 64, 0.15);
}

.answer-option span {
    position: relative;
    z-index: 1;
}

.answer-option.selected {
    border-color: #FF8940;
    background: rgba(255, 137, 64, 0.25);
    box-shadow: 0 0 30px rgba(255, 137, 64, 0.5);
}

.answer-option.correct {
    border-color: var(--success);
    background: rgba(77, 219, 168, 0.25);
    animation: correctPulse 0.8s ease;
}

.answer-option.correct::before {
    background: linear-gradient(135deg, var(--success), #00B8EB);
    opacity: 0.3;
}

.answer-option.wrong {
    border-color: var(--error);
    background: rgba(255, 87, 123, 0.25);
    animation: wrongShake 0.6s ease;
}

.answer-option.wrong::before {
    background: var(--invalid-gradient);
    opacity: 0.3;
}

.answer-option.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); box-shadow: 0 0 50px rgba(77, 219, 168, 0.9); }
    100% { transform: scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-15px); }
    50% { transform: translateX(15px); }
    75% { transform: translateX(-10px); }
}

.answer-result {
    text-align: center;
    padding: 40px;
    border-radius: 24px;
    margin: 30px 0;
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: resultZoom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes resultZoom {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.answer-result.correct {
    background: rgba(77, 219, 168, 0.2);
    border: 4px solid var(--success);
    color: var(--success);
}

.answer-result.wrong {
    background: rgba(255, 87, 123, 0.2);
    border: 4px solid var(--error);
    color: var(--error);
}

.correct-answer-display {
    background: rgba(77, 219, 168, 0.15);
    border: 2px solid rgba(77, 219, 168, 0.4);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
}

.streak-display {
    background: rgba(250, 250, 57, 0.15);
    border: 2px solid rgba(250, 250, 57, 0.4);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #FAFA39;
    animation: streakGlow 2s ease-in-out infinite;
}

@keyframes streakGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(250, 250, 57, 0.4); }
    50% { box-shadow: 0 0 40px rgba(250, 250, 57, 0.8); }
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 28px 0;
}

.alert {
    padding: 20px 28px;
    border-radius: 20px;
    margin: 25px 0;
    font-weight: 700;
    animation: alertShake 0.6s ease;
    text-align: center;
}

@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-12px); }
    75% { transform: translateX(12px); }
}

.alert-error {
    background: rgba(255, 87, 123, 0.2);
    color: var(--error);
    border: 3px solid var(--error);
}

.alert-success {
    background: rgba(77, 219, 168, 0.2);
    color: var(--success);
    border: 3px solid var(--success);
}

.alert-info {
    background: rgba(0, 184, 235, 0.2);
    color: #00B8EB;
    border: 3px solid #00B8EB;
}

@media (max-width: 1200px) {
    .scoreboard-sidebar {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin: 25px 0;
    }
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 3.8rem;
    }

    .card {
        padding: 30px;
        margin: 15px;
    }

    .btn {
        padding: 16px 36px;
        font-size: 1rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .phase-indicator .timer {
        font-size: 3rem;
    }

    .question-display {
        font-size: 2rem;
        padding: 35px;
    }

    .result-answer {
        font-size: 1.3rem;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .answers-grid {
        grid-template-columns: 1fr;
    }

    .answer-option {
        font-size: 1.1rem;
        padding: 20px 25px;
    }

    .podium {
        gap: 15px;
    }

    .podium-place {
        min-width: 120px;
        padding: 18px;
    }

    .podium-place.first {
        height: 240px;
    }

    .podium-place.second {
        height: 200px;
    }

    .podium-place.third {
        height: 160px;
    }

    .podium-avatar {
        font-size: 3rem;
        width: 80px;
        height: 80px;
    }

    .podium-nickname {
        font-size: 1.1rem;
    }

    .podium-score {
        font-size: 1.3rem;
    }

    .podium-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 2.8rem;
    }

    .avatar-option {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }

    .countdown-number {
        font-size: 8rem;
    }
}
