/* ═══════════════════════════════════════════════════════════════
   Astrology Onboarding Flow — Styles
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── Reset & Base ─────────────────────────────────────────────── */
.aof-wrap * { box-sizing: border-box; margin: 0; padding: 0; }

.aof-wrap {
    position: relative;
    width: 100%;
    min-height: 100svh;
    background: linear-gradient(160deg, #0d0621 0%, #1a0a3d 40%, #0d1b4b 100%);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: #fff;
}

/* Stars background */
.aof-wrap::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,.5) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 50% 60%, rgba(255,255,255,.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 90%, rgba(255,255,255,.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 70% 75%, rgba(255,255,255,.5) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── Progress Bar ─────────────────────────────────────────────── */
.aof-progress-wrap {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,.1);
    z-index: 100;
}
.aof-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #f0a500);
    border-radius: 0 2px 2px 0;
    transition: width .4s ease;
    width: 16.6%;
}

/* ── Back Button ──────────────────────────────────────────────── */
.aof-back {
    position: fixed;
    top: 16px; left: 16px;
    z-index: 101;
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background .2s;
}
.aof-back:hover { background: rgba(255,255,255,.2); }

/* ── Steps ────────────────────────────────────────────────────── */
.aof-step {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 72px 28px 40px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .4s;
    z-index: 1;
    min-height: 100svh;
}
.aof-step.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}
.aof-step.exit {
    opacity: 0;
    transform: translateX(-100%);
}

/* ── Step Inner ───────────────────────────────────────────────── */
.aof-step-inner { flex: 1; display: flex; flex-direction: column; }

/* ── Icon ─────────────────────────────────────────────────────── */
.aof-icon {
    font-size: 48px;
    margin-bottom: 24px;
    display: block;
    animation: aof-float 3s ease-in-out infinite;
}
@keyframes aof-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* ── Typography ───────────────────────────────────────────────── */
.aof-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 7vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.aof-subtitle {
    font-size: 15px;
    font-weight: 300;
    color: rgba(255,255,255,.6);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* ── Input ────────────────────────────────────────────────────── */
.aof-field-wrap { position: relative; width: 100%; }

.aof-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    padding: 12px 0;
    outline: none;
    transition: border-color .3s;
    -webkit-appearance: none;
}
.aof-input::placeholder { color: rgba(255,255,255,.3); }
.aof-input:focus { border-bottom-color: #a78bfa; }

/* Time input specific */
.aof-time-input { font-size: 32px; letter-spacing: 2px; text-align: center; padding: 16px 0; }
.aof-time-input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; }

/* ── Date Selects ─────────────────────────────────────────────── */
.aof-date-row { display: flex; gap: 12px; width: 100%; }
.aof-date-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.aof-date-label { font-size: 11px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: 1px; }

.aof-select {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    padding: 14px 10px;
    width: 100%;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.aof-select:focus { border-color: #a78bfa; background: rgba(167,139,250,.1); }
.aof-select option { background: #1a0a3d; color: #fff; }

/* ── Unsure Button ────────────────────────────────────────────── */
.aof-unsure-btn {
    margin-top: 24px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 30px;
    color: rgba(255,255,255,.7);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    padding: 12px 20px;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
}
.aof-unsure-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ── Bottom Button ────────────────────────────────────────────── */
.aof-bottom { padding-top: 24px; }

.aof-btn {
    width: 100%;
    min-height: 56px;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 17px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    letter-spacing: .3px;
}
.aof-btn:disabled { opacity: .35; cursor: default; }
.aof-btn:not(:disabled):active { transform: scale(.97); }
.aof-btn:not(:disabled):hover { opacity: .9; }

/* ── Social Button ────────────────────────────────────────────── */
.aof-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-decoration: none;
    transition: opacity .2s, transform .1s;
    margin-bottom: 8px;
}
.aof-google-btn {
    background: #fff;
    color: #1a1a1a;
}
.aof-google-btn:hover { opacity: .92; }

/* ── Divider ──────────────────────────────────────────────────── */
.aof-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: rgba(255,255,255,.3);
    font-size: 13px;
}
.aof-divider::before,
.aof-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.15);
}

/* ── Error ────────────────────────────────────────────────────── */
.aof-error {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(239,68,68,.15);
    border: 1px solid rgba(239,68,68,.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Terms ────────────────────────────────────────────────────── */
.aof-terms {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,.3);
    margin-top: 14px;
    line-height: 1.5;
}
.aof-terms a { color: rgba(167,139,250,.8); text-decoration: none; }

/* ── Loader ───────────────────────────────────────────────────── */
.aof-loader-wrap {
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100svh - 72px);
}
.aof-loader-text {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: #c4b5fd;
    margin-top: 40px;
    animation: aof-pulse 2s ease-in-out infinite;
}
.aof-loader-sub {
    font-size: 14px;
    color: rgba(255,255,255,.4);
    margin-top: 8px;
}
@keyframes aof-pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .5; }
}

