/* === CSS Variables === */
:root {
    --navy: #1a1f3a;
    --navy-light: #252b4a;
    --ivory: #faf8f5;
    --ivory-dark: #f0ede8;
    --gold: #c9a96e;
    --gold-light: #e8d5a8;
    --red: #9e4a4a;
    --green: #3d6b5c;
    --text: #2c2c2c;
    --text-light: #6b6b6b;
    --text-muted: #999;
    --border: #e5e2dd;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 18px;
    --ring: rgba(201, 169, 110, 0.24);
    --ink: #101429;
    --max-width: 1200px;
    --header-height: 70px;
    --transition: 0.2s ease;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #fffefd;
    --surface-tint: #f7f2e9;
    --border-strong: rgba(26, 31, 58, 0.13);
    --shadow-card: 0 18px 44px rgba(20, 25, 53, 0.09), 0 2px 7px rgba(20, 25, 53, 0.04);
    --shadow-lift: 0 26px 62px rgba(20, 25, 53, 0.16), 0 3px 10px rgba(20, 25, 53, 0.06);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 12%, rgba(201, 169, 110, 0.11), transparent 27rem),
        radial-gradient(circle at 92% 38%, rgba(49, 64, 118, 0.08), transparent 28rem),
        linear-gradient(180deg, #fdfbf7 0%, #faf7f1 45%, #f7f2e9 100%);
    min-height: 100vh;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--gold);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    padding-left: 1.5em;
}

/* === Container === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header === */
.site-header {
    background: rgba(16, 20, 41, 0.94);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(201, 169, 110, 0.14);
    box-shadow: 0 12px 30px rgba(5, 8, 20, 0.18);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ivory);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo:hover {
    color: var(--gold);
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-icon svg {
    width: 28px;
    height: 28px;
}

.logo-text {
    letter-spacing: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 24px;
    padding: 0;
}

.nav-menu a {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-menu a[aria-current="page"] {
    color: var(--gold-light);
}

.nav-menu a:hover {
    color: var(--gold);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ivory);
    transition: var(--transition);
}

.lang-switcher select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--ivory);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    color-scheme: dark;
    min-width: 92px;
}

.lang-switcher select:focus {
    outline: none;
    border-color: rgba(232, 213, 168, 0.62);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.18);
}

.lang-switcher select option {
    background: #ffffff;
    color: var(--ink);
}

.lang-switcher select option:checked {
    background: var(--gold-light);
    color: var(--ink);
}

/* === Hero === */
.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(10, 13, 30, 0.94), rgba(28, 34, 68, 0.92)),
        radial-gradient(circle at 74% 24%, rgba(201, 169, 110, 0.22), transparent 22rem),
        var(--navy);
    padding: 38px 20px 24px;
    color: var(--ivory);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 88%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 720px;
    height: 720px;
    right: -220px;
    top: -180px;
    border: 1px solid var(--ring);
    border-radius: 50%;
    box-shadow: inset 0 0 0 72px rgba(201, 169, 110, 0.03), 0 0 120px rgba(201, 169, 110, 0.12);
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.88fr);
    align-items: center;
    gap: 54px;
}

.hero-copy {
    max-width: 680px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 0.98;
    margin-bottom: 16px;
    font-weight: 850;
    letter-spacing: 0;
}

.hero-subtitle {
    font-size: 1.24rem;
    line-height: 1.55;
    color: var(--gold-light);
    margin-bottom: 14px;
    max-width: 620px;
}

.hero-desc {
    color: rgba(255,255,255,0.74);
    margin-bottom: 30px;
    font-size: 1rem;
    max-width: 590px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
}

.hero-proof span {
    border-left: 1px solid rgba(201, 169, 110, 0.45);
    padding-left: 12px;
}

.hero-proof span:first-child {
    border-left: none;
    padding-left: 0;
}

.hero-stats-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-stat-item strong {
    color: var(--gold-light);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-stat-item span {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.15);
}

.hero-orbit {
    position: relative;
    min-height: 500px;
    display: grid;
    place-items: center;
}

.orbit-ring {
    position: absolute;
    border: 1px solid var(--ring);
    border-radius: 50%;
    pointer-events: none;
}

.orbit-ring-outer {
    width: min(92vw, 520px);
    height: min(92vw, 520px);
    transform: rotate(18deg);
}

.orbit-ring-inner {
    width: min(70vw, 390px);
    height: min(70vw, 390px);
    border-style: dashed;
    animation: orbit-spin 38s linear infinite;
}

