*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: #09090b; color: #e4e4e7;
    min-height: 100vh; display: flex; flex-direction: column;
    position: relative; overflow-x: hidden;
}
body::before {
    content: ''; position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139,92,246,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 20% 90%, rgba(139,92,246,0.08) 0%, transparent 60%);
    pointer-events: none;
}
body::after {
    content: ''; position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px; pointer-events: none;
}

.auth-wrapper {
    width: 100%; max-width: 440px; padding: 1.5rem;
    position: relative; z-index: 1;
    animation: fadeUp 0.45s ease both; align-self: center; margin: auto;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo-link {
    display: flex; align-items: center; justify-content: center;
    gap: 0.6rem; margin-bottom: 2rem; text-decoration: none;
}
.logo-icon { width: 28px; height: 28px; stroke: #8b5cf6; }
.logo-text { font-size: 1.2rem; font-weight: 700; color: #e4e4e7; letter-spacing: -0.02em; }

.auth-card {
    background: #111113; border: 1px solid #27272a;
    border-radius: 16px; padding: 2rem; box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; color: #f4f4f5; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.auth-card .subtitle { font-size: 0.875rem; color: #71717a; margin-bottom: 1.75rem; }

.field { margin-bottom: 1rem; }
.field label {
    display: block; font-size: 0.8rem; font-weight: 500; color: #a1a1aa;
    margin-bottom: 0.45rem; letter-spacing: 0.02em; text-transform: uppercase;
}
.field input {
    width: 100%; padding: 0.75rem 1rem;
    background: #18181b; border: 1px solid #27272a; border-radius: 8px;
    color: #e4e4e7; font-size: 0.95rem; font-family: inherit;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none; min-height: 44px;
}
.field input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.field input::placeholder { color: #52525b; }
.field input.invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }

.field-row-2 {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.75rem; margin-bottom: 1rem;
}
.field-row-2 .field { margin-bottom: 0; }

.strength-bar { height: 3px; background: #27272a; border-radius: 2px; margin-top: 0.5rem; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; width: 0%; transition: width 0.3s, background 0.3s; }
.strength-label { font-size: 0.72rem; color: #52525b; margin-top: 0.3rem; }

.error-msg {
    display: none; padding: 0.7rem 1rem;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.35);
    border-radius: 8px; color: #f87171; font-size: 0.875rem; margin-bottom: 1.1rem;
}
.success-msg {
    display: none; padding: 0.7rem 1rem;
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.35);
    border-radius: 8px; color: #4ade80; font-size: 0.875rem; margin-bottom: 1.1rem;
}

.terms-row { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.25rem; }
.terms-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #8b5cf6; margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.terms-row label { font-size: 0.8rem; color: #71717a; line-height: 1.55; cursor: pointer; }
.terms-row a { color: #8b5cf6; text-decoration: none; }
.terms-row a:hover { text-decoration: underline; }

.btn-submit {
    width: 100%; padding: 0.8rem; background: #8b5cf6; color: #fff; border: none;
    border-radius: 8px; font-size: 0.95rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 46px;
}
.btn-submit:hover  { background: #7c3aed; box-shadow: 0 4px 20px rgba(139,92,246,0.35); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.spinner {
    display: none; width: 16px; height: 16px; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 1.5rem 0; color: #3f3f46; font-size: 0.8rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #27272a; }

.auth-footer { text-align: center; font-size: 0.875rem; color: #71717a; }
.auth-footer a { color: #8b5cf6; text-decoration: none; font-weight: 500; }
.auth-footer a:hover { color: #a78bfa; text-decoration: underline; }

.back-home {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    margin-top: 1.5rem; font-size: 0.8rem; color: #52525b;
    text-decoration: none; transition: color 0.2s; min-height: 36px;
}
.back-home:hover { color: #a1a1aa; }
.back-home svg { width: 14px; height: 14px; }

/* Verify screen */
#verifyScreen { display: none; animation: fadeUp 0.45s ease both; }
.verify-icon {
    width: 64px; height: 64px; background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem;
}
.verify-icon svg { width: 30px; height: 30px; stroke: #8b5cf6; }
.verify-email-display {
    background: #18181b; border: 1px solid #27272a; border-radius: 8px;
    padding: 0.65rem 1rem; font-size: 0.9rem; color: #a78bfa; font-weight: 500;
    text-align: center; margin: 1rem 0 1.5rem; word-break: break-all;
}
.verify-steps { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.75rem; }
.verify-step { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.85rem; color: #71717a; }
.step-num {
    width: 20px; height: 20px; background: rgba(139,92,246,0.15);
    border: 1px solid rgba(139,92,246,0.3); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: #a78bfa; flex-shrink: 0; margin-top: 1px;
}
.resend-row { text-align: center; font-size: 0.85rem; color: #52525b; margin-top: 1rem; }
.resend-row button {
    background: none; border: none; color: #8b5cf6; font-size: 0.85rem;
    font-family: inherit; cursor: pointer; font-weight: 500; padding: 0;
    transition: color 0.2s; min-height: 32px;
}
.resend-row button:hover { color: #a78bfa; text-decoration: underline; }
.resend-row button:disabled { color: #52525b; cursor: not-allowed; text-decoration: none; }
.resend-countdown { display: inline-block; font-size: 0.8rem; color: #52525b; }

.spam-notice {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
    border-radius: 8px; font-size: 0.78rem; color: #d97706; margin-top: 1rem;
}
.spam-notice svg { width: 14px; height: 14px; stroke: #d97706; flex-shrink: 0; }

.wrong-email { text-align: center; margin-top: 1.25rem; font-size: 0.8rem; color: #52525b; }
.wrong-email button {
    background: none; border: none; color: #71717a; font-size: 0.8rem;
    font-family: inherit; cursor: pointer; padding: 0;
    text-decoration: underline; transition: color 0.2s; min-height: 32px;
}
.wrong-email button:hover { color: #a1a1aa; }

/* Footer */
.footer-container { display: flex; justify-content: center; }
.footer-nav-links {
    list-style: none; display: flex; flex-wrap: wrap;
    gap: 0.4rem 1rem; padding: 0; margin: 0; justify-content: center;
}
.footer-nav-links li { display: inline; }
.footer-nav-links a {
    text-decoration: none; color: #52525b; font-size: 0.8rem; font-weight: 500;
    transition: color 0.2s; min-height: 32px; display: inline-flex; align-items: center;
}
.footer-nav-links a:hover { color: #a1a1aa; }

/* ============================================
   RESPONSIVE — Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .field-row-2 { grid-template-columns: 1fr; }
    .auth-wrapper { padding: 1rem; }
    .auth-card { padding: 1.5rem; }
    .auth-card h1 { font-size: 1.3rem; }
    .footer-nav-links { gap: 0.35rem 0.75rem; }
}

/* ── Social login buttons (appended from signup.html inline styles) ── */
.social-login-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.72rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s, transform 0.12s;
    border: 1px solid #27272a;
    color: #e4e4e7;
}
.btn-social:hover { transform: translateY(-1px); text-decoration: none; }
.btn-google { background: #18181b; }
.btn-google:hover { background: #232329; border-color: #4285F4; color: #e4e4e7; }
.btn-facebook { background: #18181b; }
.btn-facebook:hover { background: #232329; border-color: #1877F2; color: #e4e4e7; }
.divider-thin { height: 1px; background: #27272a; margin: 0.75rem 0; }