/* ====== 全局变量 ====== */
:root {
    --bg-primary: #080c16;
    --bg-secondary: #0f1629;
    --bg-card: #141c2e;
    --bg-card-hover: #1a2540;
    --bg-input: #0a1020;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8860b;
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
    --gold-gradient-subtle: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    --border: #1e293b;
    --border-light: #334155;
    --success: #22c55e;
    --error: #ef4444;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== 基础重置 ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====== 自定义滚动条 ====== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

/* ====== 侧边栏 ====== */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gold-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: var(--shadow-gold);
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.logo-text p {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 2px;
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section h3 {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0 16px 10px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--gold-gradient-subtle);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--gold-gradient-subtle);
    color: var(--gold);
    border-left: 3px solid var(--gold);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

/* ====== 主内容区 ====== */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

/* ====== 免责声明 ====== */
.disclaimer-banner {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding: 10px 32px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.5px;
}

/* ====== 顶部栏 ====== */
.top-bar {
    height: 64px;
    background: rgba(15, 22, 41, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.search-box input {
    flex: 1;
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    color: var(--gold);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.balance-display {
    background: var(--gold-gradient-subtle);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-xl);
    padding: 8px 18px;
    color: var(--gold);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.balance-display:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.08) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.notification-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.notification-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--gold);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.user-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 13px;
    transition: var(--transition);
}

.user-dropdown input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.user-dropdown input::placeholder {
    color: var(--text-muted);
}

.user-dropdown button {
    width: 100%;
    margin-bottom: 10px;
}

.user-dropdown button:last-child {
    margin-bottom: 0;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.user-balance {
    color: var(--gold);
    font-size: 13px;
    margin-bottom: 14px;
    font-weight: 500;
}

/* ====== 按钮样式 ====== */
.btn-primary {
    padding: 12px 24px;
    background: var(--gold-gradient);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
}

.btn-gold {
    padding: 14px 36px;
    background: var(--gold-gradient);
    color: #000;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.45);
}

.btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    color: var(--gold);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-small:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    color: var(--gold);
}

.btn-danger {
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

/* ====== 页面容器 ====== */
.page-container {
    padding: 32px;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== 页面头部 ====== */
.page-header {
    margin-bottom: 36px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ====== 首页 ====== */
.hero-section {
    text-align: center;
    padding: 80px 40px 60px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.06) 0%, transparent 100%);
    border-radius: var(--radius-xl);
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 10px 28px;
    background: var(--gold-gradient-subtle);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-xl);
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 72px;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-shadow: 0 2px 40px rgba(212, 175, 55, 0.2);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ====== 模块卡片 ====== */
.section-title {
    text-align: center;
    margin-bottom: 44px;
}

.section-title h2 {
    font-size: 38px;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 15px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.1);
}

.module-card:hover::before {
    opacity: 1;
}

.module-icon {
    font-size: 48px;
    margin-bottom: 18px;
}

.module-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.module-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 18px;
}

.module-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.module-card:hover .module-link {
    gap: 10px;
}

/* ====== 表单样式 ====== */
.input-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 680px;
}

.form-row {
    margin-bottom: 18px;
}

.form-row > label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.radio-btn:has(input:checked) {
    border-color: var(--gold);
    background: var(--gold-gradient-subtle);
    color: var(--gold);
}

.radio-btn input {
    display: none;
}

.birth-input-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.birth-input-item {
    flex: 1;
    min-width: 80px;
}

.birth-input-item label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-align: center;
    font-weight: 500;
}

.birth-input-item input,
.birth-input-item select {
    width: 100%;
    padding: 12px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    text-align: center;
    transition: var(--transition);
}

.birth-input-item input:focus,
.birth-input-item select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.form-actions {
    margin-top: 32px;
}

/* ====== 八字结果 ====== */
.bazi-result-section {
    margin-top: 40px;
}

.interpretation-box {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-gold);
}

.interp-header {
    font-size: 15px;
    color: var(--gold);
    margin-bottom: 16px;
    font-weight: 600;
}

.interpretation-box p {
    line-height: 1.9;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.pillars-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.pillar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.pillar:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-3px);
}

