/* ============================================
   HYPER-FLUX AUTH SYSTEM
   Style: Deep Blue Glass, White Focus
   ============================================ */

:root {
    --gradient-flux: linear-gradient(135deg, #22d3ee 0%, #2b50bc 100%);
    --color-primary: #2b50bc;
    --color-secondary: #22d3ee;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    /* Coordinate stable anchoring */
    justify-content: center;
    padding: 160px 20px 100px;
    /* Increased headroom for floating navbar */
    position: relative;
    overflow: hidden;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    perspective: 1000px;
}

.auth-card {
    background: rgba(6, 8, 20, 0.85);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(34, 211, 238, 0.1);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(34, 211, 238, 0.06), inset 0 0 30px rgba(34, 211, 238, 0.02);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    animation: authEntry 0.8s var(--ease-elastic) forwards;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #22d3ee, #2b50bc, #a855f7);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

@keyframes authEntry {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(10deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    font-size: 2rem;
    background: var(--gradient-flux);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--text-secondary);
}

/* Input Styles (Unified Cyber) */
.input-icon-wrapper {
    position: relative;
    width: 100%;
    text-align: start;
    /* Reset any inherited center-align */
}

.input-icon-wrapper i.icon-accent {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-cyan);
    opacity: 0.6;
    z-index: 5;
    pointer-events: none;
}

html[dir="rtl"] .input-icon-wrapper i.icon-accent {
    left: auto;
    right: 15px;
}

.input-glass,
.auth-input {
    width: 100%;
    padding: 14px 20px;
    padding-left: 45px;
    padding-right: 20px;
    background: rgba(6, 8, 20, 0.6) !important;
    border: 1px solid rgba(34, 211, 238, 0.08) !important;
    border-radius: 14px;
    color: #f1f5f9 !important;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-align: start;
}

html[dir="rtl"] .input-glass,
html[dir="rtl"] .auth-input {
    padding-left: 20px;
    padding-right: 45px;
    /* RTL: icon on right */
    text-align: right;
}

.password-wrap .input-glass,
.password-wrap .auth-input {
    padding-right: 45px;
    /* Space for eye toggle in LTR */
}

html[dir="rtl"] .password-wrap .input-glass,
html[dir="rtl"] .password-wrap .auth-input {
    padding-left: 45px;
    /* Space for eye toggle in RTL */
    padding-right: 45px;
    /* Keep icon space too */
}

.pass-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.5;
    z-index: 10;
    transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s;
    color: var(--text-primary);
}

html[dir="rtl"] .pass-toggle {
    right: auto;
    left: 15px;
}

.pass-toggle:hover {
    opacity: 1;
    color: var(--accent-cyan);
}

.auth-input:focus,
.input-glass:focus {
    border-color: #22d3ee !important;
    background: rgba(6, 8, 20, 0.8) !important;
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.08),
        0 0 20px rgba(34, 211, 238, 0.15),
        inset 0 0 15px rgba(34, 211, 238, 0.02) !important;
}

/* Buttons */
.btn-auth-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #22d3ee 0%, #2b50bc 50%, #a855f7 100%);
    background-size: 200% 100%;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 25px rgba(34, 211, 238, 0.25), 0 0 40px rgba(43, 80, 188, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    animation: holo-shift 4s ease infinite;
    z-index: 1;
    font-family: 'Outfit', sans-serif;
}

.btn-auth-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    animation: shimmer-sweep 5s infinite;
    z-index: -1;
}

.btn-auth-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 40px rgba(34, 211, 238, 0.5), inset 0 0 25px rgba(255, 255, 255, 0.3);
    color: #ffffff;
    animation: holo-shift 3s linear infinite;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--accent-pink);
    color: var(--color-primary);
    text-decoration: underline;
}
