/* ============================================================
   Energy Yi - Modern Design System
   Premium dark gradient | Glassmorphism | Clean typography
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --bg-surface: rgba(255,255,255,0.02);
    --text-primary: #f0ece4;
    --text-secondary: rgba(240,236,228,0.6);
    --text-muted: rgba(240,236,228,0.4);
    --cinnabar: #d4a850;
    --gold: #d4a850;
    --accent: #8b5cf6;
    --accent-glow: rgba(139,92,246,0.3);
    --border-color: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.15);
    --glass-bg: rgba(255,255,255,0.03);
    --glass-border: rgba(255,255,255,0.06);
    --shadow-card: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 32px rgba(0,0,0,0.3);
    --shadow-elevated: 0 0 0 1px rgba(255,255,255,0.08), 0 16px 48px rgba(0,0,0,0.4);
    --wood: #4CAF50;
    --fire: #F44336;
    --earth: #FF9800;
    --metal: #9E9E9E;
    --water: #2196F3;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Noto Serif SC', system-ui, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(212,168,80,0.05) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 旋转八卦背景 --- */
.bagua-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: radial-gradient(ellipse at 50% 50%, rgba(212,168,80,0.03) 0%, transparent 70%);
    animation: baguaPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.bagua-bg::before {
    content: '☯';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40vw;
    color: #d4a850;
    opacity: 0.025;
    animation: baguaSpin 60s linear infinite;
}
@keyframes baguaSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes baguaPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- 金光粒子 --- */
.particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* --- 导航栏 --- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 0.5rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo i { font-size: 1.1rem; color: var(--cinnabar); }
.logo span { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.tagline { font-size: 0.75rem; color: var(--text-muted); }
.nav-menu { display: flex; gap: 0.3rem; }
.nav-link {
    padding: 0.5rem 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: none; background: none;
    cursor: pointer; font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-link:hover { color: var(--cinnabar); background: rgba(195,39,43,0.05); }
.nav-link.active { color: var(--cinnabar); background: rgba(195,39,43,0.08); font-weight: 600; }

.nav-account { position: relative; display: flex; align-items: center; }

/* --- 主内容 --- */
.main-content {
    max-width: 1200px;
    margin: 5rem auto 2rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.page { display: none; }
.page.active { display: block; }

/* --- 首页 - Hero --- */
.hero-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem 0;
    min-height: 60vh;
}
.hero-content { flex: 1; }
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #f0ece4, #d4a850, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 1rem 0 2rem;
    line-height: 1.8;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { flex: 0 0 300px; }

.section-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--gold);
    letter-spacing: -0.01em;
}
/* --- 太极与八卦轨道 --- */
.taiji-container {
    width: 280px; height: 280px;
    position: relative;
    margin: 0 auto;
}
.taiji {
    width: 200px; height: 200px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--gold) 0deg 180deg, rgba(255,255,255,0.1) 180deg 360deg);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 40px rgba(212,168,80,0.15);
    animation: taijiSpin 12s linear infinite;
}
.taiji::before {
    content: '';
    position: absolute;
    top: 25%; left: 50%;
    width: 25px; height: 25px;
    background: var(--gold);
    border-radius: 50%;
    transform: translateX(-50%);
}
.taiji::after {
    content: '';
    position: absolute;
    bottom: 25%; left: 50%;
    width: 25px; height: 25px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translateX(-50%);
}
@keyframes taijiSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
.page-header {
    text-align: center;
    padding: 2rem 0;
}
.page-header h2 { font-size: 1.5rem; color: var(--gold); letter-spacing: -0.01em; }
.page-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.3rem; }
.reading-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.8rem;
    margin-top: 0.8rem;
    backdrop-filter: blur(8px);
}
.reading-section h4 { color: var(--gold); font-size: 1rem; margin-bottom: 0.5rem; }
.orbit { position: absolute; width: 100%; height: 100%; }
.orbit-item {
    position: absolute;
    font-size: 1.5rem;
    animation: orbitSpin 20s linear infinite;
    animation-delay: calc(var(--i) * -2.5s);
    transform-origin: 140px 140px;
}
.orbit-item:nth-child(1) { transform: rotate(0deg) translateY(-100px); }
.orbit-item:nth-child(2) { transform: rotate(45deg) translateY(-100px); }
.orbit-item:nth-child(3) { transform: rotate(90deg) translateY(-100px); }
.orbit-item:nth-child(4) { transform: rotate(135deg) translateY(-100px); }
.orbit-item:nth-child(5) { transform: rotate(180deg) translateY(-100px); }
.orbit-item:nth-child(6) { transform: rotate(225deg) translateY(-100px); }
.orbit-item:nth-child(7) { transform: rotate(270deg) translateY(-100px); }
.orbit-item:nth-child(8) { transform: rotate(315deg) translateY(-100px); }

