/* static/css/style.css - FINAL VERSION */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

/* --- GRUNDLAYOUT & SCROLLING LOGIK --- */
html {
    overflow-y: auto;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #0f172a; /* Fallback Farbe */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.1), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.1), transparent 25%);
    
    color: #e2e8f0;
    background-attachment: fixed; /* Hintergrund bleibt beim Scrollen stehen */

    /* STANDARD (Handy/Tablet): Scrollen ist erlaubt! */
    min-height: 100vh;
    overflow-y: auto; 
    
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 60px; /* Platz für den Footer auf dem Handy */
}

/* DESKTOP OVERRIDE (Ab 1024px Breite): App-Modus ohne Scrollen */
@media (min-width: 1024px) {
    body {
        /* height: 100vh; */
        /* overflow: hidden; */ /* Fenster scrollt nicht, nur innere Container */
        padding-bottom: 0;
    }
}

/* --- LOGIN / REGISTER / AUTH --- */
.auth-wrapper {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin: auto; /* Automatische Zentrierung */
}

/* --- AGB / IMPRESSUM / DATENSCHUTZ (Breites Layout) --- */
.auth-wrapper.wide {
    max-width: 800px;
    padding-top: 80px;    /* Platz für Home-Button */
    padding-bottom: 60px; /* Platz für Footer */
    width: 100%;
}

.auth-wrapper.wide .auth-card {
    text-align: left;
    line-height: 1.6;
}

.auth-wrapper.wide h1, 
.auth-wrapper.wide h2 { 
    color: #38bdf8; 
}

.auth-wrapper.wide h1 { 
    border-bottom: 1px solid #334155; 
    padding-bottom: 10px; 
    margin-top: 0; 
}

/* --- KOMPONENTEN --- */

/* Logo Box (weißer Sticker Look) */
.logo-img {
    max-width: 180px;
    margin-bottom: 30px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* Die Karte (Glassmorphismus Dunkel) */
.auth-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: left;
}

/* Formularfelder */
.form-group { margin-bottom: 20px; }

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-control::placeholder { color: #64748b; }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.5);
}

/* Links (Login/Register Seiten) */
.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #94a3b8;
}
.auth-links a { color: #38bdf8; text-decoration: none; transition: color 0.2s; }
.auth-links a:hover { color: #7dd3fc; text-decoration: underline; }

/* Home Button (Oben links schwebend) */
.home-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(30, 41, 59, 0.8);
    color: #38bdf8;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.home-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
    color: white;
}

/* Einfacher Footer (Fallback für Login-Seiten) */
footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    width: 100%;
}
footer a { color: #94a3b8; text-decoration: none; margin: 0 10px; }
footer a:hover { color: white; }


/* =========================================
   APP FOOTER (Die Leiste unten in der App)
   ========================================= */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    
    /* STANDARD: Light Mode (Weiß/Grau) */
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* WICHTIG: Kein Umbruch */
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 9999;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    
    /* Weiche Übergänge beim Umschalten */
    transition: background 0.3s, border 0.3s, color 0.3s;
}

/* OVERRIDE: Dark Mode (Wenn <html> die Klasse "dark" hat) */
html.dark .app-footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* Die Container links, mitte, rechts */
.footer-left, .footer-center, .footer-right {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Links im Footer */
.app-footer a {
    color: inherit; /* Erbt Farbe vom Footer */
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}
.app-footer a:hover { color: #38bdf8; }

/* Rechte Seite */
.footer-right { gap: 15px; }

/* Logout Button (immer rot, dezent) */
.logout-link {
    color: #ef4444 !important; /* Immer Rot */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Handy-Anpassung für Footer */
@media (max-width: 768px) {
    .footer-center { display: none; }
    .footer-left a { margin: 0 4px; font-size: 11px; }
}