/* Aus register.html, forgot_password.html und reset_password.html
   herausgeloest, wo dieser Block dreifach fast wortgleich stand.
   Er steht vorn, weil das <style> im HTML vor dem <link> stand:
   die Regeln darunter gewinnen bei gleicher Spezifitaet. */
        :root {
            --bg-color: #0f172a;
            --surface-color: rgba(30, 41, 59, 0.7);
            --border-color: rgba(255, 255, 255, 0.1);
            --primary-color: #3b82f6;
            --primary-hover: #2563eb;
            --accent-color: #8b5cf6;
            --text-color: #f8fafc;
            --text-muted: #94a3b8;
            --danger-color: #ef4444;
            --success-color: #10b981;
        }

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

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-color);
            background-image:
                radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
                radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
            background-attachment: fixed;
            color: var(--text-color);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .language-picker { display:flex; justify-content:center; gap:.4rem; margin-bottom:1rem; }
        .language-picker button { width:auto; min-width:38px; margin:0; padding:.35rem .5rem; font-size:20px; background:rgba(15,23,42,.65); border:1px solid var(--border-color); }
        .language-picker button.active { border-color:var(--primary-color); box-shadow:0 0 0 2px rgba(59,130,246,.35); }

        .container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 2rem;
            width: 100%;
        }

        .glass-panel {
            background: var(--surface-color);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 2rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        /* Forms & Buttons */
        input {
            width: 100%;
            padding: 0.75rem 1rem;
            margin-bottom: 1rem;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-color);
            font-family: 'Inter', sans-serif;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
        }

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-size: 0.875rem;
            color: var(--text-muted);
        }

        button {
            background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.1s, box-shadow 0.2s;
            width: 100%;
            margin-top: 1rem;
        }

        button:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* Eine Regel je Seite, frueher dreifach dupliziert mit nur
           diesem Selektor als Unterschied. */
        #register-screen,
        #forgot-screen,
        #reset-screen {
            max-width: 450px;
            margin: auto;
            margin-top: 10vh;
        }

        h2 {
            font-size: 1.75rem;
            font-weight: 700;
            background: linear-gradient(to right, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 1.5rem;
            text-align: center;
        }

        .alert {
            padding: 0.75rem;
            border-radius: 8px;
            margin-bottom: 1rem;
            font-size: 0.875rem;
            display: none;
        }

        .alert.error {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger-color);
            border: 1px solid rgba(239, 68, 68, 0.2);
            display: block;
        }

        .alert.success {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success-color);
            border: 1px solid rgba(16, 185, 129, 0.2);
            display: block;
        }

        .links {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.875rem;
        }

        .links a {
            color: var(--primary-color);
            text-decoration: none;
        }

        .links a:hover {
            text-decoration: underline;
        }

:root {
    --bg-main: #f8fafc;
    --bg-panel: #ffffff;
    --bg-control: #ffffff;
    --bg-btn: #f1f5f9;
    --bg-btn-hover: #e2e8f0;
    --text-main: #334155;
    --text-heading: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-input: #cbd5e1;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --danger: #dc2626;
    --success: #059669;
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.14);
}

:root[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-panel: #1e293b;
    --bg-control: #0f172a;
    --bg-btn: #334155;
    --bg-btn-hover: #475569;
    --text-main: #e2e8f0;
    --text-heading: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-input: #475569;
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --danger: #f87171;
    --success: #34d399;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    padding: 32px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.10), transparent 32rem),
        radial-gradient(circle at 88% 92%, rgba(14, 165, 233, 0.07), transparent 30rem),
        var(--bg-main);
    background-attachment: fixed;
}

.container,
#register-screen,
#forgot-screen,
#reset-screen {
    width: min(100%, 460px);
    max-width: 460px;
    margin: 0 !important;
    padding: 0;
}

.auth-brand {
    display: block;
    margin: 0 0 18px;
    color: var(--text-heading);
    text-align: center;
    text-decoration: none;
}

.auth-wordmark {
    font-size: clamp(42px, 10vw, 54px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.055em;
}

.auth-wordmark i {
    margin-right: -0.09em;
    font-weight: 500;
}

.auth-tagline {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.045em;
}

.language-picker {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 12px;
}

.language-picker button {
    width: 38px;
    min-width: 38px;
    height: 32px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    background: var(--bg-panel);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    font-size: 19px;
    line-height: 1;
    transform: none;
}

.language-picker button:hover {
    border-color: var(--border-input);
    background: var(--bg-btn);
    box-shadow: none;
    transform: none;
}

.language-picker button.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.10);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.glass-panel {
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-main);
    background: var(--bg-panel);
    box-shadow: var(--shadow-lg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

h2 {
    margin: 0 0 24px;
    color: var(--text-heading);
    background: none;
    font-size: 23px;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: currentColor;
}

.glass-panel > p {
    margin: -12px 0 24px !important;
    color: var(--text-muted) !important;
    line-height: 1.5;
}

label {
    display: block;
    margin: 0 0 7px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    height: 42px;
    margin: 0 0 17px;
    padding: 9px 12px;
    border: 1px solid var(--border-input);
    border-radius: 8px;
    color: var(--text-heading);
    background: var(--bg-control);
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder { color: var(--text-muted); opacity: 0.7; }

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

form > button {
    width: 100%;
    min-height: 42px;
    margin: 3px 0 0;
    padding: 10px 16px;
    border: 1px solid var(--primary-dark);
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

form > button:hover {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22);
    transform: none;
}

form > button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.alert {
    margin: 0 0 17px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.alert.error {
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: var(--danger);
    background: rgba(220, 38, 38, 0.08);
}

.alert.success {
    border: 1px solid rgba(5, 150, 105, 0.25);
    color: var(--success);
    background: rgba(5, 150, 105, 0.08);
}

.links {
    margin-top: 22px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.links a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

:root[data-theme="dark"] .links a { color: var(--primary); }
.links a:hover { text-decoration: underline; }

@media (max-width: 520px) {
    body { padding: 22px 14px; align-items: flex-start; }
    .glass-panel { padding: 24px 20px; }
    .auth-wordmark { font-size: 44px; }
}
