* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100vw;
    max-width: 1000px;
    min-width: 320px;
    min-height: 600px;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.screen {
    padding: 30px;
    text-align: center;
}

.hidden {
    display: none;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.game-info {
    margin-bottom: 30px;
}

.game-info p {
    color: #666;
    margin: 10px 0;
    font-size: 1.1em;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

input[type="text"] {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.score-info, .length-info {
    font-size: 1.2em;
    color: #2c3e50;
    font-weight: bold;
}

#game-canvas {
    background: #f8f9fa;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    height: 60vh;
    min-height: 300px;
    max-height: 600px;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}

.score-info {
    margin: 20px 0;
    font-size: 1.2em;
    color: #666;
}

.leaderboard {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
}

.leaderboard h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#leaderboard-list {
    text-align: left;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .game-container {
        border-radius: 10px;
        width: 100vw;
        min-width: 0;
        min-height: 100vh;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        padding: 0;
    }
    .screen {
        padding: 10px;
    }
    h1 {
        font-size: 2em;
    }
    .game-header {
        flex-direction: column;
        gap: 10px;
    }
    .score-info, .length-info {
        font-size: 1em;
    }
    #game-canvas {
        height: 40vh;
        min-height: 200px;
        max-height: 400px;
    }
} 