body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-wrapper {
    width: 100%;
    max-width: 600px;
}

.back-button {
    display: inline-block;
    padding: 10px 15px;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.game-container {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 2.5em;
}

.subtitle {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 1.1em;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    color: white;
}

.score-display, .high-score-display {
    font-size: 1.2em;
    font-weight: bold;
}

.label {
    margin-right: 8px;
}

#game-screen {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

#gameCanvas {
    border: 3px solid #333;
    border-radius: 8px;
    background-color: #1a1a1a;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    color: white;
    padding: 20px;
}

.overlay-screen h2 {
    font-size: 2em;
    margin: 0 0 15px 0;
    color: #4ade80;
}

.overlay-screen p {
    margin: 8px 0;
    font-size: 1.1em;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

.game-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.6);
}

.game-btn:active {
    transform: translateY(0);
}

#new-record {
    color: #fbbf24;
    font-size: 1.3em;
    font-weight: bold;
    animation: pulse 1s infinite;
}

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

.controls-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f3f4f6;
    border-radius: 8px;
}

.controls-info p {
    margin: 8px 0;
    color: #666;
}

.key-hints {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.key {
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 1.2em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-hint {
    font-size: 0.9em;
    color: #999;
}

/* Responsiv design */
@media (max-width: 500px) {
    .game-container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }

    .game-info {
        font-size: 0.9em;
    }

    .overlay-screen h2 {
        font-size: 1.5em;
    }

    .overlay-screen p {
        font-size: 0.95em;
    }

    .game-btn {
        padding: 12px 30px;
        font-size: 1em;
    }
}
