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

html {
    height: 100%;
}

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

/* Optimización global para animaciones sin límite de FPS */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: no-preference) {
    * {
        animation-timing-function: linear;
    }
}

/* Forzar aceleración de hardware en elementos animados */
.bg, .container, .modal, .btn, .toast, .chat-widget {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Card Flip Animation - Carta que se voltea */
.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    perspective: 1500px;
}

.card-flip {
    width: 280px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.card-flip:hover {
    transform: scale(1.03);
}

.card-flip.flipping {
    animation: cardFlipBlackjack 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardFlipBlackjack {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.card-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.05) 10px, rgba(255,255,255,.05) 20px),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,255,255,.05) 10px, rgba(255,255,255,.05) 20px);
    opacity: 0.3;
}

.card-question {
    font-size: 8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    animation: questionPulse 1.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes questionPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.card-back {
    background: white;
    transform: rotateY(180deg);
    border: 3px solid rgba(0, 0, 0, 0.1);
}

.card-result {
    font-size: 2.5rem;
    font-weight: 900;
    padding: 30px 20px;
    text-align: center;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    width: 100%;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-back.impostor {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border-color: #990000;
}

.card-back.impostor .card-result {
    color: white;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    animation: glowRed 1.5s ease-in-out infinite;
}

@keyframes glowRed {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 68, 68, 1);
    }
}

.card-back.crew {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    border-color: #1B5E20;
}

.card-back.crew .card-result {
    color: white;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    animation: glowGreen 1.5s ease-in-out infinite;
}

@keyframes glowGreen {
    0%, 100% {
        text-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    }
    50% {
        text-shadow: 0 0 40px rgba(76, 175, 80, 1);
    }
}

.tap-instruction {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    animation: tapBounce 1s ease-in-out infinite;
    text-align: center;
}

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

.card-container.hidden {
    display: none;
}

