/* ----------------------------- */
/* GLOBAL / BODY                 */
/* ----------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, sans-serif;
    background: #f0f7ff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    caret-color: transparent;
}

input, textarea {
    caret-color: auto;
}

/* ----------------------------- */
/* HEADER                        */
/* ----------------------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #e6e6e6;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

header h1 {
    margin: 0;
    font-size: 28px;
    color: #003366;
}

.top-nav {
    display: flex;
    gap: 20px;
}

.top-nav a {
    text-decoration: none;
    color: #003366;
    font-weight: 500;
}

.top-nav a:hover {
    text-decoration: underline;
}

/* ----------------------------- */
/* FORM CONTAINER                */
/* ----------------------------- */
.login-container, 
.reset-container, 
.forgot-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 5px 20px rgba(0,148,255,0.2);
    border: 1px solid #e6e6e6;
    text-align: center;
    box-sizing: border-box;
}

/* Überschrift */
h1 {
    color: #003366;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Labels */
label {
    font-size: 14px;
    color: #003366;
}

/* Inputs */
input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin-top: 5px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #0094FF;
    box-shadow: 0 0 8px rgba(0,148,255,0.3);
}

/* Button */
button {
    background: #0094FF;
    color: #fff;
    padding: 12px 0;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    margin-top: 15px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

button:hover {
    background: #007acc;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Links */
.back, .register {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #003366;
}

.back a, .register a {
    color: #0094FF;
    text-decoration: none;
}

.back a:hover, .register a:hover {
    text-decoration: underline;
}

/* Fehlermeldungen / Info */
.error, .message {
    color: red;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
    word-wrap: break-word;
}

/* Formular für Passwort erneut senden */
.resendform1, .forgot-form, .reset-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}

/* Responsive */
@media (max-width: 420px) {
    .login-container, .reset-container, .forgot-container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 22px;
    }

    input, button {
        font-size: 14px;
        padding: 10px;
    }
}

/* Erfolgs-Animation */
.checkmark {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
}

.checkmark__circle {
    stroke-dasharray: 210;
    stroke-dashoffset: 210;
    stroke: #28a745;
    stroke-width: 6;
    fill: none;
    animation: drawCircle 0.7s ease forwards;
}

.checkmark__check {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    stroke: #28a745;
    stroke-width: 6;
    fill: none;
    animation: drawCheck 0.4s ease 0.6s forwards;
}

/* Kreis Animation */
@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

/* Haken Animation */
@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* Fade-in scaling für die Box */
.login-container {
    animation: popIn 0.4s ease-out;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* Standardfarbe für alle Links */
a {
    color: #0094FF; /* z.B. dein blau */
    text-decoration: none; /* optional: keine Unterstreichung */
}

/* Farbe auch für besuchte Links */
a:visited {
    color: #0094FF;
}

/* Farbe beim Hover */
a:hover {
    color: #007acc; /* optional etwas dunkler */
}

/* Farbe beim aktiven Klick */
a:active {
    color: #005f99; /* optional noch dunkler */
}

/* =======================================================================
   RESPONSIVE-ERWEITERUNG (NEU) — nur unterhalb des bestehenden CSS
   Regeln: keine neuen Klassen/IDs, kein JS, kein Inline-CSS, Desktop unverändert
======================================================================= */

/* -----------------------------------------------------------------------
   MOBILE (NEU) — max-width: 480px
   Ziele: volle Breite ab 320px, Touch-Abstände, lesbare Schriftgrößen,
          kein horizontales Scrollen
----------------------------------------------------------------------- */
@media (max-width: 480px) {
    html, body {
        overflow-x: hidden; /* verhindert horizontales Scrollen */
    }

    body {
        padding: 16px;
        align-items: flex-start;  /* besser bei kleiner Höhe / Tastatur */
        justify-content: flex-start;
        box-sizing: border-box;
    }

    header {
        padding: 14px 16px;
        position: static; /* verhindert "Sticky nimmt Platz" auf kleinen Screens */
    }

    header h1 {
        font-size: 20px;
    }

    .top-nav {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .login-container,
    .reset-container,
    .forgot-container {
        width: 100%;
        max-width: 100%;
        padding: 26px 18px;
        border-radius: 16px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 22px;
    }

    label {
        font-size: 14px;
    }

    input {
        font-size: 16px; /* iOS: verhindert häufig Auto-Zoom */
        padding: 12px 14px;
        border-radius: 10px;
    }

    button {
        font-size: 16px;
        padding: 14px 0; /* größere Touch-Fläche */
        border-radius: 12px;
        margin-top: 14px;
    }

    .back, .register {
        font-size: 14px;
        margin-top: 14px;
    }

    .error, .message {
        font-size: 14px;
        margin-top: 10px;
    }

    .resendform1, .forgot-form, .reset-form {
        gap: 14px;
        margin-bottom: 20px;
    }

    .checkmark {
        width: 74px;
        height: 74px;
        margin-bottom: 12px;
    }
}

/* -----------------------------------------------------------------------
   MOBILE (NEU) — max-width: 767px
   Ziele: volle Breite, angenehme Touch-Abstände, kein horizontales Scrollen
----------------------------------------------------------------------- */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden;
    }

    body {
        padding: 18px;
        align-items: flex-start;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    header {
        padding: 16px 18px;
    }

    header h1 {
        font-size: 22px;
    }

    .login-container,
    .reset-container,
    .forgot-container {
        width: 100%;
        max-width: 520px;
        padding: 32px 22px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 24px;
    }

    input {
        font-size: 16px;
        padding: 12px 15px;
    }

    button {
        font-size: 16px;
        padding: 14px 0;
    }

    .resendform1, .forgot-form, .reset-form {
        gap: 15px;
        margin-bottom: 22px;
    }
}

/* -----------------------------------------------------------------------
   TABLET (NEU) — max-width: 1024px
   Ziele: Tablet wirkt nicht "gezoomt", stabile Proportionen,
          Desktop bleibt unverändert (nur <=1024 betroffen)
----------------------------------------------------------------------- */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden;
    }

    body {
        padding: 20px;
        box-sizing: border-box;
    }

    header {
        padding: 18px 24px;
    }

    header h1 {
        font-size: 24px;
    }

    .login-container,
    .reset-container,
    .forgot-container {
        max-width: 460px;
        padding: 38px 28px;
    }

    h1 {
        font-size: 26px;
        margin-bottom: 26px;
    }

    input {
        font-size: 16px;
    }

    button {
        font-size: 16px;
        padding: 13px 0;
    }

    .checkmark {
        width: 84px;
        height: 84px;
    }
}
