/* ═══════════════════════════════════════════
   Primal Auth Screen – Premium Dark UI
   ═══════════════════════════════════════════ */

#auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clr-bg);
    background:
        radial-gradient(ellipse 80% 60% at 50% 120%, rgba(16, 185, 129, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 0%, rgba(16, 185, 129, 0.06) 0%, transparent 60%),
        var(--clr-bg);
    overflow: hidden;
}

/* ─── Card ─── */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-surface-light);
    border-radius: 24px;
    padding: 48px 40px 40px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(16, 185, 129, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    opacity: 0;
    transform: translateY(32px) scale(0.96);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.auth-card.exit {
    opacity: 0;
    transform: translateY(-20px) scale(1.02);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ─── Logo ─── */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}
.auth-logo i {
    font-size: 36px;
    color: var(--clr-primary);
    filter: drop-shadow(0 0 12px var(--clr-primary-glow));
    animation: leafPulse 3s ease-in-out infinite;
}
.auth-logo span {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 30%, var(--clr-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes leafPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.08) rotate(-5deg); }
}

/* ─── Heading ─── */
.auth-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--clr-text);
}
.auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--clr-text-muted);
    margin-bottom: 28px;
}

/* ─── Error Banner ─── */
.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
    transition: opacity 0.2s;
}
.auth-error.hidden {
    display: none;
}
.auth-error.shake {
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

/* ─── Google Sign-In Button ─── */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    background: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #1f2937;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-google-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #f8f8f8;
}
.auth-google-btn:active {
    transform: translateY(0);
}
.auth-google-btn svg {
    flex-shrink: 0;
}

/* ─── Divider ─── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--clr-surface-light);
}
.auth-divider span {
    font-size: 13px;
    color: var(--clr-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Form ─── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-wrapper i {
    position: absolute;
    left: 14px;
    font-size: 18px;
    color: var(--clr-text-muted);
    transition: color 0.2s;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--clr-bg);
    border: 1.5px solid var(--clr-surface-light);
    border-radius: 12px;
    color: var(--clr-text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-input::placeholder {
    color: rgba(156, 163, 175, 0.5);
}
.auth-input:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px var(--clr-primary-glow);
    background: rgba(11, 15, 12, 0.8);
}
.auth-input:focus + i,
.auth-input-wrapper:focus-within i {
    color: var(--clr-primary);
}

/* ─── Submit Button ─── */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    margin-top: 4px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 4px 20px var(--clr-primary-glow);
    position: relative;
    overflow: hidden;
}
.auth-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 60%);
    border-radius: inherit;
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.35);
    filter: brightness(1.1);
}
.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px var(--clr-primary-glow);
}
.auth-btn i {
    font-size: 18px;
    transition: transform 0.2s;
}
.auth-btn:hover i {
    transform: translateX(4px);
}

/* ─── Switch Link ─── */
.auth-switch {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: var(--clr-text-muted);
}
.auth-switch a {
    color: var(--clr-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-switch a:hover {
    color: var(--clr-primary-light);
    text-decoration: underline;
}

/* ─── Floating Particles ─── */
.auth-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.auth-particles span {
    position: absolute;
    display: block;
    width: 6px;
    height: 6px;
    background: var(--clr-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 6s ease-in-out infinite;
}
.auth-particles span:nth-child(1) { left: 10%; animation-delay: 0s; }
.auth-particles span:nth-child(2) { left: 25%; animation-delay: 0.8s; width: 4px; height: 4px; }
.auth-particles span:nth-child(3) { left: 45%; animation-delay: 1.6s; width: 5px; height: 5px; }
.auth-particles span:nth-child(4) { left: 65%; animation-delay: 2.4s; }
.auth-particles span:nth-child(5) { left: 80%; animation-delay: 3.2s; width: 4px; height: 4px; }
.auth-particles span:nth-child(6) { left: 15%; animation-delay: 4s; width: 3px; height: 3px; }
.auth-particles span:nth-child(7) { left: 55%; animation-delay: 4.8s; width: 5px; height: 5px; }
.auth-particles span:nth-child(8) { left: 90%; animation-delay: 5.6s; width: 4px; height: 4px; }

@keyframes particleFloat {
    0% { bottom: -10px; opacity: 0; transform: translateX(0); }
    10% { opacity: 0.4; }
    50% { opacity: 0.15; transform: translateX(20px); }
    90% { opacity: 0; }
    100% { bottom: 100%; opacity: 0; transform: translateX(-10px); }
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .auth-card {
        margin: 16px;
        padding: 36px 24px 32px;
        border-radius: 20px;
    }
    .auth-logo i { font-size: 28px; }
    .auth-logo span { font-size: 26px; }
    .auth-title { font-size: 20px; }
}
