/* ═══════════════════════════════════════════════════
   BLUE TENTE — Premium Auth Experience v2.0
   Aurora Glassmorphism + Particle Effects
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
    --auth-primary: #00d4ff;
    --auth-primary-rgb: 0, 212, 255;
    --auth-secondary: #7c3aed;
    --auth-secondary-rgb: 124, 58, 237;
    --auth-tertiary: #06b6d4;
    --auth-success: #10b981;
    --auth-error: #f43f5e;
    --auth-surface: rgba(15, 23, 42, 0.65);
    --auth-surface-hover: rgba(15, 23, 42, 0.8);
    --auth-border: rgba(255, 255, 255, 0.12);
    --auth-border-focus: rgba(0, 212, 255, 0.6);
    --auth-text: #f1f5f9;
    --auth-text-secondary: #94a3b8;
    --auth-glow: 0 0 40px rgba(0, 212, 255, 0.3);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-page {
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--auth-text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0a0e1a;
}

/* ── Aurora Background ── */
.auth-bg-shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Animated aurora gradient mesh */
.auth-bg-shapes::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: 
        conic-gradient(from 0deg at 30% 40%, 
            #0a0e1a 0deg, 
            rgba(0, 212, 255, 0.15) 60deg, 
            #0a0e1a 120deg, 
            rgba(124, 58, 237, 0.12) 200deg, 
            #0a0e1a 260deg,
            rgba(6, 182, 212, 0.1) 320deg,
            #0a0e1a 360deg);
    animation: auroraRotate 30s linear infinite;
}

.auth-bg-shapes::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: 
        conic-gradient(from 180deg at 70% 60%, 
            transparent 0deg, 
            rgba(124, 58, 237, 0.12) 80deg, 
            transparent 160deg, 
            rgba(0, 212, 255, 0.1) 240deg, 
            transparent 360deg);
    animation: auroraRotate 25s linear infinite reverse;
}

@keyframes auroraRotate {
    to { transform: rotate(360deg); }
}

/* Floating orbs */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.25), transparent 65%);
    top: -15%;
    left: -10%;
    animation: orbit1 22s ease-in-out infinite;
}

.shape-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2), transparent 65%);
    bottom: -25%;
    right: -15%;
    animation: orbit2 28s ease-in-out infinite;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 65%);
    top: 50%;
    left: 55%;
    animation: orbit3 18s ease-in-out infinite;
}

@keyframes orbit1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 40px) scale(1.15); }
    66% { transform: translate(-30px, -60px) scale(0.95); }
}

@keyframes orbit2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-70px, -50px) scale(1.1); }
    66% { transform: translate(40px, 60px) scale(0.9); }
}

@keyframes orbit3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, 30px) scale(1.2); }
}

/* ── Grid Lines Overlay ── */
body.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* ── Particle Canvas Area ── */
body.auth-page::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    background: 
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 50%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(0,212,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 90%, rgba(124,58,237,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 40%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 25% 55%, rgba(0,212,255,0.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 75% 15%, rgba(124,58,237,0.5) 0%, transparent 100%);
    animation: particleTwinkle 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes particleTwinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* ── Main Wrapper ── */
.auth-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    perspective: 1200px;
    animation: wrapperEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes wrapperEntry {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Glass Panel ── */
.auth-glass-panel {
    position: relative;
    background: var(--auth-surface);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 25px 60px -15px rgba(0, 0, 0, 0.6),
        var(--auth-glow);
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    overflow: hidden;
}

/* Inner top gradient accent line */
.auth-glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--auth-primary) 30%, 
        var(--auth-secondary) 70%, 
        transparent);
    border-radius: 0 0 4px 4px;
    opacity: 0.8;
}

/* Shimmer overlay */
.auth-glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(
        135deg, 
        rgba(255,255,255,0.04) 0%, 
        transparent 40%, 
        transparent 60%,
        rgba(255,255,255,0.02) 100%);
    pointer-events: none;
}

/* ── Brand / Header ── */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
    transform: translateZ(30px);
    position: relative;
}

.auth-brand {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    position: relative;
}

.auth-brand-text {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255,255,255,0.15);
}

.auth-brand-accent {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(var(--auth-primary-rgb), 0.5));
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--auth-text-secondary);
    margin: 0;
    font-weight: 400;
}

/* ── Alerts ── */
.auth-alert {
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: alertSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(20px);
    position: relative;
    overflow: hidden;
}

