/* Reset und Grundeinstellungen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
 
}

/* Wrapper für das gesamte Spiel */
.game-wrapper {
    display: flex;
    flex-direction: row; /* Änderung zu row für horizontale Ausrichtung */
    justify-content: space-between; /* Verteilt die Elemente gleichmäßig */
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1600px; /* Doppelte Breite für beide Container */
    margin: 0 auto;
}

/* Spiel-Container */
#game-container {
    width: 50%; /* Hälfte der Breite */
    height: 600px;
    margin: 0;
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px #00ff00;
    background-color: #000033;
    position: relative;
    overflow: hidden;
}

/* Phaser Canvas */
canvas {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
}

/* Retro-Scanline-Effekt */
#game-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 255, 0, 0.05) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

/* Loading-Screen */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ff00;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

/* Pulsierender Text-Effekt */
@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Mobile-Optimierung */
@media (max-width: 800px) {
    #game-container {
        width: 100%;
        height: 100vh;
        border: none;
    }
    
    body {
        overflow: hidden;
    }
}

/* Retro-Glow-Effekt für Text */
.glow-text {
    text-shadow: 
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        0 0 15px #00ff00;
}

/* Game Over Screen */
.game-over {
    color: #ff0000;
    text-shadow: 
        0 0 5px #ff0000,
        0 0 10px #ff0000,
        0 0 15px #ff0000;
}

/* Level Complete Screen */
.level-complete {
    color: #00ff00;
    text-shadow: 
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        0 0 15px #00ff00;
} 

/* Highscore Container */
#highscore-container {
    width: 50%; /* Hälfte der Breite */
    height: 600px; /* Gleiche Höhe wie Spiel-Container */
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border: 2px solid #00ff00; /* Gleicher Border wie Spiel-Container */
    box-shadow: 0 0 20px #00ff00; /* Gleicher Schatten wie Spiel-Container */
    overflow-y: auto; /* Scrollbar wenn nötig */
}

/* Highscore Einträge */
.highscore-entry {
    margin: 5px 0;
    padding: 5px 10px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    display: grid;
    grid-template-columns: 60px 1fr 100px;
    gap: 15px;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.highscore-entry:last-child {
    border-bottom: none;
}

.highscore-entry .rank {
    color: #00aa00;
    text-align: right;
}

.highscore-entry .name {
    color: #00ff00;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.highscore-entry .score {
    color: #00ff00;
    text-align: right;
}

.current-player {
    background: rgba(0, 255, 0, 0.1);
    font-weight: bold;
    border: 1px solid rgba(255, 171, 0, 0.3);
    border-radius: 3px;
}

/* Responsive Anpassungen */
@media (max-width: 1200px) {
    .game-wrapper {
        padding: 10px;
        gap: 10px;
    }
    
    .highscore-container {
        min-width: 250px;
    }
    
    .highscore-entry {
        font-size: 14px;
        grid-template-columns: 30px minmax(100px, 1fr) 70px;
        gap: 10px;
    }
}

@media (max-width: 800px) {
    .game-wrapper {
        flex-direction: column;
    }
    
    #game-container,
    .highscore-container {
        width: 100%;
        max-width: 100%;
    }
    
    .highscore-container {
        height: 300px; /* Kleinere Höhe auf mobilen Geräten */
    }
}