/* ── Solar System Loader ──────────────────────────────────────── */
.aof-solar-system {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}
.aof-sun {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    font-size: 36px;
    animation: aof-spin-slow 20s linear infinite;
}
.aof-orbit {
    position: absolute;
    top: 50%; left: 50%;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    transform: translate(-50%,-50%);
}
.aof-orbit-1 { width: 80px;  height: 80px;  animation: aof-spin 3s linear infinite; }
.aof-orbit-2 { width: 120px; height: 120px; animation: aof-spin 5s linear infinite reverse; }
.aof-orbit-3 { width: 160px; height: 160px; animation: aof-spin 8s linear infinite; }

.aof-planet {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
}

@keyframes aof-spin {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}
@keyframes aof-spin-slow {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}

/* ── Autocomplete dropdown ────────────────────────────────────── */
.pac-container {
    background: #1a0a3d !important;
    border: 1px solid rgba(167,139,250,.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
    font-family: 'Inter', sans-serif !important;
    margin-top: 4px !important;
}
.pac-item {
    color: rgba(255,255,255,.8) !important;
    border-top: 1px solid rgba(255,255,255,.05) !important;
    padding: 10px 14px !important;
    cursor: pointer !important;
}
.pac-item:hover, .pac-item-selected { background: rgba(167,139,250,.15) !important; }
.pac-item-query { color: #fff !important; font-size: 15px !important; }
.pac-matched { color: #a78bfa !important; }
.pac-icon { display: none !important; }

/* ── Mobile safe area ─────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .aof-bottom { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ── Hide theme header/footer on onboarding page ──────────────── */
body.aof-page .site-header,
body.aof-page header,
body.aof-page .site-footer,
body.aof-page footer,
body.aof-page #masthead,
body.aof-page #colophon { display: none !important; }

body.aof-page { overflow: hidden; }

/* ══════════════════════════════════════════════════════════════
   Popup Modal
   ══════════════════════════════════════════════════════════════ */

/* Trigger button */
.aof-popup-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    letter-spacing: .3px;
}
.aof-popup-trigger:hover  { opacity: .9; }
.aof-popup-trigger:active { transform: scale(.97); }

/* Overlay */
.aof-popup-hidden { display: none !important; }

#aof-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(6px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: aof-overlay-in .25s ease;
}

@keyframes aof-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal */
#aof-popup-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 90svh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 24px;
    background: linear-gradient(160deg, #0d0621 0%, #1a0a3d 40%, #0d1b4b 100%);
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    animation: aof-modal-in .3s cubic-bezier(.4,0,.2,1);
    scrollbar-width: none;
}
#aof-popup-modal::-webkit-scrollbar { display: none; }

@keyframes aof-modal-in {
    from { opacity: 0; transform: translateY(40px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close button */
#aof-popup-close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 10;
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background .2s;
}
#aof-popup-close:hover { background: rgba(255,255,255,.2); }

/* Popup inner wrap — override standalone styles */
#aof-popup-content .aof-wrap {
    position: relative;
    min-height: auto;
    overflow: hidden;
}
#aof-popup-content .aof-step {
    position: relative;
    transform: none;
    min-height: auto;
    padding: 60px 24px 32px;
}
#aof-popup-content .aof-step.active {
    display: flex;
}
#aof-popup-content .aof-step:not(.active) {
    display: none;
}
#aof-popup-content .aof-progress-wrap {
    border-radius: 24px 24px 0 0;
}
#aof-popup-content .aof-back {
    position: absolute;
    top: 16px; left: 16px;
}

/* Mobile: full-screen popup on small screens */
@media (max-width: 480px) {
    #aof-popup-overlay { padding: 0; align-items: flex-end; }
    #aof-popup-modal {
        max-width: 100%;
        max-height: 95svh;
        border-radius: 24px 24px 0 0;
        animation: aof-modal-in-mobile .35s cubic-bezier(.4,0,.2,1);
    }
    @keyframes aof-modal-in-mobile {
        from { opacity: 0; transform: translateY(100%); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* ── Gender Buttons ───────────────────────────────────────────── */
.aof-gender-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}
.aof-gender-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    background: rgba(255,255,255,.06);
    border: 2px solid rgba(255,255,255,.12);
    border-radius: 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    text-align: left;
}
.aof-gender-btn:hover {
    background: rgba(167,139,250,.15);
    border-color: rgba(167,139,250,.4);
}
.aof-gender-btn.selected {
    background: rgba(167,139,250,.2);
    border-color: #a78bfa;
}
.aof-gender-icon {
    font-size: 22px;
    width: 44px; height: 44px;
    background: rgba(255,255,255,.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.aof-gender-btn.selected .aof-gender-icon {
    background: rgba(167,139,250,.25);
}
.aof-gender-label { flex: 1; }
