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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    background-image: linear-gradient(to bottom right, #e0f7fa, #b2ebf2, #80deea);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    padding: 20px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
}

h1 {
    color: #2e8b57;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h3 {
    margin: 15px 0;
    color: #444;
    position: relative;
    padding-bottom: 8px;
}

h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #2e8b57;
    border-radius: 2px;
}

.info-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 8px 15px;
}

.score-container {
    display: flex;
    gap: 20px;
    font-size: 18px;
}

.online-users {
    font-size: 16px;
    color: #4CAF50;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.online-users:before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #4CAF50;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

canvas {
    border: 2px solid #333;
    background-color: #ddd;
    border-radius: 5px;
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

button {
    padding: 8px 16px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #3e8e41;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-over {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10;
    min-width: 300px;
    animation: fadeIn 0.3s ease-out;
}

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

.game-over h2 {
    color: #ff3333;
    margin-bottom: 10px;
}

.game-over p {
    margin-bottom: 15px;
    font-size: 18px;
}

.player-name {
    margin: 15px 0;
}

input[type="text"] {
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

#submit-score {
    background-color: #2196F3;
    margin-bottom: 10px;
}

#submit-score:hover {
    background-color: #0b7dda;
}

#restart-btn {
    background-color: #ff3333;
}

#restart-btn:hover {
    background-color: #e60000;
}

.high-scores-container {
    margin-top: 20px;
    text-align: left;
    max-height: 250px;
    overflow-y: auto;
    padding: 0 10px;
    border-top: 1px solid #eee;
    scrollbar-width: thin;
    scrollbar-color: #4CAF50 #f0f0f0;
}

.high-scores-container::-webkit-scrollbar {
    width: 8px;
}

.high-scores-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.high-scores-container::-webkit-scrollbar-thumb {
    background-color: #4CAF50;
    border-radius: 4px;
}

#high-scores-list {
    list-style-type: none;
}

#high-scores-list li {
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

#high-scores-list li:hover {
    background-color: #f9f9f9;
}

#high-scores-list li:nth-child(1) {
    background-color: rgba(255, 215, 0, 0.1);
}

#high-scores-list li:nth-child(2) {
    background-color: rgba(192, 192, 192, 0.1);
}

#high-scores-list li:nth-child(3) {
    background-color: rgba(205, 127, 50, 0.1);
}

.score-rank {
    font-weight: bold;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f0f0;
}

#high-scores-list li:nth-child(1) .score-rank {
    background-color: gold;
    color: #333;
}

#high-scores-list li:nth-child(2) .score-rank {
    background-color: silver;
    color: #333;
}

#high-scores-list li:nth-child(3) .score-rank {
    background-color: #cd7f32;
    color: white;
}

.score-info {
    flex-grow: 1;
}

.score-name {
    font-weight: bold;
}

.score-value {
    color: #4CAF50;
    font-weight: bold;
}

.score-date {
    font-size: 12px;
    color: #777;
}

@media (max-width: 600px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    .info-bar {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .controls {
        flex-wrap: wrap;
    }
} 