/* ============================================================
   AI 情人夢 – 全站樣式
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:       #0f1829;
    --navy-mid:   #1a2744;
    --navy-light: #243354;
    --gold:       #f5a623;
    --gold-dark:  #d4881a;
    --blue:       #2563EB;
    --white:      #ffffff;
    --text-muted: rgba(255,255,255,0.65);
    --border:     rgba(255,255,255,0.12);
    --card-bg:    rgba(255,255,255,0.04);
    --radius:     12px;
    --font:       'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}

body {
    font-family: var(--font);
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-links li a {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.92rem;
    transition: color 0.2s;
    color: rgba(255,255,255,0.85);
}


.btn-nav-outline {
    border: 1px solid rgba(255,255,255,0.35) !important;
}
/* .btn-nav-outline:hover { border-color: var(--white) !important; } */

/* .btn-nav-solid {
    background: #d3718b !important;
    color: #fff !important;
} */

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(37,99,235,0.18) 0%, transparent 60%),
        linear-gradient(to bottom, rgba(15,24,41,0.55) 0%, rgba(15,24,41,0.85) 100%);
    z-index: 1;
}

/* Animated circuit background */
.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(245,166,35,0.4);
    padding: 4px 16px;
    border-radius: 99px;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 18px;
}

.hero h1 em {
    font-style: normal;
    color: var(--gold);
}

.hero-sub {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 0.97rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 36px;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s;
}
.hero-cta:hover { background: var(--gold-dark); transform: translateY(-2px); }
.hero-cta svg { flex-shrink: 0; }

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section {
    padding: 96px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 48px; height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

.section-header p {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.97rem;
}

/* ============================================================
   PAIN POINTS CARDS
   ============================================================ */
.pain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.pain-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: border-color 0.2s, transform 0.2s;
}

.pain-card:hover {
    border-color: rgba(245,166,35,0.4);
    transform: translateY(-4px);
}

.pain-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.pain-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
}

.pain-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================================
   FEATURES
   ============================================================ */
.feature-alt { background: var(--navy-mid); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
}

.feature-item .icon-wrap {
    width: 60px; height: 60px;
    border-radius: 14px;
    background: rgba(37,99,235,0.18);
    border: 1px solid rgba(37,99,235,0.3);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
}

.feature-item h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
    background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
    padding: 80px 24px;
}

.cta-banner h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-banner p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.97rem;
}

.btn-gold {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1rem;
    transition: background 0.2s;
}
.btn-gold:hover { background: var(--gold-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #080e1a;
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ============================================================
   AUTH PAGES (register / login)
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--navy-mid);
}

.auth-page .navbar { position: static; }

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: #dc7e91;

}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 48px 44px;
    width: 100%;
    max-width: 480px;
    color: var(--navy);
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
    border-top: 4px solid var(--gold);
}

.auth-card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
    color: var(--navy);
}

.auth-card .sub {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.87rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.form-group label .req { color: #ef4444; margin-left: 2px; }

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 17px; height: 17px;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.92rem;
    background: #f9fafb;
    color: var(--navy);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font);
    outline: none;
}

.input-wrap input::placeholder { color: #adb5bd; }

.input-wrap input:focus {
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(245,166,35,0.18);
}

.input-wrap input.error-field {
    border-color: #ef4444;
}

.field-error {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 5px;
    display: none;
}

.hint {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 5px;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: #d3718b;
    margin-top: 8px;
}
.btn-submit:hover { background: var(--gold-dark); }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 0.85rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: var(--white);
    color: #374151;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font);
    text-decoration: none;
}
.btn-google:hover {
    border-color: #9ca3af;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: #6b7280;
}
.auth-footer a { color: var(--blue); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