/* --- 功能卡片 --- */
.features-section { padding: 2rem 0; }
.section-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--cinnabar);
}
/* ── Fortune + Shop Row ── */
.fortune-shop-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.fortune-shop-row .shop-section {
    flex: 1;
    padding: 0;
}
/* ── Fortune Float Button ── */
.fortune-float-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.5rem 1.2rem;
    border-radius: 24px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 0 24px rgba(212,168,80,0.25), 0 0 60px rgba(212,168,80,0.08);
    cursor: pointer;
    z-index: 5;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex; align-items: center; gap: 0.4rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.fortune-float-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
    border-color: rgba(212,168,80,0.5);
    box-shadow: 0 0 40px rgba(212,168,80,0.4), 0 0 80px rgba(212,168,80,0.15);
}
.fortune-float-btn i { font-size: 1rem; }
/* ── Fortune Modal ── */
.fortune-modal-box {
    max-width: 420px;
}
.fortune-modal-box h3 {
    color: var(--cinnabar);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.fortune-modal-box .fortune-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.fortune-modal-box .fortune-score { font-size: 1.2rem; color: var(--cinnabar); font-weight: 600; margin-bottom: 0.8rem; }
.fortune-modal-box .fortune-details { font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.8rem; }
.fortune-modal-box .fortune-lucky { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.fortune-modal-box .fortune-advice { font-size: 0.85rem; color: var(--accent); font-style: italic; }
@media (max-width: 768px) {
    .fortune-shop-row { flex-direction: column; }
    .daily-fortune-sidebar { flex: 1; position: static; }
}
.shop-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: -1rem 0 2rem;
}
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
}
.shop-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}
.shop-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
}
.shop-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-elevated);
    background: var(--bg-card-hover);
}
.shop-card-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.shop-card-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}
.shop-card-body {
    padding: 0.8rem 0.9rem 0.9rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.shop-card-body h4 {
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-weight: 600;
}
.shop-card-body .shop-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cinnabar);
}
.shop-card-body .shop-element {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    margin: 0.3rem 0 0.4rem;
}
.shop-card-body .shop-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.6rem;
    flex: 1;
}
.shop-card-body .shop-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 0.6rem;
}
.shop-card-body .shop-benefits li {
    font-size: 0.68rem;
    color: var(--text-secondary);
    padding: 0.1rem 0;
}
.shop-card-body .shop-benefits li::before {
    content: "✦ ";
    color: var(--cinnabar);
    font-size: 0.6rem;
}
.shop-buy-btn {
    width: 100%;
    padding: 0.45rem;
    border: 1px solid var(--cinnabar);
    border-radius: 8px;
    background: transparent;
    color: var(--cinnabar);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.shop-buy-btn:hover {
    background: var(--cinnabar);
    color: #0a0a0f;
}
/* element badges */
.shop-element.fire { background: rgba(244,67,54,0.2); color: #ff7961; }
.shop-element.water { background: rgba(33,150,243,0.2); color: #64b5f6; }
.shop-element.wood { background: rgba(76,175,80,0.2); color: #81c784; }
.shop-element.metal { background: rgba(158,158,158,0.2); color: #e0e0e0; }
.shop-element.earth { background: rgba(255,152,0,0.2); color: #ffb74d; }
/* shop toast */
.shop-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--cinnabar);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: var(--shadow-elevated);
    backdrop-filter: blur(12px);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.shop-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Shop Carousel ── */
.shop-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: rgba(0,0,0,0.15);
    border-radius: 8px 8px 0 0;
}
.shop-carousel-track {
    position: relative;
    width: 100%;
}
.shop-carousel-slide {
    display: none;
    width: 100%;
}
.shop-carousel-slide.active {
    display: block;
}
.shop-carousel-slide img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
}
.shop-carousel-prev,
.shop-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 2;
}
.shop-carousel:hover .shop-carousel-prev,
.shop-carousel:hover .shop-carousel-next {
    opacity: 0.8;
}
.shop-carousel-prev { left: 6px; }
.shop-carousel-next { right: 6px; }
.shop-carousel-prev:hover,
.shop-carousel-next:hover {
    opacity: 1 !important;
    background: rgba(0,0,0,0.7);
}
.shop-carousel-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}
.shop-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all 0.2s;
}
.shop-carousel-dot.active {
    background: var(--cinnabar, #D4A850);
    width: 18px;
    border-radius: 4px;
}
.shop-carousel-dot:hover {
    background: rgba(255,255,255,0.6);
}

/* ── Shop Video Button ── */
.shop-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.8rem;
    background: rgba(212,168,80,0.1);
    border: 1px solid rgba(212,168,80,0.3);
    border-radius: 8px;
    color: var(--cinnabar, #D4A850);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.shop-video-btn:hover {
    background: rgba(212,168,80,0.2);
    border-color: var(--cinnabar, #D4A850);
}
.shop-video-btn i {
    font-size: 1.1rem;
}

/* ── Shop Lightbox ── */
.shop-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.shop-lightbox.active {
    display: flex;
}
.shop-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    cursor: default;
}
.shop-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 2;
    line-height: 1;
}
.shop-lightbox-close:hover { opacity: 1; }
.shop-lightbox-nav {
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 1;
}
.shop-lightbox-prev,
.shop-lightbox-next {
    pointer-events: auto;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    opacity: 0.7;
}
.shop-lightbox-prev:hover,
.shop-lightbox-next:hover {
    background: rgba(255,255,255,0.2);
    opacity: 1;
    transform: scale(1.1);
}

