/* Reset & Grundlayout */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    color: #f5f5f5;
    background-color: #050711;
}

/* Hintergrundbereich */
.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;

    /* Hintergrundbild klar sichtbar */
    background: url("../img/Login_Background.jpg") center center / cover no-repeat fixed;
}

/* Leichte Abdunkelung darüber */
.login-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0, rgba(32, 132, 252, 0.25), transparent 55%),
                linear-gradient(135deg, rgba(5, 7, 17, 0.80), rgba(5, 7, 17, 0.94));
    backdrop-filter: blur(3px);
    z-index: 0;
}

/* Container & Card */
.login-container {
    position: relative;
    z-index: 1;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
}

.login-card {
    background: rgba(10, 12, 24, 0.94);
    border-radius: 22px;
    border: 1px solid rgba(120, 144, 255, 0.4);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65);
    padding: 24px 24px 20px;
}

/* Header + Logo */
.login-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.login-title h1 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #ffffff;
    margin-bottom: 6px;
}

.login-title p {
    font-size: 0.88rem;
    color: rgba(230, 236, 255, 0.85);
    line-height: 1.45;
}

/* Logo oben rechts rund */
.login-logo-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

/* Logo kleiner, nicht hochskalieren, softer Rahmen */
.login-logo {
    height: 40px;          /* etwas kleiner = wirkt schärfer */
    width: auto;           /* Seitenverhältnis beibehalten */
    max-width: 100%;
    border-radius: 999px;
    object-fit: contain;   /* nichts vom Logo abschneiden */
    border: 1px solid rgba(120, 144, 255, 0.6);
    box-shadow: 0 0 6px rgba(32, 132, 252, 0.35);
}


/* Fehlermeldungen */
.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0 16px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.alert-error {
    background: rgba(239, 83, 80, 0.08);
    border: 1px solid rgba(239, 83, 80, 0.7);
    color: #ffcdd2;
}

/* Formular */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    color: rgba(220, 230, 255, 0.92);
}

/* Inputs + kleinere Hacker-Optik */
.form-group input {
    border-radius: 10px;
    border: 1px solid rgba(120, 144, 255, 0.55);
    background: rgba(8, 10, 22, 0.9);
    padding: 9px 11px;
    font-size: 0.9rem;
    color: #f5f7ff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease,
                background-color 0.18s ease;
    font-family: "Inter", system-ui, sans-serif;
}

/* Placeholder als leicht „terminalartig“ */
.form-group input::placeholder {
    color: rgba(160, 190, 255, 0.7);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Fokus */
.form-group input:focus {
    border-color: #4c8dff;
    box-shadow: 0 0 0 1px rgba(76, 141, 255, 0.5);
    background-color: rgba(10, 13, 30, 0.97);
}

/* Aktionen / Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Basis-Button */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 120px;
    padding: 9px 18px;
    font-size: 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;

    transition:
        transform 0.18s ease-out,
        box-shadow 0.18s ease-out,
        background-color 0.18s ease-out,
        color 0.18s ease-out,
        border-color 0.18s ease-out;
}

/* Wasser-Fill-Login-Button (transparent -> füllt sich) */
.btn-primary {
    background-color: transparent;
    border-color: #2f7bff;
    color: #d0e4ff;
    font-weight: 500;
    box-shadow: 0 8px 18px rgba(32, 132, 252, 0.3);
}

/* Flüssigkeitsebene */
.btn-primary::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -110%;
    height: 210%;
    background:
        radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.28) 0, transparent 50%),
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.18) 0, transparent 55%),
        linear-gradient(180deg, #6fa8ff 0%, #2f7bff 45%, #1f4fd1 100%);
    background-size: 140% 140%;
    background-position: 0 0;
    transition: bottom 0.4s ease-out;
    z-index: 0;
}

/* leichte Wellen- / Glow-Ebene */
.btn-primary::after {
    content: "";
    position: absolute;
    left: -20%;
    top: -40%;
    width: 140%;
    height: 120%;
    background:
        radial-gradient(circle at 10% 40%, rgba(255, 255, 255, 0.16) 0, transparent 55%),
        radial-gradient(circle at 90% 50%, rgba(255, 255, 255, 0.12) 0, transparent 55%);
    opacity: 0;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

/* Text immer über der Füllung */
.btn-primary span,
.btn-primary {
    position: relative;
    z-index: 2;
}

/* Hover: Wasser steigt + Button hebt leicht ab */
.btn-primary:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(32, 132, 252, 0.6);
}

.btn-primary:hover::before {
    bottom: -5%;
    animation: btnWaveMove 3s ease-in-out infinite alternate;
}

.btn-primary:hover::after {
    opacity: 1;
    animation: btnWaveGlow 3s ease-in-out infinite alternate;
}