.auth-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
}

.auth-alert i { font-size: 1.2rem; flex-shrink: 0; }

.auth-alert-error {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fda4af;
}
.auth-alert-error::before { background: var(--auth-error); }

.auth-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}
.auth-alert-success::before { background: var(--auth-success); }

@keyframes alertSlide {
    from { opacity: 0; transform: translateX(-20px) translateZ(20px); }
    to { opacity: 1; transform: translateX(0) translateZ(20px); }
}

/* ── Form ── */
.auth-form {
    transform: translateZ(20px);
    position: relative;
}

.auth-form-group {
    position: relative;
    margin-bottom: 22px;
}

.auth-form-row {
    display: flex;
    gap: 14px;
}

.auth-form-row .auth-form-group {
    flex: 1;
}

/* ── Inputs ── */
.auth-input {
    width: 100%;
    height: 58px;
    background: rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 22px 48px 8px 18px;
    font-size: 1rem;
    color: #ffffff;
    font-family: var(--font-body);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.auth-input:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.4);
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 0 0 4px rgba(var(--auth-primary-rgb), 0.12),
        0 0 20px rgba(var(--auth-primary-rgb), 0.08);
}

/* ── Floating Labels ── */
.auth-label {
    position: absolute;
    left: 18px;
    top: 18px;
    font-size: 0.95rem;
    color: var(--auth-text-secondary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    transform-origin: left center;
}

.auth-input:focus ~ .auth-label,
.auth-input:not(:placeholder-shown) ~ .auth-label {
    top: 8px;
    font-size: 0.72rem;
    color: var(--auth-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Input Icons ── */
.auth-input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.35s ease;
    pointer-events: none;
    font-size: 0.95rem;
}

.auth-input:focus ~ .auth-input-icon {
    color: var(--auth-primary);
    filter: drop-shadow(0 0 6px rgba(var(--auth-primary-rgb), 0.5));
}

/* ── Checkbox ── */
.auth-check {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--auth-text-secondary);
    margin-bottom: 28px;
    user-select: none;
    transition: color 0.2s;
}

.auth-check:hover { color: var(--auth-text); }

.auth-check input {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.auth-check input:hover {
    border-color: rgba(var(--auth-primary-rgb), 0.5);
}

.auth-check input:checked {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    border-color: transparent;
    box-shadow: 0 0 12px rgba(var(--auth-primary-rgb), 0.4);
}

.auth-check input:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    font-size: 11px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

/* ── Submit Button ── */
.auth-btn {
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 30px rgba(var(--auth-primary-rgb), 0.35),
        0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Shimmer sweep on button */
.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.25), 
        transparent);
    transition: left 0.6s ease;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 14px 40px rgba(var(--auth-primary-rgb), 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(var(--auth-primary-rgb), 0.3),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Pulse ring animation on button */
.auth-btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 16px;
    border: 2px solid rgba(var(--auth-primary-rgb), 0.4);
    animation: btnPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.01); }
}

/* ── Footer Links ── */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 0.95rem;
    transform: translateZ(20px);
    position: relative;
}

.auth-footer p {
    color: var(--auth-text-secondary);
    margin: 0 0 16px;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -3px;
    left: 0;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.auth-footer a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(var(--auth-primary-rgb), 0.5);
}

.auth-footer a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.auth-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-text-secondary) !important;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500 !important;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.auth-home-link:hover {
    color: var(--auth-text) !important;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    text-shadow: none !important;
}

.auth-home-link::after { display: none !important; }

/* ── Responsive ── */
@media (max-width: 520px) {
    .auth-wrapper {
        padding: 16px;
        max-width: 100%;
    }
    .auth-glass-panel {
        padding: 36px 24px;
        border-radius: 22px;
    }
    .auth-brand { font-size: 2rem; }
    .auth-title { font-size: 1.5rem; }
    .auth-form-row {
        flex-direction: column;
        gap: 0;
    }
    .shape { display: none; }
}

@media (max-width: 360px) {
    .auth-glass-panel {
        padding: 28px 18px;
    }
}

/* ── Password Toggle (future enhancement) ── */
.auth-password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
}

/* ── Loading State ── */
.auth-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.auth-btn.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg, 
        transparent 30%, 
        rgba(255,255,255,0.15) 50%, 
        transparent 70%);
    animation: loadingSweep 1.5s ease-in-out infinite;
}

@keyframes loadingSweep {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
