* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
    overflow-x: hidden;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

.header {
    margin-bottom: 20px;
}

h1 {
    color: #e91e63;
    font-size: clamp(1.5em, 6vw, 2.5em);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score {
    font-size: clamp(1em, 4vw, 1.5em);
    font-weight: bold;
    color: #333;
}

#score {
    color: #e91e63;
}

#gameCanvas {
    border: 4px solid #e91e63;
    border-radius: 10px;
    background: #f0f0f0;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    #gameCanvas {
        width: 90vw;
        max-width: 400px;
        height: 90vw;
        max-height: 400px;
    }
}

.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 1000;
    max-width: 90vw;
}

.game-over h2 {
    color: #e91e63;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.game-over p {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #333;
}

#finalScore {
    color: #e91e63;
    font-weight: bold;
}

#restartBtn {
    background: #e91e63;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

#restartBtn:hover {
    background: #c2185b;
    transform: scale(1.05);
}

.hidden {
    display: none;
}

.welcome-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 1000;
    max-width: 90vw;
    width: 400px;
}

.welcome-screen h2 {
    color: #e91e63;
    font-size: clamp(1.8em, 8vw, 2.5em);
    margin-bottom: 15px;
}

.welcome-screen p {
    font-size: clamp(1em, 4vw, 1.3em);
    margin-bottom: 25px;
    color: #333;
}

#startBtn {
    background: #e91e63;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: clamp(1em, 4vw, 1.2em);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    width: 100%;
    max-width: 250px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#startBtn:active {
    background: #c2185b;
    transform: scale(0.98);
}

#startBtn:hover {
    background: #c2185b;
    transform: scale(1.05);
}

.instructions {
    margin-top: 10px;
    color: #666;
    font-size: clamp(0.8em, 3vw, 1.1em);
    padding: 0 10px;
}

.instructions p {
    font-weight: bold;
}

/* Mobil Kontroller */
.mobile-controls {
    display: none;
    margin-top: 20px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.mobile-controls.show {
    display: flex;
}

.controls-row {
    display: flex;
    gap: 10px;
    margin: 5px 0;
    justify-content: center;
}

.control-btn {
    width: 70px;
    height: 70px;
    background: #e91e63;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

.control-btn:active {
    transform: scale(0.95);
    background: #c2185b;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 10px;
        border-radius: 15px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3em;
    }
}
