/* ──────────────────────────────────────────────
   LoveStack — Auth Pages CSS (Raw, No Tailwind)
   ────────────────────────────────────────────── */

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Animated Background ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start; /* Ensure card starts below nav even if viewport is small */
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a0a1e 0%, #2d1034 30%, #1a0a1e 60%, #0f0a14 100%);
    position: relative;
    overflow: hidden;
    padding: 60px 20px;
    padding-top: 22vh; /* Provides ample space below the 15vh fixed navigation bar */
    }

/* Floating orbs */
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: floatOrb 12s ease-in-out infinite;
}

.auth-page::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #e11d48, transparent);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.auth-page::after {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #f59e0b, transparent);
    bottom: -80px;
    left: -80px;
    animation-delay: 4s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Floating Hearts (decorative) ── */
.auth-hearts {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.heart-particle {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: floatUp 8s ease-in infinite;
}

.heart-particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.heart-particle:nth-child(2) { left: 25%; animation-delay: 1.5s; animation-duration: 9s; }
.heart-particle:nth-child(3) { left: 45%; animation-delay: 3s; animation-duration: 6s; }
.heart-particle:nth-child(4) { left: 65%; animation-delay: 0.5s; animation-duration: 8s; }
.heart-particle:nth-child(5) { left: 80%; animation-delay: 2s; animation-duration: 10s; }
.heart-particle:nth-child(6) { left: 90%; animation-delay: 4s; animation-duration: 7.5s; }

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ── Auth Card ── */
.auth-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(225, 29, 72, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo / Brand ── */
.auth-logo {
    text-align: center;
    margin-bottom: 8px;
}

.auth-logo .logo-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 4px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.auth-logo .logo-text {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.auth-logo .logo-text span {
    background: linear-gradient(135deg, #e11d48, #fb7185, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Title ── */
.auth-title {
    text-align: center;
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 16px;
}

.auth-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ── Form Fields (Standard Industry Labels) ── */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    position: relative;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 18px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 10;
    padding: 10px;
    margin-right: -10px;
}

.password-toggle:hover {
    color: #fb7185;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.auth-input {
    width: 100%;
    padding: 14px 18px;
    padding-right: 50px; /* Space for toggle icon */
    font-size: 15px;
    font-family: inherit;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-input:focus {
    border-color: #e11d48;
    background: rgba(225, 29, 72, 0.04);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.form-group:focus-within .form-label {
    color: #fb7185;
}

/* Ensure placeholder is visible and clean */
.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* ── Field Errors ── */
.field-errors {
    margin-top: -16px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.field-error {
    color: #fca5a5;
    font-size: 12px;
    line-height: 1.4;
}

/* ── Non-field Errors ── */
.nonfield-errors {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.nonfield-error {
    color: #fca5a5;
    font-size: 13px;
    line-height: 1.5;
}

/* ── Submit Button ── */
.auth-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d48, #be123c);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.auth-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fb7185, #e11d48);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-btn:hover::before {
    opacity: 1;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(225, 29, 72, 0.5);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.auth-btn span {
    position: relative;
    z-index: 1;
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

/* ── Auth Links ── */
.auth-links {
    text-align: center;
    margin-top: 8px;
}

.auth-link {
    color: #fb7185;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #fda4af;
    text-decoration: underline;
}

.auth-link-block {
    display: block;
    margin-bottom: 8px;
}

/* ── Messages ── */
.messages-container {
    margin-bottom: 24px;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    animation: messageSlide 0.4s ease;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.message-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.message-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

/* ── Code Input (for reset) ── */
.code-input {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 12px;
    padding: 20px 18px 10px;
    font-family: 'Courier New', monospace;
}

/* ── Password Strength Indicator ── */
.password-strength {
    margin-top: 8px;
    margin-bottom: 4px;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.strength-fill.weak { width: 33%; background: #ef4444; }
.strength-fill.medium { width: 66%; background: #f59e0b; }
.strength-fill.strong { width: 100%; background: #22c55e; }

.strength-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-input {
        padding: 14px 16px 6px;
        font-size: 14px;
    }

    .auth-btn {
        padding: 14px;
        font-size: 15px;
    }

    .code-input {
        font-size: 24px;
        letter-spacing: 8px;
    }
}
