/* ==========================================================================
   1. VARIABLEN & RESET
   ========================================================================== */
:root {
    /* Farbpalette */
    --bg-primary: #0f172a;       /* Tiefes Dunkelblau/Grau */
    --bg-surface: #1e293b;       /* Karten / Container */
    --text-main: #f8fafc;        /* Fast Weiß */
    --text-muted: #94a3b8;       /* Graublau für Nebentexte */
    --accent: #38bdf8;           /* Modernes Cyan-Blau */
    --accent-hover: #0ea5e9;
    
    /* UI-Elemente */
    --radius-sm: 8px;
    --radius-md: 12px;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ==========================================================================
   2. HEADER & NAVIGATION (Mit modernem Milchglas-Effekt)
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px); /* Moderner iOS-Style Unschärfe-Effekt */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--accent);
}

/* Login Button in der Nav */
.btn-login {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--transition-smooth);
}

.btn-login:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #000;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   3. HAUPTINHALT (Hero-Bereich)
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Skaliert die Schriftgröße flüssig */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   4. MODAL (Das versteckte Login-Fenster)
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Standardmäßig unsichtbar und klick-deaktiviert */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--transition-smooth);
}

/* Diese Klasse wird später per JavaScript vergeben, um das Modal zu zeigen */
.modal.is-active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-surface);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Animation beim Öffnen */
    transform: translateY(-20px);
    transition: transform 0.3s var(--transition-smooth);
}

.modal.is-active .modal-content {
    transform: translateY(0);
}

/* Schließen-Kreuz (X) */
.close-modal {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-content h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
}

/* Formular-Elemente */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    background-color: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-submit {
    width: 100%;
    background-color: var(--accent);
    color: #000;
    border: none;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: var(--accent-hover);
}

/* ==========================================================================
   5. MOBILE ANPASSUNGEN (Smartphone-Responsive-Modus)
   ========================================================================== */
/* Hamburger-Menü-Button (Standardmäßig auf dem Desktop versteckt) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 110;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s var(--transition-smooth);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Button wird auf Handys sichtbar */
    }

    /* Das Menü wird zum mobilen Overlay-Menü */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Versteckt das Menü rechts außerhalb des Bildschirms */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-surface);
        flex-direction: column;
        justify-content: center;
        gap: 3rem;
        padding: 2rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.3);
        transition: right 0.3s var(--transition-smooth);
    }

    /* Diese Klasse wird per JS getoggelt, wenn man das Handy-Menü öffnet */
    .nav-links.is-open {
        right: 0;
    }

    /* Hamburger-Animation zum "X" wenn geöffnet */
    .menu-toggle.is-open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-open .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-open .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Sprachumschalter in der Navigation */
.lang-switcher {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.2);
}
.lang-switcher a {
    color: var(--text-muted) !important;
    text-decoration: none;
    font-weight: bold;
    padding: 0 4px;
}
.lang-switcher a.active {
    color: var(--accent) !important;
}

/* Flash-Meldungen */
.flash-alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    font-weight: 600;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}
.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #4ade80;
}
.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #f87171;
}

/* Username in Nav */
.user-welcome {
    font-weight: 600;
    color: var(--accent);
}


