/* ==========================================================================
   ViralAI Authentication Module Stylesheet (Dark Luxury Theme Match)
   ========================================================================== */

.auth-body {
    background-color: #0a0c10;
    background-image: radial-gradient(circle at 50% 30%, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
    color: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-x: hidden;
    /* 5. Page fade-in transition */
    animation: pageFadeIn 0.5s ease-out forwards;
}

@keyframes pageFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.auth-container {
    width: 100%;
    /* 1. Increased card width from 440px to 480px for better breathing room */
    max-width: 480px;
    margin: 0 auto;
}

/* 4. Logo animation + 8. Card entry animation */
.auth-card {
    background: rgba(18, 21, 28, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px 40px 40px 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(18px);
    animation: authCardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo-link {
    display: inline-block;
    margin-bottom: -10px;
    text-decoration: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.auth-logo-link .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: auto;
}

/* 4. Subtle logo page-load animation (fade in, tiny float, tiny glow) */
.auth-logo-link .landing-logo-huge {
    height: 185.625px;
    width: auto;
    object-fit: contain;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    animation: logoLoadFloat 2.5s ease-in-out infinite alternate;
    transition: transform 0.3s ease, filter 0.3s ease;
}

@keyframes logoLoadFloat {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
        filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.2));
    }
    100% {
        opacity: 1;
        transform: translateY(0px) scale(1);
        filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.35));
    }
}

.auth-logo-link:hover .landing-logo-huge {
    transform: scale(1.05);
    filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.5));
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f3f4f6;
}

.optional-tag {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.75rem;
}

.form-group input {
    background: #151922;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.form-group input::placeholder {
    color: #6b7280;
}

/* 2. Stronger input focus glow */
.form-group input:focus {
    outline: none;
    border-color: #00e5ff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
    background: #181d28;
}

.form-group input.error {
    border-color: #ef4444;
}

.form-group input.success {
    border-color: #10b981;
}

.error-msg {
    font-size: 0.75rem;
    color: #ef4444;
    min-height: 14px;
}

/* Password Input Wrapper & Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toggle-password:hover {
    opacity: 1;
}

/* Password Strength Meter */
.strength-meter-container {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.strength-bars .bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #9ca3af;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #00e5ff;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link, .terms-link, .auth-footer-link a {
    color: #00e5ff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.forgot-link:hover, .terms-link:hover, .auth-footer-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 3. Button hover (lifts by 2px, stronger glow) */
.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #00e5ff, #7c3aed);
    color: #0a0c10;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.25);
    transition: all 0.25s ease;
    margin-top: 6px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 229, 255, 0.45);
    opacity: 0.95;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #0a0c10;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Divider & Social Auth */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 6px 0;
    color: #9ca3af;
    font-size: 0.8rem;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    padding: 0 12px;
}

.google-auth-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 13px 16px;
    color: #f3f4f6;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.google-auth-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.1);
}

/* Footer Link Below Card */
.auth-footer-link {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #9ca3af;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Success Banner */
.success-banner {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.success-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    color: #0a0c10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 auto 12px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.success-banner h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #10b981;
}

.success-banner p {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* 6. Modern SaaS Notification Toast Cards */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.saas-toast {
    pointer-events: auto;
    min-width: 300px;
    background: rgba(18, 21, 28, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-size: 0.9rem;
    font-weight: 500;
    color: #f3f4f6;
}

.saas-toast.success {
    border-color: rgba(16, 185, 129, 0.4);
}

.saas-toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.saas-toast.info {
    border-color: rgba(0, 229, 255, 0.4);
}

.saas-toast-icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
    }
}

/* =========================================================
   ViralAI Verification Page — Premium Centering
   ========================================================= */

.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}
/* =========================================================
   ViralAI Premium Remembered Account Card
   UI-only layer for A15.3.1 Remember Me functionality.
   ========================================================= */
.viralai-remembered-account {
    position: relative;
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid rgba(139, 92, 246, 0.42);
    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.10), transparent 34%),
        linear-gradient(145deg, rgba(139, 92, 246, 0.12), rgba(15, 23, 42, 0.78));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    animation: viralaiRememberedIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.viralai-remembered-account::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 15%, rgba(255,255,255,.035) 45%, transparent 72%);
}

.viralai-remembered-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.viralai-remembered-eyebrow {
    font-size: 10px;
    line-height: 1;
    letter-spacing: .14em;
    font-weight: 800;
    color: rgba(226, 232, 240, .58);
}

.viralai-remembered-badge {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    color: #dbeafe;
    background: rgba(34, 211, 238, .14);
    border: 1px solid rgba(34, 211, 238, .30);
    box-shadow: 0 0 18px rgba(34, 211, 238, .12);
}

.viralai-remembered-main {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin: 0;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    background: rgba(2, 6, 23, .28);
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.viralai-remembered-main:hover,
.viralai-remembered-main:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(139, 92, 246, .55);
    background: rgba(139, 92, 246, .10);
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    outline: none;
}

.viralai-remembered-avatar-wrap {
    flex: 0 0 auto;
}

.viralai-remembered-avatar {
    width: 46px;
    height: 46px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.12);
    box-shadow: 0 7px 20px rgba(0,0,0,.30);
}

.viralai-remembered-avatar-fallback {
    display: grid;
    place-items: center;
    color: #f8fafc;
    background: linear-gradient(135deg, rgba(139,92,246,.55), rgba(34,211,238,.35));
    font-size: 17px;
    font-weight: 800;
}

.viralai-remembered-identity {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.viralai-remembered-identity strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f8fafc;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
}

.viralai-remembered-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(203, 213, 225, .64);
    font-size: 11px;
    line-height: 1.2;
}

.viralai-remembered-arrow {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, rgba(139,92,246,.85), rgba(34,211,238,.62));
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 7px 18px rgba(79, 70, 229, .22);
    transition: transform .2s ease;
}

.viralai-remembered-main:hover .viralai-remembered-arrow,
.viralai-remembered-main:focus-visible .viralai-remembered-arrow {
    transform: translateX(2px);
}

.viralai-remembered-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 0 2px;
    color: rgba(148, 163, 184, .64);
    font-size: 10px;
    line-height: 1.35;
}

.viralai-remembered-forget {
    flex: 0 0 auto;
    border: 0;
    padding: 2px 0;
    background: transparent;
    color: rgba(148, 163, 184, .68);
    font: inherit;
    cursor: pointer;
    transition: color .2s ease;
}

.viralai-remembered-forget span {
    color: rgba(226, 232, 240, .82);
    font-weight: 700;
}

.viralai-remembered-forget:hover,
.viralai-remembered-forget:focus-visible {
    color: #fff;
    outline: none;
}

@keyframes viralaiRememberedIn {
    from { opacity: 0; transform: translateY(-7px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
    .viralai-remembered-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