.hero-panel {
    position: relative;
    width: min(100%, 440px);
    padding: 14px;
    border: 1px solid rgba(232, 213, 168, 0.28);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.055));
    box-shadow: 0 28px 70px rgba(0,0,0,0.34);
    backdrop-filter: blur(18px);
}

.hero-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: rgba(255,255,255,0.72);
    font-size: 0.82rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.hero-panel-header strong {
    color: var(--gold-light);
    font-size: 0.8rem;
}

.mini-form-grid,
.mini-chart {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.mini-form-grid div,
.mini-chart div {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 9px 10px;
}

.mini-form-grid small,
.mini-chart small {
    display: block;
    color: rgba(255,255,255,0.54);
    font-size: 0.75rem;
    line-height: 1.3;
}

.mini-form-grid strong,
.mini-chart strong {
    display: block;
    color: var(--ivory);
    font-size: 0.94rem;
    margin-top: 2px;
}

.mini-chart div {
    background: linear-gradient(180deg, rgba(201,169,110,0.16), rgba(255,255,255,0.08));
}

.mini-chart span {
    display: block;
    color: var(--gold-light);
    font-size: 0.84rem;
}

.mini-elements {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}

.mini-elements span {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
}

.mini-elements span::after {
    content: '';
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-light) var(--value), rgba(255,255,255,0.12) var(--value));
}

@keyframes orbit-spin {
    to { transform: rotate(360deg); }
}

.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 60px 20px;
    text-align: center;
    color: var(--ivory);
}

.page-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.page-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--gold-light);
    color: var(--navy);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--ivory-dark);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--ivory);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--ivory);
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
}

.btn-ghost:hover {
    color: var(--gold-light);
    border-color: rgba(232, 213, 168, 0.5);
    background: rgba(255,255,255,0.12);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    font-weight: 700;
}

.text-link::after {
    content: '';
    width: 18px;
    height: 1px;
    background: currentColor;
    transition: width var(--transition);
}

.text-link:hover::after {
    width: 30px;
}

/* === Result Preview === */
.result-preview-band {
    padding: 64px 20px;
    background: linear-gradient(180deg, white, var(--ivory));
}

.result-preview-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
    gap: 42px;
    align-items: center;
}

.result-preview-grid h2,
.seo-links h2 {
    color: var(--navy);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.08;
    margin-bottom: 16px;
}

.result-preview-grid p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.reading-preview {
    position: relative;
    background:
        linear-gradient(180deg, rgba(26,31,58,0.98), rgba(31,38,73,0.96));
    color: var(--ivory);
    padding: 30px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(26,31,58,0.22);
}

.reading-preview::before {
    content: '';
    position: absolute;
    inset: -40% -20% auto auto;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(201,169,110,0.22);
    border-radius: 50%;
}

.reading-preview h3 {
    position: relative;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.reading-preview p,
.reading-preview li {
    position: relative;
    color: rgba(255,255,255,0.72);
}

.reading-preview ul {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.reading-preview li {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    font-weight: 600;
    font-size: 0.9rem;
}

/* === Features === */
.features {
    padding: 86px 20px;
}

.features h2 {
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.1;
    margin-bottom: 48px;
    color: var(--navy);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26,31,58,0.08);
    box-shadow: 0 18px 50px rgba(26,31,58,0.08);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 169, 110, 0.34);
    box-shadow: 0 24px 70px rgba(26,31,58,0.12);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(201,169,110,0.12);
}

.feature-icon svg {
    width: 40px;
    height: 40px;
    color: var(--gold);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--navy);
}

/* === SEO Internal Links === */
.seo-links {
    padding: 78px 20px;
    background:
        linear-gradient(180deg, rgba(16,20,41,0.98), rgba(26,31,58,0.96)),
        var(--navy);
    color: var(--ivory);
}

.seo-links h2 {
    color: var(--ivory);
    max-width: 720px;
}

.seo-link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 30px;
}

.seo-link-grid a {
    display: grid;
    gap: 8px;
    padding: 20px;
    min-height: 132px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.055);
    color: var(--ivory);
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.seo-link-grid a:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.085);
    border-color: rgba(232,213,168,0.34);
}

.seo-link-grid strong {
    color: var(--gold-light);
    font-size: 1rem;
}

