/* ========================================
   Auth Screen - Floating Card Design
======================================== */

/* Hide starfield elements */
.auth-stars,
.auth-stars2 {
    display: none;
}

.auth-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Subtle radial gradient for depth */
[data-theme="dark"] .auth-screen {
    background: radial-gradient(ellipse at 50% 0%, #0f172a 0%, var(--bg-base) 70%);
}

.auth-screen.hidden {
    display: none;
}

/* ========================================
   Auth Container - Centered Content
======================================== */
.auth-container {
    width: 100%;
    max-width: 360px;
    padding: var(--space-8);
    background: transparent;
    position: relative;
    z-index: 1;
}

/* ========================================
   Auth Header
======================================== */
.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-brand {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: var(--space-4);
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   Auth Tabs - Minimal Toggle
======================================== */
.auth-tabs {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    justify-content: center;
}

.auth-tab {
    padding: var(--space-2) 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    transition: var(--transition-fast);
    position: relative;
}

.auth-tab:hover {
    color: var(--text-secondary);
}

.auth-tab.active {
    color: var(--accent);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

/* ========================================
   Auth Form
======================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.auth-form.hidden {
    display: none;
}

/* Form Fields */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-field input {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-hover);
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

[data-theme="dark"] .auth-field input {
    background: rgba(255, 255, 255, 0.03);
}

.auth-field input:focus {
    background: var(--bg-active);
}

[data-theme="dark"] .auth-field input:focus {
    background: rgba(255, 255, 255, 0.06);
}

.auth-field input::placeholder {
    color: var(--text-placeholder);
}

/* Privacy Policy Checkbox */
.auth-privacy-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-privacy-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--accent);
    cursor: pointer;
}

.auth-privacy-check label {
    cursor: pointer;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-secondary);
}

.auth-privacy-check a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-privacy-check a:hover {
    opacity: 0.8;
}

/* Error Message */
.auth-error {
    padding: var(--space-3) var(--space-4);
    background: var(--destructive-subtle);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--destructive);
}

.auth-error.hidden {
    display: none;
}

.auth-success {
    padding: var(--space-3) var(--space-4);
    background: rgba(34, 197, 94, 0.1);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #22c55e;
}

.auth-success.hidden {
    display: none;
}

/* ========================================
   Submit Button
======================================== */
.auth-submit-btn {
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-full);
    background: var(--accent);
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    transition: var(--transition-fast);
}

.auth-submit-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Forgot Password Link
======================================== */
.auth-forgot {
    text-align: right;
    margin-top: -8px;
}

.auth-forgot button {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-forgot button:hover {
    color: var(--accent);
}

/* Back-to-login ghost button inside forgot/reset panels */
.auth-back-btn {
    background: none;
    border: none;
    padding: var(--space-2) 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: var(--transition-fast);
}

.auth-back-btn:hover {
    color: var(--text-secondary);
}

/* ========================================
   Divider
======================================== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bg-hover), transparent);
}

.auth-divider span {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ========================================
   Google Button
======================================== */
.auth-google-btn {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-full);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    transition: var(--transition-fast);
}

.auth-google-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.auth-google-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Theme Toggle
======================================== */
.auth-theme-toggle {
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    z-index: 10;
    transition: var(--transition-fast);
}

.auth-theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.auth-theme-toggle svg {
    width: 20px;
    height: 20px;
}

.auth-theme-toggle .sun-icon { display: block; }
.auth-theme-toggle .moon-icon { display: none; }
[data-theme="light"] .auth-theme-toggle .sun-icon { display: none; }
[data-theme="light"] .auth-theme-toggle .moon-icon { display: block; }

/* ========================================
   Responsive
======================================== */
@media (max-width: 480px) {
    .auth-container {
        margin: var(--space-3);
        padding: var(--space-5);
        border-radius: var(--radius-lg);
    }

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

    .auth-header {
        margin-bottom: var(--space-6);
    }

    .auth-field input {
        min-height: 48px;
        font-size: 16px;
        padding: var(--space-3) var(--space-4);
    }

    .auth-submit-btn {
        min-height: 52px;
        font-size: 16px;
    }

    .auth-google-btn {
        min-height: 52px;
        font-size: 15px;
    }

    .auth-tab {
        min-height: 44px;
        font-size: 15px;
    }

    .auth-theme-toggle {
        width: 44px;
        height: 44px;
    }
}
