/* ═══════════════════════════════════════
   ULTRA MODERN AUTH — Chethi Batik 2026
   Mesh Gradients & Soft Glassmorphism
   ═══════════════════════════════════════ */

:root {
    --auth-bg: #f8f9fa;
    --auth-accent: #D32F2F;
    --auth-text: #1a1a1a;
    --auth-glass: rgba(255, 255, 255, 0.85);
    --auth-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem var(--pad); /* Increased top/bottom padding for breathing room */
    background-color: var(--auth-bg);
    position: relative;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Modern Mesh Gradient Background with Animated Blobs */
.auth-page::before {
    content: '';
    position: fixed; /* Fixed so it doesn't affect page height */
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 70% 30%, rgba(211, 47, 47, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 30% 70%, rgba(211, 47, 47, 0.08) 0%, transparent 35%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 1) 0%, transparent 50%);
    z-index: 1;
    animation: meshRotate 40s infinite linear;
}

/* Red Pulsing Blobs (Simple Animation) */
.auth-bg-blobs {
    position: fixed; /* Fixed so they stay in viewport while scrolling */
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 40vh;
    height: 40vh;
    background: rgba(211, 47, 47, 0.08); /* Slightly more visible */
    filter: blur(100px);
    border-radius: 50%;
    animation: blobFloat 15s infinite ease-in-out;
}

.blob-1 { top: 10%; left: -5%; animation-delay: 0s; }
.blob-2 { bottom: 5%; right: -5%; width: 50vh; height: 50vh; background: rgba(211, 47, 47, 0.06); animation-delay: -3s; }

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(100px, 50px) scale(1.2) rotate(10deg); }
    66% { transform: translate(-50px, 120px) scale(0.9) rotate(-10deg); }
}

@keyframes meshRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

/* Floating Glass Card */
.auth-card {
    background: var(--auth-glass);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 3rem 2.8rem;
    box-shadow: var(--auth-shadow);
    transition: transform 0.4s var(--ease);
}

.auth-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    height: 75px;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.05));
    transition: transform 0.3s var(--ease);
}

.auth-logo:hover {
    transform: scale(1.05);
}

/* Tab Switcher */
.auth-tabs {
    display: flex;
    background: rgba(0,0,0,0.03);
    padding: 0.4rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    position: relative;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s;
    user-select: none;
}

.auth-tab.active {
    color: var(--auth-text);
}

.auth-tab-slider {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    width: calc(50% - 0.4rem);
    height: calc(100% - 0.8rem);
    background: #fff;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.auth-tab.register.active ~ .auth-tab-slider {
    transform: translateX(100%);
}

/* Top Titles */
.auth-titles {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-titles h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.auth-titles p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Forms Container */
.auth-forms-wrap {
    position: relative;
    overflow: hidden;
    transition: height 0.5s var(--ease);
}

.auth-form {
    transition: all 0.5s var(--ease);
}

.auth-form.hidden {
    position: absolute;
    top: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
}

/* Form Row Grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

/* Inputs Refined */
.form-group {
    margin-bottom: 1.6rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.6rem;
    margin-left: 0.2rem;
}

.input-wrap {
    position: relative;
}

.input-wrap i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 1rem 1.2rem 1rem 3.2rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--auth-text);
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 5px rgba(211, 47, 47, 0.05);
    outline: none;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

/* Primary Button */
.auth-btn {
    width: 100%;
    padding: 1.1rem;
    background: var(--auth-accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.auth-btn:hover {
    background: #b12727;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(211, 47, 47, 0.2);
}

/* Secondary Actions */
.auth-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.2rem;
    font-size: 0.85rem;
}

.auth-extra a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-extra label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Social Logins Modern */
.social-login {
    margin-top: 3rem;
    text-align: center;
}

.social-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-title::before, .social-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,0.05);
}

.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-text);
    text-decoration: none;
    transition: all 0.3s;
}

.social-item:hover {
    background: var(--auth-bg);
    border-color: rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.social-item img {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 500px) {
    .auth-card {
        padding: 2.5rem 1.8rem;
    }
    .auth-titles h1 {
        font-size: 2rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
