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

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a0033, #33001a);
    color: #fff;
}

.game-container {
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
}

h1 {
    margin-bottom: 20px;
    color: #ff3366;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
    font-size: 2.5em;
}

.player-info {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

#playerName {
    padding: 10px;
    border: 2px solid #ff3366;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1em;
    width: 200px;
}

#playerName:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

#saveName {
    padding: 10px 20px;
    background: linear-gradient(45deg, #ff3366, #3366ff);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#saveName:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.5);
}

.score-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto 20px;
    font-size: 1.5em;
}

.score, .high-score {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid #ff3366;
    flex: 1;
    margin: 0 10px;
}

.high-score {
    color: #3366ff;
}

#gameCanvas {
    background-color: #000;
    border: 2px solid #ff3366;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.3);
    margin-bottom: 20px;
    width: 600px;
    height: 600px;
}

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

.leaderboard-popup.active {
    display: flex;
}

.leaderboard-content {
    background: linear-gradient(135deg, #1a0033, #33001a);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #ff3366;
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.3);
}

.leaderboard-content h2 {
    color: #3366ff;
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

.close-leaderboard {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ff3366;
    font-size: 2em;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s;
}

.close-leaderboard:hover {
    transform: scale(1.2);
}

#leaderboardList {
    text-align: left;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 51, 102, 0.3);
    font-size: 1.2em;
    transition: all 0.3s;
}

.leaderboard-entry:hover {
    background: rgba(255, 51, 102, 0.1);
    transform: scale(1.02);
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.controls {
    margin-top: 20px;
}

#startBtn, #showLeaderboard {
    padding: 10px 20px;
    font-size: 1.2em;
    background: linear-gradient(45deg, #ff3366, #3366ff);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 10px 20px;
    width: 200px;
}

#startBtn:hover, #showLeaderboard:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.5);
}

.mobile-controls {
    display: none;
}

@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }

    .mobile-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .horizontal-controls {
        display: flex;
        gap: 20px;
    }

    .mobile-controls button {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
        background: linear-gradient(45deg, #ff3366, #3366ff);
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s;
    }

    .mobile-controls button:hover {
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(255, 51, 102, 0.5);
    }
} 