/* ── Shop Contact Modal ── */
.shop-contact-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}
.shop-contact-modal.active {
    display: flex;
}
.shop-contact-content {
    background: #1a1a2e;
    border: 1px solid rgba(212,168,80,0.2);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.shop-contact-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}
.shop-contact-close:hover { color: #fff; }
.shop-contact-icon {
    font-size: 2.5rem;
    color: var(--cinnabar, #D4A850);
    margin-bottom: 0.5rem;
}
.shop-contact-content h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.2rem;
}
.shop-contact-btn {
    display: block;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    margin: 0.6rem 0;
    transition: all 0.2s;
}
.shop-contact-btn.whatsapp {
    background: #25D366;
    color: #fff;
}
.shop-contact-btn.whatsapp:hover {
    background: #1da851;
    transform: translateY(-1px);
}
.shop-contact-btn.email {
    background: rgba(212,168,80,0.15);
    color: var(--cinnabar, #D4A850);
    border: 1px solid rgba(212,168,80,0.3);
}
.shop-contact-btn.email:hover {
    background: rgba(212,168,80,0.25);
    transform: translateY(-1px);
}
.shop-contact-btn i {
    margin-right: 0.5rem;
}

/* ── Shop PayPal Modal ── */
.shop-paypal-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}
.shop-paypal-modal.active {
    display: flex;
}
.shop-paypal-content {
    background: #1a1a2e;
    border: 1px solid rgba(212,168,80,0.2);
    border-radius: 16px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.shop-paypal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}
.shop-paypal-close:hover { color: #fff; }
.shop-paypal-icon {
    font-size: 2.5rem;
    color: var(--cinnabar, #D4A850);
    margin-bottom: 0.5rem;
}
.shop-paypal-success-icon {
    font-size: 3.5rem;
    color: #34d399;
    margin-bottom: 0.5rem;
}
.shop-paypal-content h3 {
    color: var(--text-primary);
    margin: 0 0 0.3rem 0;
    font-size: 1.2rem;
}
.shop-paypal-product {
    margin: 0.8rem 0;
}
.shop-paypal-product-name {
    color: var(--cinnabar, #D4A850);
    font-weight: 600;
    margin: 0.3rem 0;
    font-size: 0.95rem;
}
.shop-paypal-product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.2rem 0;
}
.shop-paypal-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}
.shop-paypal-order-id {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    margin: 0.3rem 0;
    font-family: monospace;
}

/* ── Two-Step Checkout Form ── */
.shop-checkout-form {
    text-align: left;
    margin-top: 0.8rem;
}
.shop-form-group {
    margin-bottom: 0.7rem;
}
.shop-form-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.shop-form-input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.shop-form-input:focus {
    border-color: var(--cinnabar, #d4a850);
    box-shadow: 0 0 0 2px rgba(212,168,80,0.15);
}
.shop-form-input::placeholder {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.shop-form-textarea {
    min-height: 60px;
    resize: vertical;
}
.shop-form-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    color: #ef4444;
    margin-bottom: 0.7rem;
}
.shop-paypal-customer-info {
    text-align: left;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    margin: 0.5rem 0;
}
.shop-paypal-customer-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.shop-paypal-customer-info p i {
    width: 16px;
    color: var(--cinnabar, #d4a850);
    font-size: 0.75rem;
}

/* PayPal button container responsive */
#paypal-button-container {
    min-height: 45px;
}
#paypal-button-container iframe {
    max-width: 100% !important;
}

/* ── Shop Specs ── */
.shop-specs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0.4rem 0;
}
.shop-spec {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.shop-spec i {
    font-size: 0.6rem;
    color: var(--cinnabar, #D4A850);
}

.shop-attrs {
    display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.3rem 0;
}
.shop-attrs span {
    display: inline-flex; align-items: center; gap: 0.2rem;
    font-size: 0.65rem; color: #34d399;
    background: rgba(52,211,153,0.08); padding: 0.12rem 0.45rem; border-radius: 4px;
}
.shop-attrs i { font-size: 0.55rem; }

.product-detail-attrs {
    margin-bottom: 1rem; background: rgba(255,255,255,0.02);
    border-radius: 8px; padding: 0.75rem; border: 1px solid rgba(212,168,80,0.1);
}
.product-detail-attrs h3 { font-size: 0.8rem; color: var(--cinnabar); margin-bottom: 0.5rem; }
.attr-list { display: flex; flex-direction: column; gap: 0.35rem; }
.attr-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--text-secondary); }
.attr-item i { color: #34d399; font-size: 0.7rem; width: 16px; text-align: center; }
.attr-item span { color: var(--text-muted); font-weight: 500; min-width: 70px; }

/* ── Trust Badges ── */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.8rem 0 1.5rem 0;
}
.trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.trust-badges i {
    color: #4CAF50;
    font-size: 0.85rem;
}

/* responsive */
@media (max-width: 640px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .shop-card-body { padding: 0.6rem; }
    .shop-card-body h4 { font-size: 0.75rem; }
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-elevated);
    background: var(--bg-card-hover);
}
.feature-icon { font-size: 2.5rem; color: var(--gold); margin-bottom: 1.2rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.7; }