/* Ajustes responsive para palabras largas */
@media (max-width: 768px) {
    .card-flip {
        width: 240px;
        height: 340px;
    }
    
    .card-question {
        font-size: 6rem;
    }
    
    .card-result {
        font-size: 2rem;
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .card-flip {
        width: 200px;
        height: 280px;
    }
    
    .card-question {
        font-size: 5rem;
    }
    
    .card-result {
        font-size: 1.5rem;
        padding: 15px 10px;
    }
}

body {
    margin: 0;
    background: #0f0f1e;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.bg {
    animation: slide 3s ease-in-out infinite alternate;
    background-image: linear-gradient(-60deg, #1a1a2e 50%, #0f3460 50%);
    bottom: 0;
    left: -50%;
    opacity: .4;
    position: fixed;
    right: -50%;
    top: 0;
    z-index: 0;
    will-change: transform;
    transition: background-image 1.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease-in-out;
}

.bg2 {
    animation-direction: alternate-reverse;
    animation-duration: 4s;
}

.bg3 {
    animation-duration: 5s;
}

@keyframes slide {
    0% {
        transform: translate3d(-25%, 0, 0);
    }
    100% {
        transform: translate3d(25%, 0, 0);
    }
}


body.impostor-theme {
    background: #1e0a0a;
    animation: fadeToRed 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeToRed {
    0% {
        background: #0f0f1e;
    }
    100% {
        background: #1e0a0a;
    }
}

body.impostor-theme::after {
    background: radial-gradient(circle, rgba(139, 26, 26, 0.3) 0%, transparent 70%);
    opacity: 1;
}

body.impostor-theme .bg {
    background-image: linear-gradient(-60deg, #8b1a1a 50%, #5a0f0f 50%);
}

body.impostor-theme .container {
    border-color: rgba(139, 26, 26, 0.5);
    box-shadow: 
        0 20px 60px rgba(139, 26, 26, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

body.crew-theme {
    background: #0a1e0f;
    animation: fadeToGreen 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeToGreen {
    0% {
        background: #0f0f1e;
    }
    100% {
        background: #0a1e0f;
    }
}

body.crew-theme::after {
    background: radial-gradient(circle, rgba(26, 92, 58, 0.3) 0%, transparent 70%);
    opacity: 1;
}

body.crew-theme .bg {
    background-image: linear-gradient(-60deg, #1a5c3a 50%, #0f3d26 50%);
}

body.crew-theme .container {
    border-color: rgba(26, 92, 58, 0.5);
    box-shadow: 
        0 20px 60px rgba(26, 92, 58, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}


.container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 10;
    transition: 
        border-color 1.5s cubic-bezier(0.4, 0, 0.2, 1), 
        box-shadow 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.welcome-screen:hover {
    transform: scale(1.02);
}

.welcome-title {
    font-size: 4rem;
    font-weight: 800;
    margin: 0;
    color: #e0e0e0;
    text-shadow: 0 0 20px rgba(122, 143, 184, 0.5);
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: rgba(224, 224, 224, 0.7);
    margin-top: 20px;
}

.welcome-screen.exit {
    animation: welcomeExit 0.3s ease-out forwards;
}

@keyframes welcomeExit {
    to {
        opacity: 0;
    }
}

.mode-screen-enter {
    animation: modeScreenEnter 0.3s ease-out forwards;
}

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

.mode-title-animated {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #e0e0e0;
    text-shadow: 0 0 15px rgba(122, 143, 184, 0.4);
}

.screen {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    width: 100%;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

h2 {
    color: #ffffff;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

h2 span {
    color: #5856d6;
    font-weight: 700;
}

h3 {
    color: #a0a0b0;
    font-weight: 600;
    font-size: 1rem;
    margin: 20px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0b0;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-control, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus, select:focus {
    outline: none;
    border-color: #5856d6;
    background: rgba(255, 255, 255, 0.08);
}

.form-control option {
    background: #1a1a2e;
    color: white;

    h2 span {
        color: #5856d6;
        font-weight: 700;
    }

    h3 {
        color: #a0a0b0;
        font-weight: 600;
        font-size: 1rem;
        margin: 20px 0 12px 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .form-group {
        width: 100%;
        max-width: 500px;
        margin-bottom: 20px;
        text-align: left;
    }

    label {
        display: block;
        margin-bottom: 8px;
        color: #a0a0b0;
        font-weight: 500;
        font-size: 0.875rem;
    }

    .form-control, select {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        color: white;
        font-size: 0.95rem;
        transition: all 0.2s ease;
        font-family: 'Inter', sans-serif;
    }

    .form-control:focus, select:focus {
        outline: none;
        border-color: #5856d6;
        background: rgba(255, 255, 255, 0.08);
    }
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card.revealed {
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid #2ecc71;
}

.card.impostor {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
}

.card .player-number {
    position: absolute;
    top: 5px;
    left: 10px;
    font-weight: bold;
    color: #a8dadc;
}

.card .word {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
}

.card .role {
    font-size: 0.9rem;
    color: #f1c40f;
    margin-top: 5px;
}

.instruction {
    font-size: 0.95rem;
    color: #a0a0b0;
    margin-bottom: 20px;
    font-weight: 400;
}

.reveal-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    padding: 50px;
    margin: 30px 0;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 3px dashed rgba(102, 126, 234, 0.5);
    position: relative;
    overflow: hidden;
}

.reveal-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.reveal-card:hover::before {
    left: 100%;
}

.reveal-card:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    transform: scale(1.03);
    border-color: #667eea;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.word-display {
    font-size: 2.5rem;
    font-weight: 700;
    padding: 32px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    margin: 24px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reveal-instruction {
    color: #fbbf24;
    font-size: 1.1rem;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

.vote-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.3);
    font-weight: 600;
    font-size: 1.1rem;
}

.vote-card:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.vote-card.voted {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.3) 0%, rgba(240, 147, 251, 0.3) 100%);
    border-color: #f5576c;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
}

.results-content {
    width: 100%;
    text-align: center;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin: 12px 0;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-item.impostor {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    border: 2px solid #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.result-item.civilian {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    border: 2px solid #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.tap-area {
    width: 100%;
    min-height: 300px;
    background: rgba(78, 205, 196, 0.1);
    border: 3px dashed #4ecdc4;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.tap-area:hover {
    background: rgba(78, 205, 196, 0.2);
    transform: scale(1.02);
}

.tap-text {
    font-size: 1.5rem;
    color: #4ecdc4;
    font-weight: bold;
}

h3 {
    color: #c7d2fe;
    font-weight: 600;
    margin: 20px 0;
}

/* Mode Selection */
.mode-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 100%;
    margin: 30px 0;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mode-icon {
    font-size: 3rem;
}

.mode-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.mode-desc {
    font-size: 0.875rem;
    color: #a0a0b0;
    text-align: center;
}

/* Online Room Styles */
.online-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.divider {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    margin: 15px 0;
    font-size: 1.1rem;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 0 15px;
}

.share-link {
    background: rgba(88, 86, 214, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.share-link p {
    font-size: 0.9rem;
    color: #a0a0b0;
    margin-bottom: 12px;
}

.code-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(88, 86, 214, 0.4);
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #5856d6;
    letter-spacing: 6px;
    margin: 16px 0;
    user-select: all;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-box:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 86, 214, 0.6);
}

/* Botones principales */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
}

.btn::before {
    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.6s, height 0.6s;
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 0 30px rgba(118, 75, 162, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-small {
    background: #5856d6;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0;
}

.btn-small:hover {
    background: #6b69e0;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.game-end-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.game-end-buttons .btn {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    font-size: 0.9rem;
    padding: 12px 16px;
}

.players-list {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
    width: 100%;
    max-width: 500px;
}

.players-list h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.player-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
}

.player-item.host {
    border: 1px solid rgba(255, 193, 7, 0.5);
    background: rgba(255, 193, 7, 0.08);
}

.host-badge {
    background: #fbbf24;
    color: #1a1a2e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.word-display-online {
    font-size: 3.5rem;
    font-weight: 800;
    color: #667eea;
    margin: 30px 0;
    text-align: center;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    letter-spacing: 2px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
}

.ready-status {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #c7d2fe;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: rgba(15, 15, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.error {
    border-left: 3px solid #ff4785;
}

.toast.success {
    border-left: 3px solid #5856d6;
}

.toast.info {
    border-left: 3px solid #4facfe;
}

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

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #ffffff;
}

.toast-message {
    font-size: 0.875rem;
    color: #a0a0b0;
    line-height: 1.4;
}

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

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

.toast.removing {
    animation: slideOut 0.3s ease-out forwards;
}

/* Live Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(15, 15, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    animation: slideInChat 0.3s ease-out;
}

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

.chat-widget-header {
    padding: 16px;
    background: rgba(88, 86, 214, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.chat-widget-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-widget-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.live-chat-message {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    word-wrap: break-word;
    max-width: 80%;
    align-self: flex-start;
    animation: messageSlideIn 0.2s ease-out;
}

.live-chat-message.own {
    background: #5856d6;
    align-self: flex-end;
}

.live-chat-message .sender {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: #a0a0b0;
}

.live-chat-message.own .sender {
    color: rgba(255, 255, 255, 0.7);
}

.live-chat-message .text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.live-chat-message .time {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
}

.chat-widget-input {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
}

.chat-widget-input input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.chat-widget-input input:focus {
    outline: none;
    border-color: #5856d6;
    background: rgba(255, 255, 255, 0.08);
}

.chat-widget-input button {
    background: #5856d6;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-widget-input button:hover {
    background: #6b69e0;
}

.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #5856d6;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(88, 86, 214, 0.4);
    z-index: 9998;
    transition: all 0.2s ease;
}

.chat-toggle-btn:hover {
    background: #6b69e0;
    transform: scale(1.1);
}

.chat-toggle-btn.has-unread::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #ff4785;
    border-radius: 50%;
    border: 2px solid #0a0a0f;
}

/* Player Scoreboard */
.player-scoreboard {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-scoreboard h3 {
    margin: 0 0 15px 0;
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
}

.round-indicator {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.round-indicator span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.round-indicator strong {
    color: #ffd700;
    font-size: 1.1rem;
}

.round-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.score-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.score-row:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
}

.score-row.top-player {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.player-name {
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-rank {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    min-width: 30px;
}

.player-points {
    font-weight: bold;
    font-size: 1.1rem;
    color: #ffd700;
}

/* Victory Buttons */
.victory-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.btn-impostor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 2px solid #b91c1c;
}

.btn-impostor:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
}

.btn-crew {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 2px solid #1d4ed8;
}

.btn-crew:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
}

/* Rules Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 30px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content h2 {
    color: #fff;
    margin: 0 0 25px 0;
    font-size: 2rem;
    text-align: center;
}

.rules-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rules-section h3 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.rules-section h4 {
    color: #fff;
    margin: 15px 0 10px 0;
    font-size: 1.1rem;
}

.rules-section p {
    color: rgba(255, 255, 255, 0.85);
    margin: 8px 0;
    line-height: 1.6;
}

.rules-section ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.rules-section li {
    color: rgba(255, 255, 255, 0.85);
    margin: 8px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.rules-section li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #ff6b6b;
    font-weight: bold;
}

.phase {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
}

/* Auth Screen Styles */
.auth-title {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: white;
    border-bottom-color: #667eea;
}

.auth-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.auth-form .form-group {
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.auth-error {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #fca5a5;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    animation: shake 0.5s ease;
}

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

/* Profile Screen Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 30px;
}

.profile-avatar-large {
    font-size: 5rem;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.profile-subtitle {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.profile-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.profile-stats h3 {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.profile-customization {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
}

.profile-customization h3 {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.avatar-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.avatar-option {
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.avatar-option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

.color-selector {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.color-option.selected {
    border-width: 4px;
    border-color: white;
    box-shadow: 0 0 20px currentColor;
}

.upload-photo-section {
    margin-bottom: 20px;
    text-align: center;
}

.btn-upload {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

.upload-photo-section small {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.emoji-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.emoji-cat-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.emoji-cat-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.emoji-cat-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.avatar-selector {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.avatar-selector::-webkit-scrollbar {
    width: 8px;
}

.avatar-selector::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.avatar-selector::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .avatar-selector {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .color-selector {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Admin Panel Styles */
.admin-access-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
}

.admin-access-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.7);
}

.admin-dropdown {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 15px;
    padding: 20px;
    z-index: 9998;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

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

.admin-dropdown-content h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.admin-dropdown-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    font-style: italic;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.admin-stat-icon {
    font-size: 3rem;
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-search {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.admin-search input {
    flex: 2;
}

.admin-search select {
    flex: 1;
}

.admin-users-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.admin-users-container h3 {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

.admin-table thead {
    background: rgba(102, 126, 234, 0.2);
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table th {
    font-weight: 600;
    color: #667eea;
}

.admin-table tbody tr {
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.admin-table .user-avatar {
    font-size: 1.5rem;
}

.admin-table .delete-user-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 5px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-table .delete-user-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

.admin-table .admin-toggle-btn {
    background: rgba(128, 128, 128, 0.2);
    border: 1px solid #888;
    color: #bbb;
    padding: 5px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.admin-table .admin-toggle-btn.admin {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #6ee7b7;
}

.admin-table .admin-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.admin-danger-zone {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 15px;
    padding: 20px;
}

.admin-danger-zone h3 {
    color: #fca5a5;
    margin-bottom: 15px;
}

.admin-danger-zone .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.5);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.admin-info-box {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.admin-info-box h4 {
    color: #10b981;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.admin-info-box p {
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0;
    line-height: 1.6;
}

.admin-info-box code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    color: #10b981;
    font-family: 'Courier New', monospace;
}

.admin-users-data {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-users-data h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.admin-users-data .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.users-data-display {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.users-data-display pre {
    color: #10b981;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.users-data-display::-webkit-scrollbar {
    width: 8px;
}

.users-data-display::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.users-data-display::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-search {
        flex-direction: column;
    }
    
    .admin-table {
        font-size: 0.85rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
}

.footer p {
    margin: 0;
}

.footer strong {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .word-display {
        font-size: 2.2rem;
    }
    
    .tap-area {
        min-height: 200px;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    .word-display {
        font-size: 1.8rem;
    }
    
    .cards-container {
        grid-template-columns: 1fr 1fr;
    }

    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }

    .chat-widget {
        bottom: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 400px;
    }

    .chat-toggle-btn {
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Chat Styles */
.chat-container {
    margin: 20px 0;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-messages {
    height: 320px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    word-wrap: break-word;
    max-width: 75%;
    align-self: flex-start;
    animation: messageSlideIn 0.2s ease-out;
}

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

.chat-message.own {
    background: #5856d6;
    align-self: flex-end;
    text-align: left;
}

.chat-message .sender {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: #a0a0b0;
}

.chat-message.own .sender {
    color: rgba(255, 255, 255, 0.7);
}

.chat-message .text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-input-container {
    display: flex;
    gap: 8px;
}

.chat-input-container input {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* Vote Results */
.vote-results {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.vote-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.vote-item.winner {
    background: rgba(78, 205, 196, 0.3);
    border: 2px solid #4ecdc4;
}

.vote-item.impostor {
    background: rgba(255, 107, 107, 0.3);
    border: 2px solid #ff6b6b;
}

/* Turn System */
.turn-section {
    margin: 20px 0;
    padding: 24px;
    background: rgba(88, 86, 214, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(88, 86, 214, 0.3);
}

.current-turn-display {
    font-size: 1.1rem;
    text-align: center;
    margin: 16px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.current-turn-display strong {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    margin-top: 8px;
}

.discussion-section {
    margin: 20px 0;
    padding: 24px;
    background: rgba(255, 71, 133, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 71, 133, 0.3);
}
