/* ==========================================================================
   1. GRUNDLAYOUT & HINTERGRUND
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   2. HAUPTKARTE (LOGIN-CARD)
   ========================================================================== */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 0;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.login-card h1 {
    margin: 0 0 10px 0;
    color: #1e1b4b;
    font-size: 28px;
}

.subtitle {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 15px;
}

/* ==========================================================================
   3. SCHRITTE (1 BIS 3)
   ========================================================================== */
.slider-wrapper {
    display: block;
    width: 100%;
}

.slide-step {
    display: none;
    width: 100%;
    padding: 0 36px;
    animation: stepFadeIn 0.25s ease;
}

.slide-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   4. EINGABEFELDER (INPUTS), USER BADGE & 2FA
   ========================================================================== */
.input-group {
    margin: 15px 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.25s ease;
    background: #f9fafb;
    color: #111827;
}

.input-group input:focus {
    border-color: #4338ca;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(67, 56, 202, 0.1);
}

.code-input-center {
    text-align: center;
    letter-spacing: 0.35em;
    font-weight: 700;
    font-size: 18px !important;
}

.twofa-box {
    display: block;
}

.twofa-hint {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}

.edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

.button.primary {
    background-color: #4338ca;
    color: white;
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.button.primary:hover {
    background-color: #3730a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 56, 202, 0.4);
}

.button.outline {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.button.outline:hover {
    background: #f3f4f6;
}

.button:active {
    transform: translateY(0);
}

/* ==========================================================================
   6. LADE-OVERLAY
   ========================================================================== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 20px;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 5px solid #e5e7eb;
    border-top: 5px solid #4338ca;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #374151;
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}