/* --- 页面标题 --- */
.page-header {
    text-align: center;
    padding: 2rem 0;
}
.page-header h2 { font-size: 1.5rem; color: var(--cinnabar); }
.page-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.3rem; }

/* --- 按钮 --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #d4a850, #b8912e);
    color: #0a0a0f;
    font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(212,168,80,0.3); }
.btn-secondary {
    background: linear-gradient(135deg, rgba(139,92,246,0.8), rgba(99,102,241,0.6));
    color: #fff;
    border: 1px solid rgba(139,92,246,0.2);
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(139,92,246,0.3); }
.btn-outline {
    background: transparent;
    border: 1px solid rgba(212,168,80,0.3);
    color: var(--gold);
}
.btn-outline:hover { background: rgba(212,168,80,0.08); border-color: var(--gold); }
.btn-large { padding: 0.8rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
.btn-test {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-test:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.glow-btn {
    box-shadow: 0 2px 10px rgba(212,168,80,0.15);
}
.glow-btn:hover {
    box-shadow: 0 4px 25px rgba(212,168,80,0.25);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- 表单 --- */
.bazi-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}
.bazi-input-section, .bazi-result-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}
.bazi-input-section h3, .bazi-result-section h3 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 1rem;
}
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,168,80,0.1);
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.radio-group { display: flex; gap: 1rem; }
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.85rem;
}
.form-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.quick-test {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.quick-test h4 { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.test-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* --- 结果占位 --- */
.result-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}
.placeholder-content i { font-size: 3rem; opacity: 0.3; margin-bottom: 1rem; }
.placeholder-content p { font-size: 0.85rem; }

/* --- 四柱八字（旧，保留兼容） --- */
.four-pillars h4 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.pillars-grid { margin-bottom: 1rem; }
.pillar-card {
    padding: 1rem 0.8rem;
    border-radius: 12px;
    text-align: center;
    min-width: 70px;
    flex: 1;
}
.pillar-title { font-size: 0.7rem; color: rgba(255,255,255,0.8); margin-bottom: 0.3rem; }
.pillar-gan, .pillar-zhi { font-size: 1.5rem; font-weight: 900; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.pillar-nayin { font-size: 0.65rem; color: rgba(255,255,255,0.7); }

/* --- 解读区 --- */
.reading-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-top: 0.8rem;
}
.reading-section h4 { color: var(--cinnabar); font-size: 1rem; margin-bottom: 0.5rem; }
.reading-section h5 { font-size: 0.9rem; margin: 0.5rem 0; }

/* --- 页脚 --- */
.footer {
    background: #1A1A1A;
    color: #ccc;
    padding: 2rem 1.5rem;
    margin-top: 3rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.footer-section h4 { color: var(--gold); font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-section p, .footer-section li { font-size: 0.8rem; color: #999; }
.footer-section ul { list-style: none; }
.footer-section a { color: #999; text-decoration: none; }
.footer-section a:hover { color: var(--gold); }
.social-links { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.social-links a { font-size: 1.2rem; color: #666; }
.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #333;
    font-size: 0.75rem;
    color: #666;
}

/* --- Toast通知 --- */
.notification {
    position: fixed;
    top: 4rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 999;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; } }

/* --- 响应式 --- */
@media (max-width: 768px) {
    .bazi-container { grid-template-columns: 1fr; }
    .hero-section { flex-direction: column; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-visual { flex: none; }
    .nav-menu { gap: 0; }
    .nav-link { font-size: 0.75rem; padding: 0.4rem 0.5rem; }
    .footer-content { grid-template-columns: 1fr; }
}

/* 命格分析加载动画 */
@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
    100% { transform: translateX(400%); }
}

/* --- 命格分析全文展示优化 --- */
.reading-section {
    padding: 1rem 1.8rem;
}
.reading-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(195,39,43,0.12);
    padding-bottom: 0.4rem;
    margin-bottom: 0.6rem;
}
.reading-section h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.6rem 0 0.2rem;
}
.reading-section p, .reading-section div[style], .reading-section strong + br + span, .reading-section {
    font-size: 0.9rem;
    line-height: 1.9;
}
.reading-section strong {
    font-weight: 600;
}

/* 排盘后结果区全宽 */
.bazi-result-section {
    grid-column: 1;
}

/* --- 合盘展示优化：全宽+字体 --- */
#hepan .bazi-container {
    max-width: 100%;
}
#hepan .bazi-input-section {
    max-width: 100%;
    margin: 0 auto;
}
/* 合盘输入表单横排 */
#hepan .hepan-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
#hepan .hepan-person {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
#hepan .bazi-result-section {
    grid-column: 1;
    max-width: 100%;
    margin: 1rem auto 0;
}
#hepan .reading-section {
    max-width: 100%;
    padding: 1.2rem 2rem;
}
#hepan .reading-section h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cinnabar);
    border-bottom: 1px solid rgba(195,39,43,0.12);
    padding-bottom: 0.5rem;
    margin-bottom: 0.6rem;
}
#hepan .reading-section h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.7rem 0 0.3rem;
    color: var(--text-primary);
}
#hepan .reading-section p, #hepan .reading-section div:not(.reading-section) {
    font-size: 0.92rem;
    line-height: 2;
    color: var(--text-primary);
}
#hepan .reading-section strong {
    color: var(--cinnabar);
    font-weight: 600;
}

