diff --git a/static/style.css b/static/style.css index 7bc6e3e..3dd2515 100644 --- a/static/style.css +++ b/static/style.css @@ -35,7 +35,6 @@ body, html { box-shadow: 0 0 50px rgba(0,0,0,0.8); border: 4px solid #444; background: #000; - /* Größe wird von JS gesetzt, hier nur Layout-Verhalten */ display: flex; overflow: hidden; } @@ -65,7 +64,7 @@ canvas { } /* ========================================= - 3. OVERLAYS (Basis-Einstellungen) + 3. OVERLAYS (Start, Game Over) ========================================= */ #startScreen, #gameOverScreen { position: absolute; @@ -90,7 +89,6 @@ h1 { text-transform: uppercase; } -/* Fix für Input Section (Name eingeben) */ #inputSection { display: flex; flex-direction: column; @@ -101,10 +99,10 @@ h1 { } /* ========================================= - 4. START SCREEN (Links/Rechts Layout) + 4. START SCREEN LAYOUT ========================================= */ #startScreen { - flex-direction: row; /* Nebeneinander */ + flex-direction: row; gap: 40px; } @@ -127,15 +125,13 @@ h1 { } /* ========================================= - 5. GAME OVER SCREEN (WICHTIG: Untereinander) + 5. GAME OVER SCREEN ========================================= */ #gameOverScreen { - /* HIER IST DER FIX: */ flex-direction: column !important; gap: 15px; } -/* Das Leaderboard im Game Over Screen */ #leaderboard { margin-top: 10px; font-size: 12px; @@ -144,13 +140,12 @@ h1 { background: rgba(0,0,0,0.5); padding: 15px; border: 2px solid #666; - /* Begrenzte Höhe mit Scrollen, falls Liste lang ist */ max-height: 200px; overflow-y: auto; } /* ========================================= - 6. HALL OF FAME BOX (Startseite) + 6. HALL OF FAME BOX ========================================= */ .hall-of-fame-box { background: rgba(0, 0, 0, 0.6); @@ -263,7 +258,6 @@ input { } .legal-btn:hover { background: #333; color: white; border-color: white; } -/* Modals */ .modal-overlay { display: none; position: fixed; @@ -307,32 +301,44 @@ input { h1 { font-size: 48px; margin-bottom: 40px; } button { font-size: 22px; padding: 20px 40px; } input { width: 350px; font-size: 20px; padding: 15px; } - .info-box { max-width: 500px; } .info-box p { font-size: 16px; } .info-title { font-size: 14px; } - .hall-of-fame-box { max-height: 400px; } .hof-entry { font-size: 14px; padding: 8px 0; } .hall-of-fame-box h3 { font-size: 18px; margin-bottom: 15px; } } /* ========================================= - 11. MOBILE ANPASSUNG + 11. MOBILE LANDSCAPE FIX (Kritisch!) ========================================= */ -@media (max-width: 700px) { +@media (max-height: 500px) { #startScreen { - flex-direction: column; - gap: 15px; - justify-content: flex-start; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 20px; + padding: 10px; overflow-y: auto; } - .start-left, .start-right { max-width: 100%; width: 100%; } - .start-right { height: auto; min-height: 200px; margin-top: 20px; } - .hall-of-fame-box { max-height: 200px; } - h1 { font-size: 24px; margin: 15px 0; } - button { padding: 12px 20px; font-size: 14px; } - input { width: 200px; } + .start-left { + width: 45%; max-width: none; + align-items: center; text-align: center; margin: 0; + } + .start-right { + width: 45%; max-width: none; height: auto; margin: 0; + } + h1 { font-size: 18px; margin: 0 0 10px 0; line-height: 1.2; } + .info-box { display: none; } + .legal-bar { margin-top: 5px; } + button { padding: 8px 12px; font-size: 10px; margin: 5px; } + .hall-of-fame-box { max-height: 180px; } + .hall-of-fame-box h3 { font-size: 10px; margin-bottom: 5px; } + .hof-entry { padding: 2px 0; font-size: 8px; } + #gameOverScreen { justify-content: center; align-items: center; padding-top: 0; } + #inputSection { margin: 5px 0; } + input { padding: 5px; font-size: 12px; width: 150px; margin-bottom: 5px; } + #leaderboard { max-height: 100px; padding: 5px; margin-top: 5px; } } /* ========================================= @@ -352,94 +358,8 @@ input { } .icon { font-size: 60px; margin-bottom: 20px; } -/* Nur anzeigen, wenn Spiel läuft UND Portrait */ +/* HIER IST DIE ÄNDERUNG: Gilt jetzt IMMER bei Hochformat */ @media screen and (orientation: portrait) { - body.game-active #rotate-overlay { display: flex; } - body.game-active #game-container { display: none !important; } -} - -/* ========================================= - MOBILE LANDSCAPE FIX (Kritisch für Menüs!) - ========================================= */ - -/* Diese Regel greift, wenn das Gerät flach ist (Handy quer) */ -@media (max-height: 500px) { - - /* 1. Haupt-Container: Alles zentrieren! */ - #startScreen { - position: absolute; - top: 0; left: 0; - width: 100%; height: 100%; - background: - linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), - url('assets/school-background.jpg'); - - background-size: cover; - background-position: center; - display: flex; - justify-content: center; - align-items: center; - z-index: 10; - box-sizing: border-box; - padding: 20px; - } - - /* 2. Linke Seite (Menü) zentrieren */ - .start-left { - width: 45%; /* Nimmt fast die Hälfte */ - max-width: none; - align-items: center; /* Inhalte zentrieren */ - text-align: center; /* Text zentrieren */ - margin: 0; /* Ränder weg */ - } - - /* 3. Rechte Seite (Leaderboard) zentrieren */ - .start-right { - width: 45%; - max-width: none; - height: auto; - margin: 0; - } - - /* 4. Titel kleiner */ - h1 { - font-size: 18px; - margin: 0 0 10px 0; - line-height: 1.2; - } - - /* 5. Unwichtiges AUSBLENDEN */ - .info-box { display: none; } - .legal-bar { margin-top: 5px; } - - /* 6. Buttons & Input optimieren */ - button { - padding: 8px 12px; - font-size: 10px; - margin: 5px; - } - - /* 7. Leaderboard Box */ - .hall-of-fame-box { - max-height: 180px; /* Damit es nicht den Screen sprengt */ - } - .hall-of-fame-box h3 { font-size: 10px; margin-bottom: 5px; } - .hof-entry { padding: 2px 0; font-size: 8px; } - - /* 8. Game Over Screen auch zentrieren */ - #gameOverScreen { - position: absolute; - top: 0; left: 0; - width: 100%; height: 100%; - background: rgba(0, 0, 0, 0.9); - display: flex; - justify-content: center; - align-items: center; - z-index: 10; - box-sizing: border-box; - padding: 20px; - } - #inputSection { margin: 5px 0; } - input { padding: 5px; font-size: 12px; width: 150px; margin-bottom: 5px; } - #leaderboard { max-height: 100px; padding: 5px; margin-top: 5px; } + #rotate-overlay { display: flex; } + #game-container { display: none !important; } } \ No newline at end of file