/* --- 1. GLOBAL & FONTS --- */
/* Importiere die Pixel-Schriftart für das Retro-Gefühl */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    /* Dunkler Hintergrund für den Retro-Look */
    background-color: #2c2c2c;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    /* Pixel-Schriftart als Standard */
    font-family: 'Press Start 2P', monospace;
    color: #333;
    /* Standardtextfarbe */
}

/* --- 2. SUPER MARIO WORLD MENÜ STYLING (.menu-container / index.html) --- */

.menu-container {
    width: 960px;
    /* ANPASSUNG: 640px -> 960px (für 4:3 Verhältnis bei 720px Höhe) */
    height: 720px;
    /* ANPASSUNG: 480px -> 720px (explizite Anforderung) */
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.game-headline {
    color: aqua
}


.game-frame {
    width: 100%;
    height: 100%;
    background-color: #dbc997;
    /* Beige/Sand */
    /* Platzhalter für den Holzrahmen (Border Image) */
    border: 32px solid transparent;
    border-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAQMAAADa9gWkAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABxNfGZAAAAK3RFWHRDcmVhdGlvbiBUaW1lADExLzExLzIwMjMgMTI6NTY6MzAgUE0rMDE6MDA8n36jUAAAACxJREFUKJGFjUEKAEAAA7H/P3o2dIqD7C0t+Yl089uP8cQ30/uN/YcT/19+BwD7qQc2Xq4TqgAAAABJRU5ErkJggg==') 32 repeat;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Hintergrund-Dreiecke (CSS-Shapes für den "Hügel") */
.game-frame::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-left: 480px solid transparent;
    /* ANPASSUNG: 320px -> 480px (960px/2) */
    border-right: 480px solid transparent;
    /* ANPASSUNG: 320px -> 480px (960px/2) */
    border-bottom: 375px solid #009999;
    /* ANPASSUNG: 250px -> 375px (Verhältnis 480:640 = 250:x) */
    /* Türkis/Blau */
    z-index: 1;
}

.game-frame::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 225px solid transparent;
    /* ANPASSUNG: 150px -> 225px (Verhältnis 150:640 = x:960) */
    border-right: 225px solid transparent;
    /* ANPASSUNG: 150px -> 225px */
    border-bottom: 180px solid #00ce00;
    /* ANPASSUNG: 120px -> 180px (Verhältnis 120:480 = x:720) */
    /* Leuchtendes Grün */
    z-index: 2;
}

/* Titel-Styling */
.game-title {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 10;
    line-height: 1.5;
}

/* Menü-Liste */
.game-menu {
    position: absolute;
    top: 55%;
    /* ANPASSUNG: 50% -> 55% (Zentrierung in der größeren Höhe) */
    left: 50%;
    transform: translate(-50%, 0);
    /* ANPASSUNG: -10% -> 0 (Anpassung zur neuen Top-Position) */
    z-index: 3;
    text-align: center;
}

.game-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


/* Spiel-Buttons (Start/Neustart) */
.game-button {
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    /* Grün/Türkis im Retro-Stil */
    background-color: #009999;
    color: #ffffff;
    border: 2px solid #000000;
    box-shadow: 4px 4px 0 #000000;
    /* 3D-Pixel-Effekt */
    transition: transform 0.1s, box-shadow 0.1s;
}

.game-button:active {
    /* Effekt beim Klicken (wird 'eingedrückt') */
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000000;
}



.title-super {
    font-size: 24px;
    color: #ff3939;
    /* Rot */
    text-shadow: 2px 2px 0 #000000;
    display: block;
}

.title-main {
    font-size: 48px;
    color: #00ce00;
    /* Grün */
    text-shadow: 4px 4px 0 #000000, 6px 6px 0 #ffce29;
    /* Gelber 3D-Schatten */
    display: block;
}

.title-reborn {
    font-size: 16px;
    color: #ffce29;
    /* Gelb */
    text-shadow: 2px 2px 0 #000000;
    margin-top: -10px;
    display: block;
}



.menu-item {
    margin: 15px 0;
}

.menu-item a {
    text-decoration: none;
    color: #000000;
    font-size: 18px;
    text-shadow: 1px 1px 0 #ffffff;
    padding: 2px 5px;
    display: inline-block;
    transition: color 0.1s, background-color 0.1s;
}