.seo-link-grid span {
    color: rgba(255,255,255,0.66);
    font-size: 0.92rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* === How it works === */
.how-it-works {
    padding: 80px 20px;
    background: linear-gradient(180deg, var(--ivory), white);
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 48px;
    color: var(--navy);
}

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

.step {
    text-align: center;
    padding: 24px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--navy);
    color: var(--gold);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 16px;
}

.step h3 {
    margin-bottom: 8px;
    color: var(--navy);
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* === FAQ === */
.faq {
    padding: 60px 20px;
    background: var(--ivory-dark);
}

.faq h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 32px;
    color: var(--navy);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-item summary {
    padding: 16px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--gold);
    font-weight: 300;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 24px 16px;
    color: var(--text-light);
    line-height: 1.6;
}

/* === Calculator === */
.calculator-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 48px 20px;
    text-align: center;
    color: var(--ivory);
}

.calculator-hero h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.calculator-section {
    padding: 48px 20px;
}

.bazi-form {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    background: var(--ivory);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

.form-options {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
}

.form-actions {
    text-align: center;
    margin-bottom: 12px;
}

.form-disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Result Section === */
.result-section {
    padding: 48px 20px;
}

.chart-display {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.chart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.chart-table th,
.chart-table td {
    padding: 12px 16px;
    border: 1px solid var(--border);
}

.chart-table th {
    background: var(--navy);
    color: var(--ivory);
    font-weight: 600;
}

.chart-table td {
    font-size: 1.1rem;
}

.pillar-card-grid {
    display: none;
}

.pillar-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--ivory);
    overflow: hidden;
}

.pillar-card h4 {
    background: var(--navy);
    color: var(--ivory);
    padding: 10px 14px;
    font-size: 0.95rem;
}

.pillar-card dl {
    display: grid;
    gap: 0;
}

.pillar-card dl div {
    display: grid;
    grid-template-columns: minmax(110px, 42%) 1fr;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.pillar-card dl div:last-child {
    border-bottom: none;
}

.pillar-card dt {
    color: var(--text-light);
    font-size: 0.82rem;
    font-weight: 600;
}

.pillar-card dd {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
}

.pillar-card small {
    color: var(--text-muted);
    font-weight: 500;
}

.elements-display,
.tengods-display,
.luck-pillars-display {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.reading-actions {
    text-align: center;
    padding: 32px;
}

.reading-note {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ai-reading {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.reading-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.reading-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.reading-section h3 {
    color: var(--navy);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.reading-section p {
    color: var(--text-light);
    line-height: 1.8;
}

.reading-disclaimer {
    background: var(--ivory-dark);
    padding: 16px 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--gold);
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 32px 12px;
}

/* === Content Pages === */
.content-section {
    padding: 60px 20px;
}

.content-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
}

.article-content h2 {
    color: var(--navy);
    font-size: 1.5rem;
    margin: 32px 0 16px;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    color: var(--navy);
    font-size: 1.2rem;
    margin: 24px 0 12px;
}

.article-content p {
    margin-bottom: 16px;
    color: var(--text-light);
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-bottom: 16px;
    color: var(--text-light);
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.sidebar-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.sidebar-card h4 {
    color: var(--navy);
    margin-bottom: 12px;
    font-size: 1rem;
}

.sidebar-card ul {
    list-style: none;
    padding: 0;
}

.sidebar-card li {
    margin-bottom: 8px;
}

.sidebar-card a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.sidebar-card a:hover {
    color: var(--gold);
}

.cta-box {
    background: var(--navy);
    color: var(--ivory);
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 40px 0;
}

.cta-box h3 {
    color: var(--ivory);
    margin-bottom: 16px;
}

/* === Ten Gods Grid === */
.tengod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.tengod-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--gold);
    box-shadow: var(--shadow);
}

.tengod-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--navy);
}

.tengod-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

/* === Legal Pages === */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--navy);
    font-size: 1.4rem;
    margin: 32px 0 12px;
}

.legal-content p,
.legal-content li {
    color: var(--text-light);
    line-height: 1.7;
}

/* === Contact === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.success-message {
    background: var(--green);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-top: 16px;
}

/* === Footer === */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.7);
    padding: 60px 20px 24px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--ivory);
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-disclaimer {
    padding: 16px 24px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.footer-disclaimer p {
    font-size: 0.85rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

.footer-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.58);
    font-size: 0.85rem;
}

.footer-stats span {
    white-space: nowrap;
}

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* === Ad Containers === */
.ad-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    min-height: 90px;
    contain: layout;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container:empty {
    display: none;
}

