:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1823;
    --bg-card: #1e2328;
    --border-color: #3c4043;
    --text-primary: #ffffff;
    --text-secondary: #a09b8c;
    --text-white: #f0e6d2;
    --accent-gold: #c89b3c;
    --accent-blue: #0596aa;
    --accent-green: #0a9e7e;
    --accent-red: #c4183c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images3.alphacoders.com/129/1291921.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: -1;
}

/* Background animation removed - using static first image only */

/* Footer Credit */
.footer-credit {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(200, 155, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-white);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.footer-credit:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 155, 60, 0.2);
}

.footer-credit .flag-pt {
    font-size: 1.2rem;
}

/* Lobby Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

.game-title {
    font-size: 3rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--text-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.lobby-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.lobby-card {
    background: rgba(30, 35, 40, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    min-width: 300px;
}

.lobby-card h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.divider {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: bold;
}

.form-group {
    margin-bottom: 1rem;
}

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

input[type="text"], select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-white);
    font-size: 1rem;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(200, 155, 60, 0.2);
}

.btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700, #ffb400);
    color: var(--bg-primary);
    font-weight: bold;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffe033, #ffc433);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-blue), #047a8a);
    color: var(--text-white);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(5, 150, 170, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: var(--text-white);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #e04656, #d32f3f);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.features {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.feature {
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.feature h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

/* Game Styles */
.game-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-header {
    background: rgba(30, 35, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-gold);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

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

.room-code {
    color: var(--text-secondary);
}

.room-code strong {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.round-info {
    flex: 1;
    text-align: center;
}

.round-info h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
}

.timer-info {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.btn-exit {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: rgba(196, 24, 60, 0.8);
    color: var(--text-white);
    border: 1px solid var(--accent-red);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-exit:hover {
    background: rgba(196, 24, 60, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 24, 60, 0.4);
}

.btn-exit-full {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    background: rgba(196, 24, 60, 0.8);
    color: var(--text-white);
    border: 1px solid var(--accent-red);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-exit-full:hover {
    background: rgba(196, 24, 60, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 24, 60, 0.4);
}

.game-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.left-panel, .right-panel {
    width: 400px;
    background: rgba(30, 35, 40, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    padding: 1rem;
    overflow-y: auto;
}

.left-panel {
    display: flex;
    flex-direction: column;
}

.left-panel h3, .right-panel h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.right-panel {
    background: linear-gradient(135deg, rgba(30, 35, 40, 0.95), rgba(20, 25, 30, 0.95));
    border-left: 2px solid rgba(200, 155, 60, 0.3);
}

.center-panel {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.players-list {
    margin-bottom: 1rem;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-primary);
    border-radius: 4px;
    border-left: 3px solid transparent;
}

.player-item.is-host {
    border-left-color: var(--accent-gold);
}

.player-item.current-player {
    background: rgba(200, 155, 60, 0.1);
}

.player-name {
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flag-container {
    display: inline-flex;
    align-items: center;
}

.country-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: help;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.country-flag:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-gold);
}

/* Smaller flags in chat messages */
.chat-message .country-flag {
    width: 14px;
    height: 10.5px;
}

.player-score {
    color: #ffd700;
    font-weight: bold;
}

.host-controls {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.waiting-screen {
    text-align: center;
}

.waiting-screen h2 {
    color: #ffffff;
    margin-bottom: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 10px solid var(--border-color);
    border-top-color: #ffb700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.game-screen {
    width: 100%;
    max-width: 800px;
}

.next-sound-indicator {
    text-align: center;
    margin: 0 auto 2rem auto;
    padding: 1rem;
    background: rgba(200, 155, 60, 0.1);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    font-size: 1.3rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    width: 570px;
    box-sizing: border-box;
}

.next-sound-indicator span:last-child {
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--accent-gold);
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.ability-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.ability-btn {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-primary));
    border: 2px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: default;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


.ability-btn.playing {
    border-color: var(--accent-gold);
    animation: pulse 1s ease-in-out infinite;
}

.ability-btn.played {
    opacity: 0.6;
    border-color: var(--accent-green);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 155, 60, 0.7); }
    50% { box-shadow: 0 0 20px 10px rgba(200, 155, 60, 0); }
}

.ability-key {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.ability-status {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.ability-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 8px;
    background: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    transition: width linear;
    z-index: 1;
}

.countdown-overlay {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 10;
    animation: pulse 1s ease-in-out infinite;
}

.sound-countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(30, 35, 40, 0.98));
    color: var(--accent-gold);
    padding: 3rem 4rem;
    border-radius: 12px;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 30px rgba(200, 155, 60, 0.4);
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 100;
    text-align: center;
    animation: fadeInOut 0.5s ease;
    min-width: 300px;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.guess-section {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#guessForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 570px;
}

.input-wrapper {
    width: 100%;
    position: relative;
}

#guessInput {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.2rem;
    text-align: center;
    box-sizing: border-box;
    background: rgba(30, 35, 40, 0.8);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    color: var(--text-white);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.champion-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 35, 40, 0.98);
    border: 2px solid var(--accent-gold);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.champion-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-white);
    border-bottom: 1px solid rgba(200, 155, 60, 0.1);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 40px;
}

