Private
Public Access
1
0

fix cleanup
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 1m21s

This commit is contained in:
Sebastian Unterschütz
2025-11-26 20:24:36 +01:00
parent 6fd9f43c83
commit df9c3e4b76

View File

@@ -35,7 +35,6 @@ body, html {
box-shadow: 0 0 50px rgba(0,0,0,0.8); box-shadow: 0 0 50px rgba(0,0,0,0.8);
border: 4px solid #444; border: 4px solid #444;
background: #000; background: #000;
/* Größe wird von JS gesetzt, hier nur Layout-Verhalten */
display: flex; display: flex;
overflow: hidden; overflow: hidden;
} }
@@ -65,7 +64,7 @@ canvas {
} }
/* ========================================= /* =========================================
3. OVERLAYS (Basis-Einstellungen) 3. OVERLAYS (Start, Game Over)
========================================= */ ========================================= */
#startScreen, #gameOverScreen { #startScreen, #gameOverScreen {
position: absolute; position: absolute;
@@ -90,7 +89,6 @@ h1 {
text-transform: uppercase; text-transform: uppercase;
} }
/* Fix für Input Section (Name eingeben) */
#inputSection { #inputSection {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -101,10 +99,10 @@ h1 {
} }
/* ========================================= /* =========================================
4. START SCREEN (Links/Rechts Layout) 4. START SCREEN LAYOUT
========================================= */ ========================================= */
#startScreen { #startScreen {
flex-direction: row; /* Nebeneinander */ flex-direction: row;
gap: 40px; gap: 40px;
} }
@@ -127,15 +125,13 @@ h1 {
} }
/* ========================================= /* =========================================
5. GAME OVER SCREEN (WICHTIG: Untereinander) 5. GAME OVER SCREEN
========================================= */ ========================================= */
#gameOverScreen { #gameOverScreen {
/* HIER IST DER FIX: */
flex-direction: column !important; flex-direction: column !important;
gap: 15px; gap: 15px;
} }
/* Das Leaderboard im Game Over Screen */
#leaderboard { #leaderboard {
margin-top: 10px; margin-top: 10px;
font-size: 12px; font-size: 12px;
@@ -144,13 +140,12 @@ h1 {
background: rgba(0,0,0,0.5); background: rgba(0,0,0,0.5);
padding: 15px; padding: 15px;
border: 2px solid #666; border: 2px solid #666;
/* Begrenzte Höhe mit Scrollen, falls Liste lang ist */
max-height: 200px; max-height: 200px;
overflow-y: auto; overflow-y: auto;
} }
/* ========================================= /* =========================================
6. HALL OF FAME BOX (Startseite) 6. HALL OF FAME BOX
========================================= */ ========================================= */
.hall-of-fame-box { .hall-of-fame-box {
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
@@ -263,7 +258,6 @@ input {
} }
.legal-btn:hover { background: #333; color: white; border-color: white; } .legal-btn:hover { background: #333; color: white; border-color: white; }
/* Modals */
.modal-overlay { .modal-overlay {
display: none; display: none;
position: fixed; position: fixed;
@@ -307,32 +301,44 @@ input {
h1 { font-size: 48px; margin-bottom: 40px; } h1 { font-size: 48px; margin-bottom: 40px; }
button { font-size: 22px; padding: 20px 40px; } button { font-size: 22px; padding: 20px 40px; }
input { width: 350px; font-size: 20px; padding: 15px; } input { width: 350px; font-size: 20px; padding: 15px; }
.info-box { max-width: 500px; } .info-box { max-width: 500px; }
.info-box p { font-size: 16px; } .info-box p { font-size: 16px; }
.info-title { font-size: 14px; } .info-title { font-size: 14px; }
.hall-of-fame-box { max-height: 400px; } .hall-of-fame-box { max-height: 400px; }
.hof-entry { font-size: 14px; padding: 8px 0; } .hof-entry { font-size: 14px; padding: 8px 0; }
.hall-of-fame-box h3 { font-size: 18px; margin-bottom: 15px; } .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 { #startScreen {
flex-direction: column; flex-direction: row;
gap: 15px; align-items: center;
justify-content: flex-start; justify-content: center;
gap: 20px;
padding: 10px;
overflow-y: auto; overflow-y: auto;
} }
.start-left, .start-right { max-width: 100%; width: 100%; } .start-left {
.start-right { height: auto; min-height: 200px; margin-top: 20px; } width: 45%; max-width: none;
.hall-of-fame-box { max-height: 200px; } align-items: center; text-align: center; margin: 0;
h1 { font-size: 24px; margin: 15px 0; } }
button { padding: 12px 20px; font-size: 14px; } .start-right {
input { width: 200px; } 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; } .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) { @media screen and (orientation: portrait) {
body.game-active #rotate-overlay { display: flex; } #rotate-overlay { display: flex; }
body.game-active #game-container { display: none !important; } #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; }
} }