:root {
    --bg-dark: #0a0c10;
    --card-bg: rgba(18, 22, 33, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.35);
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    --input-bg: rgba(15, 18, 28, 0.8);
    --input-focus-border: rgba(99, 102, 241, 0.5);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(99, 102, 241, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.6;
    animation: pulseGlow 10s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.75;
    }
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 1;
}

/* Glassmorphism Card styling */
.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.logo-text .highlight {
    color: var(--accent);
}

.title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.8;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.forgot-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-wrapper input:focus + .input-icon {
    color: var(--accent);
}

.mfa-section {
    transition: all 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Primary Button styling */
.submit-btn {
    margin-top: 8px;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.submit-btn:hover {
    background: #4f46e5;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    background: rgba(99, 102, 241, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Status container */
.status-container {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    font-family: 'JetBrains Mono', monospace;
    border-left: 4px solid transparent;
    animation: fadeIn 0.3s ease;
}

.status-container.error {
    background: var(--danger-glow);
    border-color: var(--danger);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--danger);
}

.status-container.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 4px solid var(--success);
}

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

/* Spinner */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.card-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    opacity: 0.6;
}

/* Responsive adjustment */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
}

/* Custom Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 6, 10, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-card {
    position: relative;
    background: rgba(18, 22, 33, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(99, 102, 241, 0.15);
    animation: modalAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 101;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.modal-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
}

.modal-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-body strong {
    color: var(--text-primary);
}

.modal-info {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.info-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

