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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 900px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 15px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    border: 3px solid #34495e;
    border-radius: 15px;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: crosshair;
}

.instructions {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.instructions p {
    margin: 8px 0;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
}

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

button {
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 120px;
}

#resetBtn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

#pauseBtn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

#fullscreenBtn {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Mobile-spezifische Styles */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
        max-width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .header {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .header h1 {
        font-size: 24px;
        margin: 0 0 10px 0;
    }
    
    .score-board {
        font-size: 14px;
        gap: 20px;
    }
    
    #gameCanvas {
        width: 100%;
        height: 60vh;
        max-height: 500px;
        border-radius: 10px;
        touch-action: none; /* Verhindert Browser-Touch-Aktionen */
    }
    
    .instructions {
        padding: 15px;
        margin-top: 10px;
    }
    
    .instructions p {
        font-size: 12px;
        margin: 5px 0;
    }
    
    button {
        padding: 12px 20px;
        font-size: 14px;
        margin: 5px;
        border-radius: 8px;
        min-height: 44px; /* Touch-friendly */
    }
    
    /* Mobile Touch-Optimierungen */
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Verhindert Zoom bei Doppel-Tap */
    canvas {
        touch-action: manipulation;
    }
}

/* Landscape-Modus für Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .game-container {
        height: 100vh;
        flex-direction: row;
    }
    
    .header {
        width: 30%;
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    #gameCanvas {
        width: 70%;
        height: 100%;
    }
    
    .instructions {
        display: none; /* Verstecke Anweisungen im Landscape-Modus */
    }
}

/* Große Mobile-Geräte */
@media (min-width: 769px) and (max-width: 1024px) {
    .game-container {
        max-width: 90vw;
    }
    
    #gameCanvas {
        width: 100%;
        height: 70vh;
    }
}
