* {
    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;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative; /* WICHTIG: Damit legt sich das Loading-Overlay exakt drüber */
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.login-card h1 { margin: 0 0 10px 0; color: #1e1b4b; font-size: 32px; }
.subtitle { color: #6b7280; margin-bottom: 30px; font-size: 15px; }
.button-container { display: flex; flex-direction: column; gap: 12px; }

.button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    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); }
.button.secondary { background-color: transparent; color: #4338ca; border: 2px solid #4338ca; }
.button.secondary:hover { background-color: #f3f4f6; transform: translateY(-2px); }
.button.outline { background: transparent; color: #6b7280; border: 1px solid #d1d5db; }
.button.outline:hover { background: #f3f4f6; }

/* --- LADE-OVERLAY --- */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 20px;
}

.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: 17px;
    margin: 0;
}

/* --- TRENNLINIE & SOCIAL --- */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 12px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.social-container { display: flex; gap: 12px; }

.button.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
}

.button.social-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.social-icon { width: 20px; height: 20px; }

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: slideUpModal 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card h2 { margin: 0; color: #1e1b4b; font-size: 24px; }
.modal-subtitle { color: #6b7280; font-size: 14px; margin-top: 6px; margin-bottom: 20px; }

.profile-info {
    display: flex;
    align-items: center;
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: left;
    border: 1px solid #e5e7eb;
}

.profile-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.user-details h3 { margin: 0; font-size: 16px; color: #111827; }
.user-details p { margin: 2px 0 0 0; font-size: 13px; color: #6b7280; }

.modal-buttons { display: flex; flex-direction: column; gap: 10px; }

.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpModal {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}