/* Menüpunkt Hover/Aktiv */
.menu-item:hover a,
.menu-item.active a {
    color: #ff3939;
    /* Rot */
    background-color: rgba(255, 255, 255, 0.5);
    text-shadow: 1px 1px 0 #000000, -1px -1px 0 #ffffff;
}

/* Untere Grüne Linie */
.green-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #00ce00;
    z-index: 10;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.5);
}

/* --- 3. SPIEL-ELEMENTE STYLING (game.html) --- */

/* Spiel-Canvas */
#gameCanvas {
    border: 4px solid #000000;
    /* Dickere, schwarze Retro-Grenze */
    background-color: #fff;
    /* Der Hintergrund sollte durch das bgImg im Canvas-Kontext gemalt werden */
}

/* Start-Screen im Retro-Stil */
#startScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    /* Pixel-Art-Box mit Schatten */
    border: 4px solid #000000;
    background: #ffce29;
    /* Gelber Hintergrund */
    box-shadow: 8px 8px 0 #000000;
    position: absolute;
    /* Über dem Canvas zentrieren */
    z-index: 100;
}

#startScreen h2 {
    font-size: 1.5em;
    text-align: center;
    color: #ff3939;
    /* Rot */
    text-shadow: 2px 2px 0 #000000;
}

/* Die normale Anzeige (z.B. block oder flex) definierst du im Haupt-CSS */
#startScreen #introText {
    display: flex;
    /* Oder block, je nachdem wie es positioniert ist */
    /* ... weitere Styling-Anweisungen ... */
}


/* Input-Feld für den Namen */
#nameInput {
    margin: 20px 0;
    padding: 8px;
    font-size: 1em;
    text-align: center;
    border: 2px solid #000000;
    background-color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    box-sizing: border-box;
    max-width: 90%;
}


/* Score-Anzeige */
#scoreDisplay {
    display: flex;

    width: 960px;
    /* ANPASSUNG: 800px -> 960px (Anpassung an neue Container-Breite) */
    /* display: flex; */
    justify-content: space-between;
    padding: 10px 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #ffffff;
    /* Weiß für die Score-Anzeige */
    text-shadow: 2px 2px 0 #000000;
    margin-bottom: 5px;
    box-sizing: border-box;
}

/* Game Over Meldung */
#gameOver {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2em;
    color: #ff3939;
    /* Rot */
    text-shadow: 3px 3px 0 #000000;
    margin-top: 20px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    background-color: rgba(0, 0, 0, 0.6);
    /* Transparenter Hintergrund */
    padding: 30px;
}

.page-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 80%;
    /* Inhalt zentrieren und begrenzen */
    text-align: center;
    padding-top: 50px;
    /* Platz unter dem Titel schaffen */
}

.content-title {
    color: #ff3939;
    /* Rot */
    font-size: 1.2em;
    text-shadow: 2px 2px 0 #000000;
    margin-bottom: 25px;
}

/* --- Team Liste Styling --- */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.team-img {
    height: 50px;
    width: 50px
}

.team-member {
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #000000;
    box-shadow: 3px 3px 0 #009999;
    /* Türkiser Schatten */
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
}

.member-name {
    font-weight: bold;
    color: #000000;
}

.member-role {
    color: #009999;
}

/* --- Highscore Tabelle Styling --- */
.highscore-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
    /* Weißer Hintergrund für die Tabelle */
    border: 4px solid #000000;
    box-shadow: 6px 6px 0 #ffce29;
    /* Gelber Schatten */
}

.highscore-table th,
.highscore-table td {
    border: 1px solid #000000;
    padding: 8px;
    font-size: 0.8em;
    color: #000000;
}

.highscore-table th {
    background-color: #00ce00;
    /* Grüner Kopf */
    color: #000000;
    text-shadow: 1px 1px 0 #ffffff;
}

.highscore-table tr:nth-child(odd) {
    background-color: #f0f0f0;
    /* Leichte Streifen */
}

/* Zurück-Link */
.back-link {
    margin-top: 30px;
}

.back-link a {
    color: #000000;
    text-shadow: 2px 2px 0 #ffce29;
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px;
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid #000000;
}

.back-link a:hover {
    color: #ff3939;
    text-shadow: 2px 2px 0 #000000;
    background-color: #ffffff;
}