.ad-below-hero {
    min-height: 90px;
    padding: 8px 20px;
}

.ad-sidebar {
    min-height: 250px;
}

/* === Calculator Info === */
.calculator-info {
    padding: 48px 20px;
    background: white;
}

.calculator-info h2 {
    color: var(--navy);
    margin-bottom: 16px;
}

.calculator-info p,
.calculator-info li {
    color: var(--text-light);
}

.calculator-info ul {
    margin: 16px 0;
}

.calculator-info li {
    margin-bottom: 8px;
}

/* === Result Actions === */
.result-actions {
    padding: 24px 0;
    text-align: center;
}

/* === Loading === */
.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 48px;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 16px 20px;
        gap: 12px;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2.28rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero {
        padding: 58px 16px 64px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .hero-proof {
        display: grid;
        gap: 8px;
    }

    .hero-proof span,
    .hero-proof span:first-child {
        border-left: 1px solid rgba(201, 169, 110, 0.45);
        padding-left: 12px;
    }

    .hero-orbit {
        display: none;
    }

    .orbit-ring {
        display: none;
    }

    .hero-panel {
        width: 100%;
    }

    .mini-form-grid,
    .mini-chart {
        grid-template-columns: 1fr;
    }

    .result-preview-grid {
        grid-template-columns: 1fr;
    }

    .reading-preview ul {
        grid-template-columns: 1fr;
    }

    .seo-link-grid {
        grid-template-columns: 1fr;
    }

    .page-hero h1 {
        font-size: 1.6rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .content-container {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .bazi-form {
        padding: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .chart-display {
        padding: 16px;
    }

    .chart-table-wrap {
        display: none;
    }

    .pillar-card-grid {
        display: grid;
        gap: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 48px 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === 2026 Interface Polish ===
   A shared surface system keeps the calculator, reading and editorial pages
   visually connected to the more expressive home page. */
.site-header {
    background: linear-gradient(100deg, rgba(13, 17, 38, 0.98), rgba(29, 35, 65, 0.96));
    box-shadow: 0 10px 30px rgba(5, 8, 20, 0.22);
}

.logo {
    gap: 10px;
    letter-spacing: -0.02em;
}

.logo-icon {
    padding: 4px;
    border: 1px solid rgba(232, 213, 168, 0.24);
    border-radius: 50%;
    color: var(--gold-light);
}

.logo-icon svg {
    width: 25px;
    height: 25px;
}

.nav-menu {
    gap: 8px;
}

.nav-menu a {
    position: relative;
    padding: 8px 10px;
    border-radius: 8px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    right: 10px;
    bottom: 4px;
    left: 10px;
    height: 1px;
    background: var(--gold-light);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition);
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.06);
}

.nav-menu a:hover::after,
.nav-menu a[aria-current="page"]::after {
    transform: scaleX(1);
}

.lang-switcher select {
    padding: 7px 30px 7px 10px;
    border-radius: 8px;
}

.page-hero,
.calculator-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 20%, rgba(201, 169, 110, 0.18), transparent 24rem),
        radial-gradient(circle at 84% 0%, rgba(77, 91, 150, 0.25), transparent 28rem),
        linear-gradient(120deg, #12172f 0%, #20294b 100%);
    padding: 72px 20px 68px;
}

.page-hero::before,
.calculator-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.62;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(120deg, black, transparent 78%);
}

.page-hero h1,
.calculator-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.045em;
    line-height: 1.08;
    text-wrap: balance;
}

.page-subtitle,
.calculator-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.74);
    text-wrap: balance;
}

.btn {
    border-radius: 10px;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 1px rgba(16, 20, 41, 0.08);
}

.btn-primary {
    background: linear-gradient(135deg, #e5cb96 0%, #c7a160 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 24px rgba(151, 112, 48, 0.22), inset 0 1px rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f0dbaa 0%, #d2af70 100%);
    box-shadow: 0 14px 28px rgba(151, 112, 48, 0.28), inset 0 1px rgba(255, 255, 255, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--surface-solid);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card);
}

.calculator-section,
.result-section,
.content-section {
    position: relative;
    padding-top: 68px;
    padding-bottom: 76px;
}

.calculator-section::before,
.result-section::before {
    content: '';
    position: absolute;
    top: 72px;
    left: 50%;
    width: min(920px, 92vw);
    height: 430px;
    border: 1px solid rgba(201, 169, 110, 0.1);
    border-radius: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.bazi-form {
    position: relative;
    max-width: 760px;
    padding: 42px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 249, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-lift);
}