.suggestion-avatar {
    width: 25px;
    height: 25px;
    border-radius: 3px;
    border: 1px solid rgba(200, 155, 60, 0.3);
    object-fit: cover;
    flex-shrink: 0;
}

.suggestion-name {
    flex: 1;
    line-height: 25px;
    display: flex;
    align-items: center;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(200, 155, 60, 0.2);
    color: var(--accent-gold);
}

.suggestion-item:hover .suggestion-avatar,
.suggestion-item.selected .suggestion-avatar {
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(200, 155, 60, 0.4);
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.champion-suggestions::-webkit-scrollbar {
    width: 6px;
}

.champion-suggestions::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.champion-suggestions::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 3px;
}

#guessInput:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(10, 158, 126, 0.3);
    background: rgba(30, 35, 40, 0.95);
    transform: scale(1.02);
}

#guessInput::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.btn-guess {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--accent-green), #087a61);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(10, 158, 126, 0.3);
}

.btn-guess:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(10, 158, 126, 0.4);
    background: linear-gradient(135deg, #0ac79d, #087a61);
}

#guessResult {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#guessResult.correct {
    color: var(--accent-green);
    background: rgba(10, 158, 126, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--accent-green);
}

#guessResult.incorrect {
    color: #ff6b6b;
    font-size: 0.9rem;
    opacity: 0.8;
    animation: fadeOutQuick 1.5s ease-out forwards;
}

#guessResult.rate-limited {
    color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #ffa500;
    font-size: 0.9rem;
}

@keyframes fadeOutQuick {
    0% {
        opacity: 0.8;
        transform: translateY(0);
    }
    70% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

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

.round-result {
    text-align: center;
    background: linear-gradient(135deg, rgba(200, 155, 60, 0.15), rgba(30, 35, 40, 0.95));
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 12px;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(200, 155, 60, 0.1);
    animation: fadeIn 0.5s ease;
    max-width: 700px;
    margin: 2rem auto;
}

.round-result h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.champion-reveal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(200, 155, 60, 0.1), rgba(200, 155, 60, 0.05));
    border-radius: 12px;
}

.champion-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 20px rgba(200, 155, 60, 0.5);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

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

