/* =========================================
   Login Page — Glassmorphism Override
   Separate CSS to avoid touching global style.css
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@400;600;700&family=Philosopher:wght@400;700&display=swap');

/* =========================================
   1. Background Override
   ========================================= */
body {
    background: url('/static/homepage/img/bg.avif') center/cover no-repeat fixed !important;
    background-color: #121212 !important;
}

/* =========================================
   2. Login Wrapper — Center Vertically
   ========================================= */
/* Make the page wrapper fill the viewport as a flex column */
.as_main_wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
}

/* Compact copyright on auth pages */
.as_copyright_wrapper {
    padding: 8px 0 4px !important;
    flex-shrink: 0;
}

/* =========================================
   3. Glassmorphism Card
   ========================================= */
.login-card {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 40px 35px;
    max-width: 480px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 40px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* =========================================
   4. Heading — Gold Gradient
   ========================================= */
.login-title {
    font-family: "Cormorant Infant", serif;
    font-weight: 700;
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to bottom, #FFECB3 0%, #FFD54F 40%, #FFB300 80%, #FFA000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-align: center;
    margin-bottom: 30px;
    filter: drop-shadow(0px 2px 0px rgba(0,0,0,0.8));
}

/* Decorative divider */
.login-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, transparent, #D4AF37, transparent);
    margin: 12px auto 0;
}

/* =========================================
   5. Form Inputs — Gold Focus
   ========================================= */
.login-card .form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid #333 !important;
    border-radius: 8px !important;
    color: #E0E0E0 !important;
    font-family: "Merriweather", "Inter", sans-serif;
    font-size: 14px;
    height: 44px;
    padding: 8px 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-card .form-control:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
}

.login-card .form-control::placeholder {
    color: #888;
    font-weight: 400;
}

/* =========================================
   6. Labels
   ========================================= */
.login-card .form-label,
.login-card .col-form-label {
    color: #E0E0E0 !important;
    font-family: "Philosopher", sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* =========================================
   7. Submit Button — Pill Shape
   ========================================= */
.login-submit {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    border: 1px solid #D4AF37 !important;
    border-radius: 50px !important;
    color: #E0E0E0 !important;
    font-family: "Cormorant Infant", serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.login-submit:hover {
    background: #D4AF37;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

.login-submit:active {
    transform: translateY(0);
}

/* =========================================
   8. Links — Gold Accent
   ========================================= */
.login-link {
    color: #D4AF37 !important;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    font-size: 14px;
}

.login-link:hover {
    color: #F4C430 !important;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.login-link-bright {
    color: #F4C430 !important;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.login-link-bright:hover {
    color: #FFECB3 !important;
    text-shadow: 0 0 8px rgba(244, 196, 48, 0.4);
}

.login-text-muted {
    color: #888 !important;
    font-size: 14px;
}

/* =========================================
   9. Messages / Alerts
   ========================================= */
.login-alert {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
    border-radius: 10px;
    padding: 12px 20px;
    color: #a8e6cf;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out forwards;
}

.login-alert-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #f5a9b3;
}

/* =========================================
   10. Copyright Footer
   ========================================= */
.login-footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 13px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

/* =========================================
   11. Responsive
   ========================================= */
@media (max-width: 576px) {
    body {
        background: url('/static/homepage/img/bg_mob.avif') center/cover no-repeat fixed !important;
        background-color: #121212 !important;
    }

    .login-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .login-title {
        font-size: 26px;
    }
}

/* =========================================
   12. Password Toggle Icon
   ========================================= */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    opacity: 0.7;
    z-index: 10;
}

.password-toggle-icon:hover {
    opacity: 1;
}