/* 全局字体优化 */
.reading-section {
    font-size: 0.92rem;
    line-height: 2;
}
.reading-section p {
    margin-bottom: 0.4rem;
}
.reading-section br {
    content: '';
    display: block;
    margin: 0.2rem 0;
}

/* ═══════════════════════════════════════════
   Product Detail Page
   ═══════════════════════════════════════════ */
.product-detail-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
}

.back-to-shop {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--cinnabar, #d4a850);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(212,168,80,0.25);
    border-radius: 8px;
    transition: all 0.2s;
}
.back-to-shop:hover {
    background: rgba(212,168,80,0.08);
    border-color: rgba(212,168,80,0.5);
}

/* Hero image area */
.product-detail-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card, rgba(255,255,255,0.04));
    margin-bottom: 1.5rem;
}
.product-detail-hero .shop-carousel {
    width: 100%;
    max-height: 480px;
}
.product-detail-hero .shop-carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.product-detail-hero .shop-carousel-prev,
.product-detail-hero .shop-carousel-next {
    opacity: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Info section */
.product-detail-info {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 700px) {
    .product-detail-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.product-detail-main h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}
.product-detail-main .product-detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cinnabar, #d4a850);
    margin-bottom: 0.5rem;
}
.product-detail-main .product-detail-element {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}
.product-detail-main .product-detail-element.metal { background: rgba(212,168,80,0.15); color: #d4a850; }
.product-detail-main .product-detail-element.fire  { background: rgba(239,68,68,0.15); color: #ef4444; }
.product-detail-main .product-detail-element.water { background: rgba(59,130,246,0.15); color: #3b82f6; }
.product-detail-main .product-detail-element.wood  { background: rgba(34,197,94,0.15); color: #22c55e; }
.product-detail-main .product-detail-element.earth { background: rgba(168,85,247,0.15); color: #a855f7; }

.product-detail-main .product-detail-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

/* Sidebar / sidebar-like info card */
.product-detail-sidebar {
    background: var(--bg-card, rgba(255,255,255,0.04));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.06));
    border-radius: 12px;
    padding: 1.2rem;
}

.product-detail-specs h3,
.product-detail-benefits h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-detail-specs {
    margin-bottom: 1.2rem;
}
.product-detail-specs table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}
.product-detail-specs td {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.product-detail-specs td:first-child {
    color: var(--text-muted);
    width: 40%;
}
.product-detail-specs td:last-child {
    color: var(--text-primary);
}

.product-detail-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.product-detail-benefits li {
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.product-detail-benefits li::before {
    content: '\\2713';
    color: #22c55e;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Shipping & Returns policy box */
.product-detail-policy {
    margin-top: 1.2rem;
}
.product-detail-policy h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.product-detail-policy table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}
.product-detail-policy td {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.product-detail-policy td:first-child {
    color: var(--text-muted);
    width: 40%;
}
.product-detail-policy td:last-child {
    color: var(--text-primary);
}
.product-detail-policy td i {
    margin-right: 0.3rem;
    color: var(--cinnabar);
    font-size: 0.75rem;
}

/* Free shipping badge on shop card */
.shop-freight-badge {
    display: inline-block;
    font-size: 0.65rem;
    color: #22c55e;
    background: rgba(34,197,94,0.1);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    margin-bottom: 0.4rem;
}
.shop-freight-badge i {
    margin-right: 0.2rem;
}

/* Video section */
.product-detail-video {
    margin-bottom: 1.5rem;
}
.product-detail-video h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.6rem;
}
.product-detail-video video {
    width: 100%;
    border-radius: 10px;
    background: #000;
}

/* Buy section */
.product-detail-buy {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(212,168,80,0.08), rgba(212,168,80,0.02));
    border: 1px solid rgba(212,168,80,0.15);
    border-radius: 12px;
    margin-bottom: 2rem;
}
.product-detail-buy .buy-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--cinnabar, #d4a850);
    margin-bottom: 0.3rem;
}
.product-detail-buy .buy-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.product-detail-buy .buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    background: linear-gradient(135deg, #d4a850, #b8912e);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.product-detail-buy .buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,168,80,0.3);
}

/* Related products */
.product-detail-related {
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border, rgba(255,255,255,0.06));
    padding-top: 1.5rem;
}
.product-detail-related h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}
.product-detail-related .related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.product-detail-related .related-card {
    background: var(--bg-card, rgba(255,255,255,0.04));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.06));
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.product-detail-related .related-card:hover {
    border-color: rgba(212,168,80,0.3);
    transform: translateY(-2px);
}
.product-detail-related .related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.product-detail-related .related-card .related-card-body {
    padding: 0.6rem;
}
.product-detail-related .related-card .related-card-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-detail-related .related-card .related-card-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cinnabar, #d4a850);
    margin-top: 0.2rem;
}