.pillar-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.pillar-value {
    font-size: 44px;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.pillar-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.tag-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ====== 五行统计 ====== */
.five-elements-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.five-elements-chart,
.strength-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.five-elements-chart h3,
.strength-section h3 {
    margin-bottom: 24px;
    font-size: 16px;
    color: var(--gold);
    font-weight: 600;
}

.element-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.element-bar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.element-name {
    width: 32px;
    font-weight: 700;
    font-size: 14px;
}

.element-bar[data-element="wood"] .element-name { color: #22c55e; }
.element-bar[data-element="fire"] .element-name { color: #ef4444; }
.element-bar[data-element="earth"] .element-name { color: #eab308; }
.element-bar[data-element="metal"] .element-name { color: #e5e7eb; }
.element-bar[data-element="water"] .element-name { color: #3b82f6; }

.bar-track {
    flex: 1;
    height: 10px;
    background: var(--bg-input);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.element-bar[data-element="wood"] .bar-fill { background: linear-gradient(90deg, #22c55e, #4ade80); }
.element-bar[data-element="fire"] .bar-fill { background: linear-gradient(90deg, #ef4444, #f87171); }
.element-bar[data-element="earth"] .bar-fill { background: linear-gradient(90deg, #eab308, #facc15); }
.element-bar[data-element="metal"] .bar-fill { background: linear-gradient(90deg, #e5e7eb, #f3f4f6); }
.element-bar[data-element="water"] .bar-fill { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.element-count {
    width: 32px;
    text-align: right;
    font-weight: 700;
    font-size: 15px;
}

.strength-section p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

/* ====== AI解读区域 ====== */
.ai-reading-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
}

.ai-reading-section h3 {
    font-size: 20px;
    margin-bottom: 8px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-reading-section > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

.price-display {
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 28px;
}

.price-amount {
    font-weight: 800;
    font-size: 26px;
}

.ai-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

.ai-content {
    text-align: left;
    white-space: pre-wrap;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    line-height: 1.9;
    color: var(--text-secondary);
    font-size: 14px;
}

.ai-error {
    color: var(--error);
    padding: 18px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 14px;
}

/* ====== 紫微斗数 ====== */
.ziwei-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.ziwei-palace {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ziwei-palace:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.palace-name {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.palace-stars {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
}

/* ====== 生肖运势 ====== */
.zodiac-select {
    margin-bottom: 28px;
}

.zodiac-select select {
    padding: 14px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.zodiac-select select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.zodiac-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.zodiac-header {
    text-align: center;
    margin-bottom: 32px;
}

.zodiac-icon {
    font-size: 88px;
    margin-bottom: 16px;
}

.zodiac-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
}

.zodiac-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}

.tab-btn {
    padding: 10px 24px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.tab-btn.active {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
}

.zodiac-score {
    text-align: center;
    margin-bottom: 36px;
}

.score-number {
    font-size: 76px;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-label {
    color: var(--text-secondary);
    margin-top: 10px;
    font-size: 15px;
}

.zodiac-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.detail-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 22px;
}

.detail-card h4 {
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 15px;
    font-weight: 600;
}

.detail-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

/* ====== 塔罗占卜 ====== */
.tarot-intro {
    text-align: center;
    margin-bottom: 44px;
}

.tarot-intro p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 15px;
}

.tarot-cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 44px;
}

.tarot-card {
    width: 170px;
    height: 255px;
    perspective: 1000px;
    cursor: pointer;
}

.card-back,
.card-front {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.card-back {
    background: linear-gradient(135deg, #141c2e 0%, #1e293b 100%);
    border: 2px solid var(--gold);
    font-size: 64px;
    box-shadow: var(--shadow-gold);
}

.card-front {
    background: linear-gradient(135deg, #1e293b 0%, #141c2e 100%);
    border: 2px solid var(--gold);
}

.card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
}

.card-position {
    font-size: 13px;
    color: var(--text-secondary);
}

.tarot-reading {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.tarot-reading h3 {
    text-align: center;
    margin-bottom: 28px;
    font-size: 18px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reading-item {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.reading-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.reading-item h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--gold);
    font-weight: 600;
}

.position-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--gold-gradient);
    color: #000;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.reading-item p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

/* ====== 风水指南 ====== */
.fengshui-input {
    margin-bottom: 32px;
}

.direction-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.direction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: var(--transition);
}

.direction-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.direction-card h4 {
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.direction-attr {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.direction-card p:last-child {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 12px;
}

/* ====== 术语词典 ====== */
.glossary-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.glossary-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.glossary-item h4 {
    color: var(--gold);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.glossary-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

/* ====== 个人中心 ====== */
.profile-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.profile-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.balance-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-gold);
}

.balance-card h3 {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.balance-amount {
    font-size: 36px;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

.stat-num {
    font-size: 24px;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
}

.tab-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    max-height: 500px;
    overflow-y: auto;
}

/* ====== 历史记录 ====== */
.history-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.history-filter select {
    padding: 11px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.history-filter select:focus {
    border-color: var(--gold);
}

.history-stats {
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 13px;
}

.history-list-full {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    max-height: 600px;
    overflow-y: auto;
}

.history-item-full {
    cursor: pointer;
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: var(--transition);
}

.history-item-full:hover {
    background: var(--bg-card-hover);
}

.history-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
}

.history-item-left {
    flex: 1;
}

.history-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.history-type {
    display: inline-block;
    padding: 4px 10px;
    background: var(--gold-gradient);
    color: #000;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.history-input {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 4px;
}

.history-result {
    color: var(--text-primary);
    font-size: 13px;
}

.history-time {
    color: var(--text-muted);
    font-size: 11px;
}

.history-detail {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius) var(--radius);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-section {
    margin-bottom: 12px;
}

.detail-section h4 {
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.detail-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.history-empty {
    text-align: center;
    padding: 44px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ====== 余额记录 ====== */
.balance-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.balance-record-item:last-child {
    border-bottom: none;
}

.record-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.record-desc {
    font-size: 13px;
}

.record-time {
    font-size: 11px;
    color: var(--text-muted);
}

.record-amount {
    font-size: 15px;
    font-weight: 700;
}

.record-amount.positive {
    color: var(--success);
}

.record-amount.negative {
    color: var(--error);
}

/* ====== 弹窗 ====== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 90%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 24px;
    text-align: center;
    font-size: 18px;
}

.modal-content input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 14px;
}

.modal-content input:focus {
    border-color: var(--gold);
    outline: none;
}

.modal-content button {
    width: 100%;
    margin-bottom: 10px;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.recharge-btn {
    padding: 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.recharge-btn:hover {
    border-color: var(--gold);
    background: var(--gold-gradient-subtle);
}

/* ====== 提示框 ====== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 28px;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
    z-index: 2000;
    box-shadow: var(--shadow-gold);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ====== 管理员后台 ====== */
.wechat-info {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.wechat-id {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    margin-right: 12px;
}

.btn-copy {
    padding: 8px 16px;
    background: var(--gold-gradient);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    transform: translateY(-1px);
}

.recharge-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.admin-tab {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.admin-tab.active {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
}

.admin-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-header h3 {
    font-size: 18px;
    color: var(--gold);
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    font-size: 14px;
}

.admin-table tr:hover {
    background: var(--bg-card-hover);
}

.status-active {
    color: var(--success);
}

.status-disabled {
    color: var(--error);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.recharge-tip {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.recharge-steps {
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
}

.recharge-steps p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.my-fortune-card {
    background: var(--gold-gradient-subtle);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

.my-fortune-card h3 {
    margin-bottom: 6px;
    font-size: 15px;
}

.my-fortune-card p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 12px;
}

.user-info-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.user-info-form h3 {
    margin-bottom: 6px;
    font-size: 16px;
    color: var(--gold);
}

.form-hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.history-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.history-section h3 {
    margin-bottom: 14px;
    font-size: 16px;
    color: var(--gold);
}

.price-category-section {
    margin-bottom: 24px;
}

.price-category-section h4 {
    color: var(--gold);
    margin-bottom: 12px;
    font-size: 16px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.price-item-name {
    flex: 1;
}

.price-item-input {
    width: 100px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    margin-right: 12px;
}

.price-item-input:focus {
    border-color: var(--gold);
    outline: none;
}

/* ====== 响应式 ====== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .pillars-display {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .five-elements-section {
        grid-template-columns: 1fr;
    }
    
    .ziwei-chart {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .direction-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-section {
        grid-template-columns: 1fr;
    }
    
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 48px;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .zodiac-details {
        grid-template-columns: 1fr;
    }
    
    .tarot-cards {
        flex-direction: column;
        align-items: center;
    }
}