/* =====================================================
   STUDAC AUTH PAGES - Glassmorphism Design System
   ===================================================== */

/* Brand Colors - Matching Main App */
:root {
    --brand-primary: #7c3aed;
    --brand-secondary: #ec4899;
    --brand-accent: #00f5d4;
    --glass-blur: 20px;
    --glass-bg: rgba(20, 20, 40, 0.8);
    --glass-border: rgba(124, 58, 237, 0.3);
}

/* Auth Wrapper */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated Gradient Background */
body {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #1a1a2e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Orbs Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 10% 10%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 90% 20%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 40% at 50% 90%, rgba(0, 245, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 20% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 80% 70%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Grid Pattern Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Auth Background */
.auth-bg {
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

.auth-bg.sign-in-bg-img,
.auth-bg.sign-up-bg-img {
    background: transparent;
}

/* Auth background inherits gradient from body */

/* Auth Card - Glassmorphism */
.auth-bg .card,
.card.overflow-hidden {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.9) 0%, rgba(30, 30, 63, 0.85) 100%) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(124, 58, 237, 0.3) !important;
    border-radius: 20px !important;
    box-shadow:
        0 8px 32px rgba(124, 58, 237, 0.2),
        0 0 60px rgba(124, 58, 237, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateY(0) !important;
    max-width: 450px;
    width: 100%;
    margin: 20px;
}

.auth-bg .card:hover,
.card.overflow-hidden:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(124, 58, 237, 0.5) !important;
    box-shadow:
        0 16px 48px rgba(124, 58, 237, 0.3),
        0 0 80px rgba(124, 58, 237, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Auth Brand Logo */
.auth-brand {
    display: inline-block;
}

.auth-brand img {
    height: 50px;
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.4));
}

/* Typography */
.auth-bg h3,
.auth-bg .fw-semibold {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.auth-bg p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Form Labels */
.auth-bg .form-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* Form Inputs - Glassmorphism */
.auth-bg .form-control,
.auth-bg .form-select {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(124, 58, 237, 0.25) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

.auth-bg .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.auth-bg .form-control:focus,
.auth-bg .form-select:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2), 0 0 20px rgba(124, 58, 237, 0.15) !important;
    outline: none !important;
    color: #ffffff !important;
}

/* Select dropdown options */
.auth-bg .form-select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* Form Validation */
.auth-bg .is-invalid {
    border-color: #ef4444 !important;
}

.auth-bg .invalid-feedback {
    color: #fca5a5 !important;
    font-size: 0.85rem;
}

/* Error Alert */
.auth-bg .alert {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 10px !important;
    backdrop-filter: blur(10px);
}

/* Studac Button - Gradient */
.studac-btn,
.glodex-login-btn {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4) !important;
    position: relative;
    overflow: hidden;
}

.studac-btn::before,
.glodex-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.studac-btn:hover,
.glodex-login-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5), 0 0 40px rgba(124, 58, 237, 0.3) !important;
    background: linear-gradient(135deg, #8b5cf6, #f472b6) !important;
}

.studac-btn:hover::before,
.glodex-login-btn:hover::before {
    left: 100%;
}

.studac-btn:active,
.glodex-login-btn:active {
    transform: translateY(0) !important;
}

/* Links */
.auth-bg a {
    color: var(--brand-accent) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.auth-bg a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.auth-bg .text-white a {
    color: var(--brand-accent) !important;
}

/* Footer Text */
.auth-bg .mt-auto {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.85rem;
}

.auth-bg .text-gradient,
.auth-bg .fw-bold.text-reset {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Check (Remember me, Terms) */
.auth-bg .form-check-input {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
}

.auth-bg .form-check-input:checked {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.auth-bg .form-check-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .auth-bg .card,
    .card.overflow-hidden {
        margin: 15px !important;
        padding: 20px !important;
        border-radius: 16px !important;
    }

    .auth-brand img {
        height: 40px;
    }

    .auth-bg h3 {
        font-size: 1.5rem !important;
    }
}

/* Animation for card entrance */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-bg .card,
.card.overflow-hidden {
    animation: cardEntrance 0.6s ease-out;
}

/* Glow effect on focus within card */
.auth-bg .card:focus-within {
    box-shadow:
        0 8px 32px rgba(124, 58, 237, 0.25),
        0 0 80px rgba(124, 58, 237, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Password field eye icon styling */
.auth-bg .input-group-text {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(124, 58, 237, 0.25) !important;
    border-left: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Divider styling */
.auth-bg hr {
    border-color: rgba(124, 58, 237, 0.2) !important;
}

/* Social login buttons (if needed) */
.auth-bg .btn-social {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
}

.auth-bg .btn-social:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
}