/* Loading spinner */
.product-detail-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Clickable card cursor */
.shop-card {
    cursor: pointer;
}
.shop-card .shop-buy-btn,
.shop-card .shop-video-btn,
.shop-card .shop-carousel-prev,
.shop-card .shop-carousel-next,
.shop-card .shop-carousel-dot {
    cursor: pointer;
}
.related-card {
    cursor: pointer;
}

/* =========================================================================
   4 NEW FEATURES CSS
   ========================================================================= */

/* --- Daily Fortune Section --- */
.daily-fortune-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.fortune-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.fortune-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}
.fortune-placeholder {
    text-align: center;
    padding: 2rem;
}
.fortune-result {
    display: block;
}
.fortune-date {
    text-align: center;
    font-size: 0.9rem;
    color: var(--cinnabar);
    margin-bottom: 1rem;
    font-weight: 600;
}
.fortune-score {
    text-align: center;
    margin-bottom: 1rem;
}
.fortune-score-ring {
    position: relative;
    display: inline-block;
}
.fortune-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}
.fortune-level {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.3rem;
}
.fortune-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.fortune-good, .fortune-bad {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
}
.fortune-good h4, .fortune-bad h4 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.fortune-good ul, .fortune-bad ul {
    list-style: none;
    padding: 0;
}
.fortune-good li, .fortune-bad li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.fortune-lucky-grid {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.lucky-item {
    background: rgba(212,168,80,0.08);
    border: 1px solid rgba(212,168,80,0.15);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    text-align: center;
    min-width: 100px;
}
.lucky-icon {
    display: block;
    font-size: 1.2rem;
    color: var(--cinnabar);
    margin-bottom: 0.2rem;
}
.lucky-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lucky-value {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}
.fortune-advice-card {
    background: linear-gradient(135deg, rgba(212,168,80,0.1), rgba(139,92,246,0.08));
    border: 1px solid rgba(212,168,80,0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.6;
}
.fortune-advice-card i {
    color: var(--cinnabar);
    margin-right: 0.3rem;
    opacity: 0.6;
}

/* --- AI Chat Widget --- */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.chat-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cinnabar), #b8943e);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212,168,80,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    color: #1a1a1a;
    font-size: 1.3rem;
}
.chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(212,168,80,0.5);
}
.chat-panel {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 340px;
    height: 460px;
    background: var(--bg-primary);
    border: 1px solid rgba(212,168,80,0.25);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, rgba(212,168,80,0.15), rgba(139,92,246,0.1));
    border-bottom: 1px solid rgba(212,168,80,0.15);
    font-size: 0.9rem;
    font-weight: 600;
}
.chat-header i {
    color: var(--cinnabar);
    margin-right: 0.4rem;
}
.chat-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.3rem;
}
.chat-close:hover {
    color: var(--text-primary);
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.chat-msg {
    max-width: 85%;
    display: flex;
}
.chat-msg-bot {
    align-self: flex-start;
}
.chat-msg-user {
    align-self: flex-end;
}
.chat-msg-content {
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    word-wrap: break-word;
}
.chat-msg-bot .chat-msg-content {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}
.chat-msg-user .chat-msg-content {
    background: rgba(212,168,80,0.15);
    border: 1px solid rgba(212,168,80,0.2);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}
.chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: var(--bg-surface);
}
.chat-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}
.chat-input:focus {
    border-color: var(--cinnabar);
}
.chat-send {
    padding: 0.6rem 0.9rem;
    background: var(--cinnabar);
    border: none;
    border-radius: 8px;
    color: #1a1a1a;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.chat-send:hover {
    background: #c49a3e;
}