.champion-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.champion-info h2 {
    color: var(--accent-gold);
    font-size: 2rem;
    text-transform: capitalize;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.correct-guessers {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(10, 158, 126, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(10, 158, 126, 0.3);
}

.correct-guessers h4 {
    color: var(--accent-green);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.guesser-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.guesser-item {
    background: rgba(10, 158, 126, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--accent-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guesser-name {
    color: var(--text-white);
    font-weight: bold;
}

.guesser-points {
    color: var(--accent-green);
    font-size: 0.9rem;
}

.guesser-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.no-guessers {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem;
}

.wrong-guessers {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(196, 24, 60, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(196, 24, 60, 0.3);
}

.wrong-guessers h4 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.wrong-guesser-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.wrong-guesser-item {
    background: rgba(196, 24, 60, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: 1px solid rgba(196, 24, 60, 0.4);
    display: inline-block;
}

.wrong-guesser-name {
    color: var(--text-white);
    font-weight: bold;
    font-size: 0.95rem;
}

.next-round-countdown {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.next-round-countdown span:last-child {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-gold);
    margin-left: 0.5rem;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.8), rgba(15, 20, 30, 0.8));
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(200, 155, 60, 0.2);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 3px;
    opacity: 0.5;
}

.chat-message {
    margin-bottom: 0.4rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
    font-size: 13px;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.chat-message.system {
    background: linear-gradient(90deg, rgba(200, 155, 60, 0.15), rgba(200, 155, 60, 0.05));
    color: var(--accent-gold);
    font-style: italic;
    border-left-color: var(--accent-gold);
    justify-content: center;
}

.chat-message.system .chat-text {
    text-align: center;
    flex: initial;
}

.chat-message.system.system-join {
    background: rgba(255, 255, 255, 0.03);
    color: #0a9e7e;
    border-left-color: #0bc53e;
}

.chat-message.system.system-leave {
    background: rgba(255, 255, 255, 0.03);
    color: #dc3545;
    border-left-color: #dc3545;
}

.chat-message.system.system-inactive {
    background: rgba(255, 255, 255, 0.03);
    color: #dc3545;
    border-left-color: #dc3545;
}

.chat-message.system.correct-guess-msg {
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.15), rgba(0, 255, 0, 0.05));
    color: #00ff00;
    border-left-color: #00ff00;
}

.chat-message.system.wrong-guess-msg {
    background: linear-gradient(90deg, rgba(255, 165, 0, 0.15), rgba(255, 165, 0, 0.05));
    color: #ffa500;
    border-left-color: #ffa500;
}

.chat-message.guess {
    background: linear-gradient(90deg, rgba(10, 158, 126, 0.15), rgba(10, 158, 126, 0.05));
    color: var(--accent-green);
    border-left-color: var(--accent-green);
}

.chat-username {
    color: var(--text-primary);
    font-weight: bold;
    flex-shrink: 0;
}

.chat-text {
    color: var(--text-white);
    word-wrap: break-word;
    flex: 1;
}

.chat-time {
    color: var(--text-secondary);
    font-size: 0.65rem;
    opacity: 0.5;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#chatInput {
    width: 100%;
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid rgba(200, 155, 60, 0.3);
    border-radius: 6px;
    padding: 1rem;
    color: var(--text-white);
    transition: all 0.3s ease;
    font-size: 1rem;
}

#chatInput:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(10, 14, 26, 0.8);
    box-shadow: 0 0 10px rgba(200, 155, 60, 0.2);
}

.chat-form button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    background: linear-gradient(135deg, #33ddff, #00aadd);
}

.game-over-screen {
    position: relative;
    text-align: center;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98), rgba(30, 35, 40, 0.98));
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 12px;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.victory-content {
    position: relative;
    z-index: 10;
    animation: fadeInScale 1s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.trophy-animation {
    font-size: 5rem;
    animation: bounce 2s ease-in-out infinite;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(200, 155, 60, 0.8));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-10px) rotate(5deg); }
}

.congratulations-text {
    font-size: 3rem;
    background: linear-gradient(45deg, var(--accent-gold), #ffd700, var(--text-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(200, 155, 60, 0.5);
    margin-bottom: 1.5rem;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.winner-announcement {
    margin-bottom: 2rem;
}

.winner-name {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px rgba(200, 155, 60, 0.8), 0 0 20px rgba(200, 155, 60, 0.6), 0 0 30px rgba(200, 155, 60, 0.4); }
    50% { text-shadow: 0 0 20px rgba(200, 155, 60, 1), 0 0 30px rgba(200, 155, 60, 0.8), 0 0 40px rgba(200, 155, 60, 0.6); }
}

.winner-title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
}


.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-gold);
}

.final-rankings-container {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.final-rankings-container h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.rankings-list {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.final-ranking-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.final-ranking-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
}

.final-ranking-item.winner {
    background: linear-gradient(135deg, rgba(200, 155, 60, 0.3), rgba(200, 155, 60, 0.1));
    border: 2px solid var(--accent-gold);
    animation: winnerPulse 2s ease-in-out infinite;
}

@keyframes winnerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 155, 60, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(200, 155, 60, 0.4); }
}

.rank-position {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.rank-player {
    font-size: 1.2rem;
    color: var(--text-white);
    font-weight: 500;
}

.rank-score {
    font-size: 1.1rem;
    color: var(--accent-gold);
    font-weight: bold;
}

.game-over-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    animation: buttonBreathe 2s ease-in-out infinite;
}

@keyframes buttonBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Fireworks Container for Library */
.fireworks-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100;
}

/* Canvas element created by fireworks library */
.fireworks-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Old custom firework animations removed - using fireworks-js library now */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 35, 40, 0.98);
    backdrop-filter: blur(15px);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-content .btn {
    margin-bottom: 0.5rem;
}

.modal-content .btn-secondary {
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .left-panel, .right-panel {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .lobby-container {
        flex-direction: column;
    }
    
    .game-main {
        flex-direction: column;
    }
    
    .left-panel, .right-panel {
        width: 100%;
        max-width: 500px;
        max-height: 400px;
        margin: 0 auto;
    }
    
    .ability-buttons {
        gap: 1rem;
    }
    
    .ability-btn {
        width: 80px;
        height: 80px;
    }
}