/* Auth Pages (Sign Up / Sign In) — matches early-access aesthetic */

/* Font override (Outfit + Space Mono) */
html, body {
    height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ── Animated gradient mesh background ── */
.gradient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-move {
    width: 600px;
    height: 600px;
    background: var(--move);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-fuel {
    width: 500px;
    height: 500px;
    background: var(--fuel);
    top: 50%;
    right: -150px;
    animation-delay: -5s;
}

.orb-rest {
    width: 450px;
    height: 450px;
    background: var(--rest);
    bottom: -100px;
    left: 30%;
    animation-delay: -10s;
}

.orb-rise {
    width: 550px;
    height: 550px;
    background: var(--rise);
    bottom: 20%;
    left: -200px;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* Noise texture */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 2rem;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.back-link {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* ── Main content ── */
.main {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    max-width: none;
}

.container {
    width: 100%;
    max-width: 480px;
}

/* Pillar dots */
.pillar-dots {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
    justify-content: center;
}

.pillar-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.pillar-dot:nth-child(1) { background: var(--move); animation-delay: 0s; }
.pillar-dot:nth-child(2) { background: var(--fuel); animation-delay: 0.3s; }
.pillar-dot:nth-child(3) { background: var(--rest); animation-delay: 0.6s; }
.pillar-dot:nth-child(4) { background: var(--rise); animation-delay: 0.9s; }

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

/* ── Heading ── */
.heading {
    text-align: center;
    margin-bottom: 0.75rem;
}

.heading h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.25rem, 5.5vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
}

.heading h1 span {
    background: linear-gradient(135deg, var(--move), var(--rise));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 380px;
    margin: 0 auto 2rem;
    text-align: center;
    line-height: 1.6;
}

/* ── Auth card ── */
.auth-card {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    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,255,255,0.1), transparent);
}

/* ── OAuth buttons ── */
.auth-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.95rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--control-bg);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,90,90,0.08), rgba(155,126,200,0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-button:hover {
    border-color: var(--chart-card-border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.auth-button:active {
    transform: translateY(0);
}

.auth-button svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

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

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

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

.input-group {
    position: relative;
}

.input-group label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    background: var(--control-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: var(--chart-text-faint);
}

.input-group input:focus {
    outline: none;
    border-color: var(--rise);
    background: rgba(155, 126, 200, 0.05);
    box-shadow: 0 0 0 4px rgba(155, 126, 200, 0.1);
}

/* Forgot password */
.forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.25rem;
}

.forgot-link {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--rise);
    text-decoration: none;
}

/* ── Submit button ── */
.submit-btn {
    margin-top: 0.5rem;
    padding: 1.1rem 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--move), var(--rise));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--rise), var(--fuel));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(155, 126, 200, 0.3);
}

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

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

.submit-btn:active {
    transform: translateY(0);
}

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

.submit-btn:disabled:hover {
    box-shadow: none;
}

/* ── Auth footer (switch link) ── */
.auth-switch {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--rise);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ── Privacy note ── */
.privacy {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.privacy a {
    color: var(--rise);
    text-decoration: none;
}

.privacy a:hover {
    text-decoration: underline;
}

/* ── Features preview ── */
.features-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.preview-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.preview-item:nth-child(1) svg { stroke: var(--move); }
.preview-item:nth-child(2) svg { stroke: var(--fuel); }
.preview-item:nth-child(3) svg { stroke: var(--rest); }
.preview-item:nth-child(4) svg { stroke: var(--rise); }

/* ── Footer overrides ── */
.footer {
    position: relative;
    z-index: 10;
}

.footer-social a {
    color: var(--chart-text-faint);
}

.footer-copy {
    color: var(--chart-text-faint);
}

/* ── Password Reset Modal ── */
.reset-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-card {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

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

.reset-card h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.reset-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.reset-card .input-group {
    margin-bottom: 1.25rem;
}

.reset-actions {
    display: flex;
    gap: 0.75rem;
}

.reset-actions button {
    flex: 1;
    padding: 0.85rem;
    border-radius: 10px;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-cancel {
    background: var(--control-bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.reset-cancel:hover {
    background: var(--overlay-active);
    border-color: var(--chart-card-border-hover);
}

.reset-send {
    background: linear-gradient(135deg, var(--move), var(--rise));
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.reset-send::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--rise), var(--fuel));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reset-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(155, 126, 200, 0.3);
}

.reset-send:hover::before {
    opacity: 1;
}

.reset-send span {
    position: relative;
    z-index: 1;
}

/* ── Light Theme ── */
[data-theme="light"] .gradient-orb {
    opacity: 0.15;
}

[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}

[data-theme="light"] .auth-card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
}

[data-theme="light"] .auth-button:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

[data-theme="light"] .reset-overlay {
    background: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .reset-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-elevated);
}

[data-theme="light"] .reset-card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
}

[data-theme="light"] .noise-overlay {
    opacity: 0.015;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .nav {
        padding: 1rem;
    }

    .main {
        padding: 5rem 1.25rem 2rem;
    }

    .auth-card {
        padding: 1.75rem;
    }

    .features-preview {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .pillar-dots {
        gap: 8px;
    }

    .pillar-dot {
        width: 10px;
        height: 10px;
    }

    .heading h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .submit-btn {
        font-size: 0.85rem;
        padding: 1rem 1.5rem;
    }
}
