body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    text-align: center;
    max-width: 700px;
}

.game-area {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.status {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
    color: #2c3e50;
    min-height: 1.5em;
}

/* Scoreboard */
.scoreboard {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.score-card {
    background: var(--background-color, #f0f2f5);
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: var(--border-radius, 8px);
    padding: 10px 18px;
    min-width: 100px;
    transition: all 0.3s ease;
}

.score-card.active {
    border-color: var(--primary-color, #2980b9);
    background: #e8f4fd;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.2);
}

.score-card .player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color, #2c3e50);
    margin-bottom: 4px;
}

.score-card .player-score {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color, #2980b9);
}

/* Scramble Display */
.scramble-display {
    margin: 20px 0;
}

.round-counter {
    font-size: 0.95rem;
    color: var(--text-muted, #666);
    margin-bottom: 15px;
    font-weight: 500;
}

.scrambled-word {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0 25px;
    min-height: 70px;
    align-items: center;
}

.scramble-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 62px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    animation: letterPop 0.3s ease-out backwards;
    text-transform: uppercase;
    user-select: none;
}

.scramble-letter:nth-child(1) { animation-delay: 0.05s; }
.scramble-letter:nth-child(2) { animation-delay: 0.1s; }
.scramble-letter:nth-child(3) { animation-delay: 0.15s; }
.scramble-letter:nth-child(4) { animation-delay: 0.2s; }
.scramble-letter:nth-child(5) { animation-delay: 0.25s; }
.scramble-letter:nth-child(6) { animation-delay: 0.3s; }
.scramble-letter:nth-child(7) { animation-delay: 0.35s; }
.scramble-letter:nth-child(8) { animation-delay: 0.4s; }
.scramble-letter:nth-child(9) { animation-delay: 0.45s; }
.scramble-letter:nth-child(10) { animation-delay: 0.5s; }

@keyframes letterPop {
    from {
        transform: scale(0) rotateZ(-15deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotateZ(0);
        opacity: 1;
    }
}

/* Guess Area */
.guess-area {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.guess-input {
    padding: 12px 18px;
    font-size: 1.15rem;
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: var(--border-radius, 8px);
    width: 260px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: border-color 0.2s ease;
}

.guess-input:focus {
    outline: none;
    border-color: var(--primary-color, #2980b9);
}

.guess-input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

#submit-guess-btn {
    padding: 12px 24px;
    font-size: 1.05rem;
}

/* Guess Feedback */
.guess-feedback {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: var(--border-radius, 8px);
    font-weight: 600;
    font-size: 1rem;
    animation: fadeIn 0.3s ease;
}

.guess-feedback.correct {
    background: #d4edda;
    color: #155724;
}

.guess-feedback.wrong {
    background: #f8d7da;
    color: #721c24;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Online info */
.online-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.opponent-name {
    font-weight: 600;
    color: var(--text-muted, #666);
}

/* Game buttons */
.game-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 500px) {
    .scramble-letter {
        width: 42px;
        height: 50px;
        font-size: 1.4rem;
    }

    .guess-input {
        width: 180px;
        font-size: 1rem;
    }

    .scoreboard {
        gap: 8px;
    }

    .score-card {
        min-width: 80px;
        padding: 8px 12px;
    }

    .score-card .player-score {
        font-size: 1.3rem;
    }
}
