/* Basic Reset für ein sauberes Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Verhindert die blauen Highlights beim Antippen auf iOS */
    -webkit-tap-highlight-color: transparent; 
}

/* Body und HTML auf 100% setzen und Scrollen (Rubber-Banding) verhindern */
html, body {
    width: 100%;
    /* 100dvh (Dynamic Viewport Height) ist die modernste Methode, 
       um genau 100% der sichtbaren Höhe auf mobilen Geräten zu erzwingen */
    height: 100dvh; 
    overflow: hidden; 
    background-color: #121212; /* Dunkler Hintergrund */
    color: #ffffff;
    
    /* Native System-Schriftart von Apple nutzen */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Verhindert, dass der Nutzer aus Versehen Text markiert (App-Feeling) */
    -webkit-user-select: none;
    user-select: none;
}

/* Der Hauptcontainer */
.fullscreen-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-align: center;
    
    /* WICHTIG: Safe Area Insets (für iPhones mit Notch/Dynamic Island) 
       Damit Content nicht hinter der Kamera oder dem Home-Balken unten verschwindet */
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding: 0 20px;
    color: #aaaaaa;
}

.php-output {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Styling für den Button */
#fullscreenBtn {
    margin-top: 30px;
    padding: 12px 24px;
    background-color: #ffffff;
    color: #121212;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* WICHTIG: Versteckt den Button komplett, wenn die Seite als 
   PWA (Standalone oder Fullscreen) vom Homescreen gestartet wurde 
*/
@media (display-mode: standalone), (display-mode: fullscreen) {
    #fullscreenBtn {
        display: none !important;
    }
}

/* --- iOS Homescreen Hinweis Styling --- */
/* --- 1. Standardmäßig verstecken (für Android, PC, etc.) --- */
.ios-prompt {
    display: none; 
    position: fixed;
    /* Fester Wert statt "env", da neuere Safari-Versionen hier oft Darstellungsprobleme haben */
    bottom: 40px; 
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    color: #121212;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    width: 90%;
    max-width: 320px;
}

.arrow-down {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(255, 255, 255, 0.95);
}

/* --- 2. DER IOS-HACK: Zeigt die Box NUR auf iPhones und iPads an --- */
@supports (-webkit-touch-callout: none) {
    .ios-prompt {
        display: block;
    }
}

/* --- 3. PWA-CHECK: Versteckt die Box wieder, sobald sie als echte App vom Home-Bildschirm läuft --- */
@media (display-mode: standalone), (display-mode: fullscreen) {
    .ios-prompt {
        display: none !important;
    }
}