/* --- Auth Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--bg-primary);
    border: 1px solid rgba(212,168,80,0.25);
    border-radius: 16px;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(212,168,80,0.15);
}
.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text-primary);
}
.modal-body .form-group {
    margin-bottom: 0.8rem;
}
.modal-body .form-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}
.modal-body .script-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}
.modal-body .script-input:focus {
    border-color: var(--cinnabar);
}
.dropdown-item:hover {
    background: rgba(255,255,255,0.06);
}

/* --- History Modal Scrollbar --- */
#historyBody::-webkit-scrollbar {
    width: 6px;
}
#historyBody::-webkit-scrollbar-thumb {
    background: rgba(212,168,80,0.3);
    border-radius: 3px;
}

/* --- Solar Time Indicator --- */
#solarTimeIndicator {
    font-size: 0.75rem;
    color: var(--bronze, #cd7f32);
    margin-top: 0.25rem;
}
#solarTimeIndicator i {
    margin-right: 0.3rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .fortune-details {
        flex-direction: column;
    }
    .chat-panel {
        width: 300px;
        height: 400px;
        right: -10px;
    }
    .nav-account {
        margin-top: 0.5rem;
    }
}
/* ============================================================
   Report Content Styling — Structured reading display
   ============================================================ */
.report-container {
    max-width: 800px;
    margin: 0 auto;
}

.report-section {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-card);
}

.report-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cinnabar);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(212,168,80,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-section h3 .section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(212,168,80,0.15);
    color: var(--cinnabar);
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.report-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--cinnabar);
}

.report-section p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.report-section strong {
    color: var(--cinnabar);
    font-weight: 600;
}

.report-section ul, .report-section ol {
    margin: 0.5rem 0 0.5rem 1.2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.report-section li {
    margin-bottom: 0.3rem;
}

/* Element balance bar chart */
.element-balance {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.element-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.element-label {
    width: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

.element-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.element-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.element-value {
    width: 36px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
}

/* Pillar cards (Year/Month/Day/Hour) */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin: 1rem 0;
}

.pillar-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.7rem;
    text-align: center;
}

.pillar-card .pillar-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.pillar-card .pillar-ganzhi {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cinnabar);
}

.pillar-card .pillar-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Day Master badge */
.day-master-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(212,168,80,0.12);
    border: 1px solid rgba(212,168,80,0.25);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cinnabar);
    margin-bottom: 0.8rem;
}

/* Strengths/Challenges pills */
.pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.pill-strength {
    background: rgba(76,175,80,0.12);
    border: 1px solid rgba(76,175,80,0.25);
    color: #4CAF50;
}

.pill-challenge {
    background: rgba(244,67,54,0.12);
    border: 1px solid rgba(244,67,54,0.25);
    color: #F44336;
}

.pill-crystal {
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25);
    color: var(--accent);
}

/* Divider for report */
.report-divider {
    border: none;
    border-top: 1px solid rgba(212,168,80,0.15);
    margin: 1.2rem 0;
}

/* Score ring for compatibility */
.score-ring-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}

/* Life stage timeline */
.life-stage {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    align-items: flex-start;
}