/* Wellenbewegung */
@keyframes btnWaveMove {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 40% 20%;
    }
    100% {
        background-position: 80% 0;
    }
}

@keyframes btnWaveGlow {
    0% {
        transform: translateX(0);
        opacity: 0.5;
    }
    50% {
        transform: translateX(6%);
        opacity: 0.9;
    }
    100% {
        transform: translateX(-4%);
        opacity: 0.6;
    }
}

/* Sekundärer Button: Account erstellen */
.btn-secondary {
    background-color: transparent;
    border-color: rgba(156, 174, 255, 0.6);
    color: #e0e4ff;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    background-color: rgba(120, 144, 255, 0.12);
    border-color: rgba(156, 174, 255, 0.9);
}

/* Meta-Infos */
.form-meta {
    margin-top: 12px;
}

.form-meta p {
    font-size: 0.8rem;
    color: rgba(190, 202, 240, 0.8);
}

/* Footer */
.login-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(180, 192, 230, 0.78);
}

/* Mobil */
@media (max-width: 480px) {
    .login-card {
        padding: 22px 18px 18px;
    }

    .login-title h1 {
        font-size: 1.4rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .login-header {
        align-items: center;
    }
}
/* Neon-Highlight-Button für "Zur Startseite" */
a.btn-startpage {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 18px;
    border-radius: 999px;

    /* KLAR anders als Primary/Secondary: Neon-Orange/Gold */
    background: linear-gradient(135deg, #f97316, #facc15);
    border: 1px solid rgba(250, 204, 21, 0.9);
    color: #111827; /* dunkler Text für Kontrast */

    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;

    box-shadow:
        0 0 20px rgba(250, 204, 21, 0.55),
        0 12px 30px rgba(0, 0, 0, 0.75);

    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

a.btn-startpage:hover {
    transform: translateY(-1px) scale(1.01);
    filter: brightness(1.05);
    box-shadow:
        0 0 28px rgba(250, 204, 21, 0.9),
        0 16px 40px rgba(0, 0, 0, 0.85);
}
.main.main--login {
    padding: 0;
}
/* ===== LAYOUT MIT SIDEBAR AUF LOGINSEITE ===== */

/* Haupt-Layout: Sidebar links, Inhalt rechts */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Main-Bereich rechts neben der Sidebar */
.main {
    flex: 1;
    display: flex;              /* damit die login-page sich über die Höhe strecken kann */
}

/* Login-Seite: kein zusätzliches Padding vom Dashboard */
.main.main--login {
    padding: 0;
}

/* login-page soll den gesamten verfügbaren Bereich in main ausfüllen */
.main--login .login-page {
    flex: 1;
}
/* ============================
   2FA Hacker-Style Digit Boxes
   ============================ */

.twofa-group {
    position: relative;
}

.twofa-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 0 0, rgba(45,212,191,0.45), transparent 55%),
                rgba(15,23,42,0.85);
    border: 1px solid rgba(45,212,191,0.6);
    box-shadow: 0 0 12px rgba(34,197,94,0.35);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a7f3d0;
}

.twofa-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: radial-gradient(circle, #bbf7d0 0, #22c55e 40%, transparent 80%);
    box-shadow: 0 0 8px rgba(34,197,94,0.8);
}

.twofa-badge-text {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Digit-Row */
.twofa-input-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* Einzelne Ziffern */
.twofa-digit {
    width: 42px;
    height: 48px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid rgba(96,165,250,0.6);
    background:
        radial-gradient(circle at 20% 0, rgba(59,130,246,0.35), transparent 60%),
        radial-gradient(circle at 80% 100%, rgba(30,64,175,0.5), transparent 55%),
        rgba(3,7,18,0.95);
    color: #e5f0ff;
    outline: none;
    box-shadow: 0 0 0 1px rgba(15,23,42,1), 0 0 14px rgba(37,99,235,0.45);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", "Courier New", monospace;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

/* Aktiv / Fokus mit leichter "Glitch"-Vibration */
.twofa-digit:focus,
.twofa-digit-active {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.7), 0 0 18px rgba(56,189,248,0.9);
    animation: twofaPulse 0.5s ease-out;
}

@keyframes twofaPulse {
    0%   { transform: translateY(0); }
    20%  { transform: translateY(-1px); }
    40%  { transform: translateY(1px); }
    60%  { transform: translateY(-0.5px); }
    80%  { transform: translateY(0.5px); }
    100% { transform: translateY(0); }
}

.twofa-hint {
    margin-top: 8px;
    font-size: 0.78rem;
    color: rgba(191, 219, 254, 0.9);
    font-family: "Inter", system-ui, sans-serif;
}
