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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #E0F6FF 50%, #87CEEB 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-attachment: fixed;
}

.game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

#gameCanvas {
    border: 4px solid #34495e;
    border-radius: 10px;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto;
}

.instructions {
    margin: 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.instructions p {
    margin: 5px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.score-display {
    margin-top: 15px;
    display: flex;
    justify-content: space-around;
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.score-display span {
    background: rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Screen Management */
.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

/* Start Screen Styles */
.start-content {
    text-align: center;
    padding: 40px 20px;
}

.start-content h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.player-input {
    margin: 30px 0;
}

.player-input label {
    display: block;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.player-input input {
    padding: 12px 20px;
    font-size: 1.1em;
    border: 3px solid #3498db;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    text-align: center;
    min-width: 200px;
    transition: all 0.3s ease;
}

.player-input input:focus {
    outline: none;
    border-color: #e74c3c;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

/* Button Styles */
.game-button {
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-button {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.game-button.secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
}

.game-button.danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

/* Current Player Display */
.current-player {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Scoreboard Styles */
.scoreboard-list {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.score-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    border-left: 5px solid #3498db;
    transition: all 0.3s ease;
}

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

.score-entry.top-score {
    border-left-color: #f1c40f;
    background: rgba(241, 196, 15, 0.2);
}

.score-entry.top-score::before {
    content: "👑 ";
}

.player-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.player-score {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.2em;
}

.scoreboard-actions {
    text-align: center;
    margin-top: 20px;
}

/* Game Over Screen */
.game-over-content {
    text-align: center;
    padding: 40px 20px;
}

.game-over-content h2 {
    color: #e74c3c;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.final-score {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.final-score p {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.game-over-actions {
    margin-top: 30px;
}

/* Empty Scoreboard Message */
.empty-scoreboard {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    font-size: 1.1em;
    padding: 40px 20px;
}

/* Player Selection Styles */
.player-selection {
    margin: 30px 0;
}

.player-selection h3 {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.player-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    min-height: 50px;
}

.player-button {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    border: 2px solid #3498db;
    border-radius: 20px;
    background: rgba(52, 152, 219, 0.1);
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.player-button:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.or-divider {
    margin: 20px 0;
    position: relative;
    text-align: center;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(44, 62, 80, 0.3);
}

.or-divider span {
    background: rgba(255, 255, 255, 0.9);
    padding: 0 20px;
    color: #7f8c8d;
    font-weight: bold;
    font-size: 1.1em;
}

.input-instructions {
    margin-top: 10px;
}

.input-instructions p {
    color: #27ae60;
    font-size: 0.95em;
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    border: 1px solid rgba(39, 174, 96, 0.3);
    margin: 0;
}

.start-buttons {
    margin-top: 25px;
}

.no-players-message {
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.95em;
    padding: 15px;
    background: rgba(127, 140, 141, 0.1);
    border-radius: 10px;
    margin: 10px 0;
}

/* Responsive design */
@media (max-width: 900px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 800px;
        height: auto;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .instructions {
        font-size: 1em;
    }
    
    .score-display {
        flex-direction: column;
        gap: 10px;
    }
}