.bazi-form::before {
    content: '';
    position: absolute;
    top: 0;
    right: 38px;
    left: 38px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.form-group {
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #252b4a;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    min-height: 48px;
    padding: 11px 14px;
    color: var(--ink);
    border-color: rgba(26, 31, 58, 0.12);
    border-radius: 10px;
    background: #fcfbf8;
    box-shadow: inset 0 1px 1px rgba(16, 20, 41, 0.025);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(201, 169, 110, 0.52);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    background: white;
    box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.14);
}

.form-options {
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(26, 31, 58, 0.08);
    border-radius: 12px;
    background: linear-gradient(135deg, #fbf8f2, #fffdf9);
}

.checkbox-label {
    min-height: 26px;
    padding: 3px 5px;
    color: #555a6b;
    border-radius: 7px;
    transition: background var(--transition), color var(--transition);
}

.checkbox-label:hover {
    background: rgba(201, 169, 110, 0.1);
    color: var(--navy);
}

.checkbox-label input[type="checkbox"] {
    border-radius: 5px;
}

.form-actions {
    margin-top: 28px;
    margin-bottom: 14px;
}

.form-actions .btn {
    min-width: min(100%, 292px);
}

.form-disclaimer {
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.55;
}

.chart-display,
.elements-display,
.tengods-display,
.luck-pillars-display,
.ai-reading,
.sidebar-card,
.tengod-card {
    border: 1px solid rgba(26, 31, 58, 0.08);
    box-shadow: var(--shadow-card);
}

.chart-display,
.ai-reading {
    padding: 36px;
    background: var(--surface-solid);
}

.elements-display,
.tengods-display,
.luck-pillars-display {
    background: var(--surface-solid);
}

.chart-table {
    overflow: hidden;
    border-style: hidden;
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--border);
}

.chart-table th {
    background: linear-gradient(135deg, #1c2342, #303b69);
}

.chart-table td {
    background: #fffefa;
}

.reading-actions {
    margin: 30px 0;
    padding: 34px;
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 253, 249, 0.85), rgba(248, 242, 231, 0.78));
}

.reading-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reading-section h3::before {
    content: '';
    width: 5px;
    height: 1.15em;
    border-radius: 9px;
    background: var(--gold);
}

.content-container {
    align-items: start;
    gap: 42px;
}

.article-content {
    padding: 8px 10px;
}

.article-content h2 {
    position: relative;
    padding-bottom: 10px;
    letter-spacing: -0.025em;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 42px;
    height: 2px;
    background: var(--gold);
}

.article-content p,
.article-content li {
    color: #61636b;
}

.sidebar-card {
    position: sticky;
    top: calc(var(--header-height) + 28px);
    padding: 26px;
    border-radius: 14px;
    background: var(--surface-solid);
}

.sidebar-card h4 {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-card li {
    margin-bottom: 4px;
}

.sidebar-card a {
    display: block;
    padding: 7px 0;
    transition: color var(--transition), transform var(--transition);
}

.sidebar-card a:hover {
    transform: translateX(3px);
}

.faq-item {
    border: 1px solid rgba(26, 31, 58, 0.08);
    box-shadow: var(--shadow-card);
}

.faq-item summary {
    padding: 19px 24px;
}

.faq-item[open] summary {
    background: rgba(201, 169, 110, 0.075);
}

.site-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(130deg, #11162f, #242d52);
}

.site-footer::before {
    content: '';
    position: absolute;
    width: 460px;
    height: 460px;
    top: -320px;
    right: -100px;
    border: 1px solid rgba(201, 169, 110, 0.18);
    border-radius: 50%;
    box-shadow: inset 0 0 0 70px rgba(201, 169, 110, 0.025);
    pointer-events: none;
}

.footer-container {
    position: relative;
}

@media (max-width: 768px) {
    .nav-menu {
        background: #151a35;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-menu a {
        width: 100%;
    }

    .page-hero,
    .calculator-hero {
        padding: 52px 20px 50px;
    }

    .calculator-section,
    .result-section,
    .content-section {
        padding-top: 46px;
        padding-bottom: 54px;
    }

    .bazi-form {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .bazi-form::before {
        right: 22px;
        left: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-options {
        padding: 14px;
    }

    .chart-display,
    .ai-reading {
        padding: 22px;
    }

    .article-content {
        padding: 0;
    }

    .sidebar-card {
        position: static;
    }
}