.life-stage .stage-age {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cinnabar);
    text-align: right;
    padding-top: 0.15rem;
}

.life-stage .stage-desc {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 640px) {
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .score-ring-wrap {
        flex-direction: column;
        gap: 1rem;
    }
    .report-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .chat-panel {
        width: calc(100vw - 30px);
        height: 50vh;
        right: -5px;
    }
}

/* ============================================================
   MOBILE-FIRST OPTIMIZATION — Clean, spacious, thumb-friendly
   ============================================================ */

/* --- Hamburger Toggle Button --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    z-index: 110;
    padding: 8px;
    transition: border-color 0.2s;
}
.nav-toggle:hover { border-color: var(--cinnabar); }
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 105;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ============================================================ */
/* 768px BREAKPOINT                                              */
/* ============================================================ */
@media (max-width: 768px) {
    html, body { max-width: 100vw; overflow-x: hidden; }
    img, video, canvas, iframe, .report-container, .modal-content { max-width: 100%; height: auto; }
    .nav-toggle { display: none; }
    .nav-menu {
        display: none;
    }
    .nav-link {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .nav-link i { width: 20px; text-align: center; font-size: 1rem; }
    .nav-overlay { display: none; }
    .nav-overlay.active { display: block; opacity: 1; }

    .nav-container {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    .nav-brand { flex: 1; }
    .logo span { font-size: 0.7rem; }
    .logo i { font-size: 0.8rem; }
    .tagline { display: none; }
    .nav-account .btn { font-size: 0.7rem !important; padding: 0.35rem 0.6rem !important; }

    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding: 1rem 1rem 2rem;
        gap: 1rem;
        min-height: auto;
    }
    .hero-content { max-width: 100%; padding: 0 0.5rem; }
    .hero-title { font-size: 1.6rem; line-height: 1.3; }
    .hero-title br { display: none; }
    .hero-subtitle {
        font-size: 0.85rem;
        line-height: 1.6;
        margin: 0.8rem 0 1.2rem;
    }
    .hero-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    .hero-actions .btn {
        flex: 1 1 auto;
        min-width: 130px;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        justify-content: center;
    }
    .hero-visual {
        flex: none;
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
    .taiji-container { width: 200px; height: 200px; }
    .taiji { width: 150px; height: 150px; }
    .fortune-float-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.72rem;
        border-radius: 16px;
        gap: 0.25rem;
        background: transparent;
        border: 1px solid rgba(255,255,255,0.15);
        box-shadow: 0 0 12px rgba(212,168,80,0.2);
    }
    .fortune-float-btn i { font-size: 0.75rem; }
    .gua-symbols.orbit { display: none; }
    .gua { font-size: 1.2rem; }

    .main-content { padding-top: 52px; }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    .feature-card { padding: 1.5rem; }
    .feature-icon { font-size: 2rem; margin-bottom: 0.8rem; }
    .feature-card h3 { font-size: 1rem; }
    .feature-card p { font-size: 0.8rem; }

    .section-title { font-size: 1.2rem; padding: 0 1rem; }

    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; padding: 0 0.5rem; }
    .shop-card-body { padding: 0.6rem; }
    .shop-card-body h4 { font-size: 0.75rem; }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 1rem;
    }
    .footer-col h4 { text-align: center; }

    .fortune-modal-content { width: 92vw; max-height: 85vh; padding: 1.5rem 1rem; }
    .auth-modal-content { width: 92vw; padding: 1.5rem 1rem; }
    .bazi-container { grid-template-columns: 1fr; }

    body { padding-bottom: env(safe-area-inset-bottom, 0px); }
    .btn { min-height: 42px; }
}

@media (max-width: 480px) {
    .hero-section { padding: 0.6rem 0.8rem 1.5rem; }
    .hero-title { font-size: 1.4rem; }
    .hero-subtitle { font-size: 0.8rem; }
    .hero-actions .btn { padding: 0.6rem 0.8rem; font-size: 0.8rem; }
    .features-grid { gap: 0.8rem; }
    .shop-grid { gap: 0.5rem; }
    .shop-card-body h4 { font-size: 0.7rem; }
    .shop-card .price { font-size: 0.85rem; }
    .nav-link { font-size: 0.9rem; padding: 0.8rem 0.8rem; }
}

/* ── Mobile: Zodiac Detail ── */
@media (max-width: 768px) {
    .zodiac-detail {
        max-height: 55vh;
        overflow-y: auto;
        position: relative;
    }
    .zodiac-detail > button {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #1a1713;
        padding: 0.3rem 0.6rem;
        border-radius: 4px;
    }
}
