/**
 * KalviYogi - Premium Auth Pages
 * Ultra-Premium Black & Gold Theme with Animated Gradients
 */

/* === ANIMATED BACKGROUND === */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

/* Animated Gradient Orbs */
.auth-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(147, 112, 219, 0.08) 0%, transparent 50%);
    animation: gradientOrbs 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.auth-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(78, 205, 196, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientOrbs {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(-5%, 5%) rotate(90deg);
    }

    50% {
        transform: translate(0, 10%) rotate(180deg);
    }

    75% {
        transform: translate(5%, 5%) rotate(270deg);
    }
}

/* Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* === LOGO SECTION === */
.auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E285 30%, #D4AF37 50%, #B8962E 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: #000;
    box-shadow:
        0 8px 32px rgba(212, 175, 55, 0.4),
        0 0 60px rgba(212, 175, 55, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    animation: logoFloat 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 70%);
    animation: logoShine 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E285 50%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.tagline {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.5);
    margin-top: var(--space-1);
}

/* === AUTH CARD - PREMIUM GLASSMORPHISM === */
.auth-card {
    width: 100%;
    background: linear-gradient(135deg,
            rgba(25, 25, 30, 0.9) 0%,
            rgba(15, 15, 20, 0.95) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 28px;
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(212, 175, 55, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Premium Glow Border */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            #D4AF37 20%,
            #F4E285 50%,
            #D4AF37 80%,
            transparent 100%);
    opacity: 0.8;
}

/* Corner Accent */
.auth-card::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card h1 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-2);
    letter-spacing: -0.5px;
}

.auth-card .subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-6);
}

/* === FORM ELEMENTS === */
.auth-form .form-group {
    margin-bottom: var(--space-5);
}

.auth-form label {
    display: block;
    color: #D4AF37;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-2);
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0 var(--space-4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper:hover {
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.02);
}

.input-wrapper:focus-within {
    border-color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.2);
}

.input-wrapper svg:first-child {
    position: static !important;
    color: #D4AF37;
    opacity: 0.6;
    flex-shrink: 0;
    margin-right: var(--space-3);
    transition: opacity 0.3s ease;
}

.input-wrapper:focus-within svg:first-child {
    opacity: 1;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 0;
    padding-left: 0 !important;
    font-size: var(--font-size-base);
    color: #fff;
    outline: none;
    width: auto;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.password-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #D4AF37;
}

/* === REMEMBER & FORGOT === */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-wrapper:hover .checkmark {
    border-color: #D4AF37;
}

.checkbox-wrapper input:checked+.checkmark {
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    border-color: transparent;
}

.checkbox-wrapper input:checked+.checkmark::after {
    content: '✓';
    color: #000;
    font-size: 12px;
    font-weight: bold;
}

.link {
    color: #D4AF37;
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: all 0.3s ease;
}

.link:hover {
    color: #F4E285;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* === SUBMIT BUTTON - PREMIUM === */
.btn-primary.btn-full {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E285 50%, #D4AF37 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 14px;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 24px rgba(212, 175, 55, 0.3),
        0 0 40px rgba(212, 175, 55, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    animation: buttonShimmer 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

@keyframes buttonShimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.btn-primary.btn-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.5s ease;
}

.btn-primary.btn-full:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(212, 175, 55, 0.4),
        0 0 60px rgba(212, 175, 55, 0.25);
}

.btn-primary.btn-full:hover::before {
    left: 100%;
}

.btn-primary.btn-full:active {
    transform: translateY(-1px);
}

.btn-primary.btn-full svg {
    transition: transform 0.3s ease;
}

.btn-primary.btn-full:hover svg {
    transform: translateX(4px);
}

/* === FOOTER === */
.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer p {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.5);
}

.auth-footer a {
    color: #D4AF37;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: #F4E285;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* === BRAND FOOTER === */
.brand-footer {
    margin-top: var(--space-8);
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
    letter-spacing: 0.5px;
}

/* === ALERT STYLING === */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: 12px;
    margin-bottom: var(--space-5);
    font-size: var(--font-size-sm);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .auth-card {
        padding: var(--space-6);
        border-radius: 20px;
    }

    .logo-icon {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }

    .auth-card h1 {
        font-size: 22px;
    }
}