/* ============================================
   LOGIN / REGISTER PAGE — STYLES
   ============================================ */

/* Page Layout */
.login-page {
    min-height: 100dvh;
    min-height: 100vh; /* Fallback */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 24px;
    padding-top: 16px;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Background Orbs */
.login-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.login-ambient .ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.6;
}

.login-ambient .orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(255, 77, 109, 0.12);
    top: -10%;
    left: -10%;
    animation: login-orb-float 12s ease-in-out infinite;
}

.login-ambient .orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(255, 143, 163, 0.1);
    bottom: -10%;
    right: -10%;
    animation: login-orb-float 14s ease-in-out infinite reverse;
}

.login-ambient .orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(255, 77, 109, 0.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: login-orb-pulse 10s ease-in-out infinite;
}

@keyframes login-orb-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

@keyframes login-orb-pulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.15); }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

/* Back button */
.auth-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 4px 0;
    margin-bottom: 6px;
    transition: color 0.25s, transform 0.25s;
    text-decoration: none;
}

.auth-back-btn:hover {
    color: var(--foreground);
    transform: translateX(-4px);
}

/* Logo Area */
.auth-logo {
    text-align: center;
    margin-bottom: 10px;
}

.auth-logo-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 77, 109, 0.12);
    border: 1px solid rgba(255, 77, 109, 0.25);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    position: relative;
}

.auth-logo-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(255, 77, 109, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: auth-glow-pulse 3s ease-in-out infinite;
}

@keyframes auth-glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.auth-logo p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Auth Card */
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 77, 109, 0.3), transparent);
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 20px;
}

.auth-tab-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted-foreground);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.auth-tab-btn.active {
    background: rgba(255, 77, 109, 0.15);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 77, 109, 0.15);
}

.auth-tab-btn:hover:not(.active) {
    color: var(--foreground);
    background: rgba(255, 255, 255, 0.04);
}

/* Google Button */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--foreground);
    font-size: 0.925rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.auth-google-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.08), rgba(234, 67, 53, 0.08), rgba(251, 188, 5, 0.08), rgba(52, 168, 83, 0.08));
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-google-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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

.auth-google-btn svg {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

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

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.auth-divider-text {
    color: var(--muted-foreground);
    font-size: 0.8rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Auth Form */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.auth-form.active {
    display: flex;
}

.auth-form-group + .auth-form-group {
    margin-top: -4px;
}

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

.auth-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.auth-form-label i,
.auth-form-label svg {
    color: var(--primary);
    opacity: 0.7;
}

/* Input wrapper */
.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--foreground);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.auth-input:focus {
    border-color: rgba(255, 77, 109, 0.5);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.1), 0 0 20px rgba(255, 77, 109, 0.05);
}

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

.auth-input-wrapper .password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.auth-input-wrapper .password-toggle:hover {
    color: var(--foreground);
}

.auth-input-wrapper .auth-input {
    padding-right: 44px;
}

/* Submit Button */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 14px rgba(255, 77, 109, 0.35);
    margin-top: 4px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 77, 109, 0.5);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.auth-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.6s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* Error / Success Messages */
.auth-message {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

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

.auth-message-error::before {
    content: '⚠️';
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-message-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

/* Forgot password */
.auth-forgot-link {
    text-align: right;
    margin-top: -8px;
}

.auth-forgot-link a {
    font-size: 0.8rem;
    color: var(--primary);
    opacity: 0.8;
    transition: opacity 0.2s;
    text-decoration: none;
}

.auth-forgot-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Footer note */
.auth-footer-note {
    text-align: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
}

.auth-footer-note p {
    color: var(--muted-foreground);
    font-size: 0.8rem;
    line-height: 1.6;
}

.auth-footer-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer-note a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 540px) {
    .login-page {
        padding: 16px;
        align-items: flex-start;
        padding-top: 48px;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .auth-logo-icon {
        width: 60px;
        height: 60px;
        border-radius: 18px;
    }

    .auth-logo h1 {
        font-size: 1.5rem;
    }

    .auth-tabs {
        border-radius: 12px;
    }

    .auth-tab-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .auth-google-btn {
        padding: 12px 16px;
        font-size: 0.875rem;
    }

    .auth-input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .auth-submit-btn {
        padding: 13px 20px;
        font-size: 0.95rem;
    }
}

/* ============================================
   PASSWORD STRENGTH INDICATOR (optional visual)
   ============================================ */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.password-strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s;
}

.password-strength-bar.weak { background: #ef4444; }
.password-strength-bar.medium { background: #f59e0b; }
.password-strength-bar.strong { background: #10b981; }

/* ============================================
   FLOATING HEARTS CANVAS  
   ============================================ */
.login-page #love-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   # ACESSIBILIDADE: prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
