/* Auth Modal Styles - Pure Dark & Optimized */

/* Modal Content - Base */
#authLoginModal .modal-content,
#authRegisterModal .modal-content,
#authForgotModal .modal-content,
#authChangePasswordModal .modal-content {
    background: #000000 !important; /* Force pure black */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 2px solid rgba(255, 255, 255, 0.8); /* High visibility white border */
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15), 0 0 0 1px #000; /* White glow + inner black stroke */
    overflow: hidden;
}

/* Header Adjustments */
#authLoginModal .modal-header,
#authRegisterModal .modal-header,
#authForgotModal .modal-header,
#authChangePasswordModal .modal-header {
    border-bottom: none;
    padding: 20px 24px 0;
    z-index: 2;
}

#authLoginModal .btn-close,
#authRegisterModal .btn-close,
#authForgotModal .btn-close,
#authChangePasswordModal .btn-close {
    opacity: 0.5;
    filter: invert(1) brightness(200%); /* White close button */
    transition: transform 0.2s ease, opacity 0.2s;
}

#authLoginModal .btn-close:hover,
#authRegisterModal .btn-close:hover,
#authForgotModal .btn-close:hover,
#authChangePasswordModal .btn-close:hover {
    transform: rotate(90deg);
    opacity: 1;
}

/* Body Adjustments */
#authLoginModal .modal-body,
#authRegisterModal .modal-body,
#authForgotModal .modal-body,
#authChangePasswordModal .modal-body {
    padding: 10px 32px 40px;
    position: relative;
    z-index: 1;
}

/* Decorative Background Glow - REMOVED per user request */
.auth-modal-glow {
    display: none !important;
}

/* Avatar/Icon Wrapper - Dark Neumorphic with Orange Accent */
.auth-icon-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(145deg, #121212, #0a0a0a);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.auth-icon-wrapper img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(245, 165, 36, 0.3));
}

.auth-icon-wrapper i {
    font-size: 2.2rem;
    color: #f59e0b; /* Amber-500 */
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Typography */
.auth-title {
    color: #f8fafc; /* Slate-50 */
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 2;
}

.auth-subtitle {
    color: #94a3b8; /* Slate-400 */
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

/* Form Inputs - Solid Dark */
.auth-input-group {
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.auth-input-group .input-group-text {
    background: #18181b; /* Zinc-900 */
    border: 1px solid #27272a; /* Zinc-800 */
    border-right: none;
    color: #71717a; /* Zinc-500 */
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    padding-left: 16px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.auth-input-group .form-control {
    background: #18181b;
    border: 1px solid #27272a;
    border-left: none;
    color: #e2e8f0; /* Slate-200 */
    padding: 12px 12px 12px 0;
    font-size: 0.95rem;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    transition: border-color 0.2s ease;
}

.auth-input-group .form-control::placeholder {
    color: #52525b; /* Zinc-600 */
    font-weight: 500;
}

.auth-input-group:focus-within .input-group-text {
    border-color: #f59e0b; /* Amber-500 */
    color: #fbbf24; /* Amber-400 */
}

.auth-input-group:focus-within .form-control {
    border-color: #f59e0b;
    box-shadow: none; /* Removed glow for performance */
}

/* Primary Button - Orange Gradient */
.btn-auth-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    width: 100%;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

/* Subtle shimmer effect on hover */
.btn-auth-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.btn-auth-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-auth-primary:hover::after {
    left: 150%;
    transition: 0.7s;
}

.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Secondary Button (Google) - White/Light */
.btn-auth-secondary {
    background: #ffffff;
    color: #1f2937; /* Dark gray text */
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-auth-secondary:hover {
    background: #f3f4f6; /* Gray-100 */
    border-color: #d1d5db;
    transform: translateY(-1px);
}

/* Ghost Button - Minimal */
.btn-auth-ghost {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.651);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-auth-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    width: 100%;
}

.auth-divider-line {
    height: 1px;
    background: #27272a; /* Zinc-800 */
    flex-grow: 1;
}

.auth-divider-text {
    color: #52525b; /* Zinc-600 */
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 12px;
}

/* Links & Checks */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-check input {
    width: 16px;
    height: 16px;
    background-color: #18181b;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.auth-check input:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.auth-check input:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 9px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-check span {
    color: #94a3b8;
    font-weight: 500;
}

.auth-forgot-link {
    color: #f59e0b; /* Amber-500 */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-forgot-link:hover {
    color: #fbbf24; /* Amber-400 */
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    #authLoginModal .modal-content,
    #authRegisterModal .modal-content,
    #authForgotModal .modal-content,
    #authChangePasswordModal .modal-content {
        background: #000000 !important; /* Pure Black for OLED optimization */
        backdrop-filter: none !important; /* Disable expensive blur */
        -webkit-backdrop-filter: none !important;
        border: none;
        box-shadow: none;
        border-radius: 0; /* Fullscreen feel on mobile or bottom sheet */
        height: auto;
        min-height: auto;
    }
    
    #authLoginModal .modal-dialog,
    #authRegisterModal .modal-dialog,
    #authForgotModal .modal-dialog,
    #authChangePasswordModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
        display: flex;
        align-items: center; /* Center vertically */
        justify-content: center;
    }
    
    /* Remove glow on mobile */
    .auth-modal-glow {
        display: none; 
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px !important;
    }

    /* Refined Buttons for Mobile - Standard Size */
    .btn-auth-primary, 
    .btn-auth-secondary, 
    .btn-auth-ghost {
        padding: 10px 16px; /* Standard mobile padding (approx 44px touch target) */
        font-size: 0.95rem; /* Readable text */
        border-radius: 8px; /* Standard modern radius */
        margin-top: 8px; /* Tighter spacing */
        box-shadow: none !important; /* Remove heavy shadows on mobile */
        min-height: 44px; /* Apple/Android recommended minimum touch height */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Adjust secondary button icon spacing */
    .btn-auth-secondary {
        gap: 8px;
    }
    
    .btn-auth-secondary img {
        width: 18px;
        height: 18px;
    }
}
