/* ==================== 全局变量 ==================== */
:root {
    /* 柔和的色彩搭配 */
    --bg-primary: #FAF8F5;        /* 米白背景 */
    --bg-secondary: #F5F0EA;      /* 暖灰背景 */
    --bg-card: #FFFFFF;           /* 卡片白 */
    --text-primary: #3D3D3D;      /* 深灰文字 */
    --text-secondary: #7A7A7A;    /* 浅灰文字 */
    --text-muted: #A0A0A0;        /* 淡灰文字 */
    --accent-primary: #C9A87C;   /* 暖金色 */
    --accent-secondary: #B8D4C8; /* 淡青色 */
    --accent-tertiary: #D4B8D9;  /* 淡紫色 */
    --accent-pink: #F0C4C4;      /* 淡粉色 */
    --border-color: #E8E4DE;     /* 边框色 */
    --shadow-soft: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* ==================== 重置与基础 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 56px;
}

/* ==================== 布局 ==================== */
.app {
    display: flex;
    min-height: 100vh;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: 220px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 28px;
}

.logo h1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    text-align: left;
    width: 100%;
    text-decoration: none !important;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 500;
}

a.nav-item {
    text-decoration: none !important;
}
a.nav-item:hover {
    text-decoration: none !important;
}

.nav-category { margin: 4px 0; }
.nav-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    user-select: none;
}
.nav-cat-header:hover { background: var(--bg-secondary); color: var(--text-primary); }
.nav-cat-arrow { margin-left: auto; font-size: 10px; color: var(--text-muted); }
.nav-cat-items { padding-left: 20px; }
.nav-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.nav-cat-item:hover { background: var(--bg-secondary); color: var(--text-primary); }

.nav-icon {
    font-size: 18px;
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 40px;
    min-height: 100vh;
}

/* ==================== 模块通用 ==================== */
.module {
    display: none;
}

.module.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.module-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}

.module-header-left {
    flex: 1;
}

.module-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.module-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.btn-back {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.module-body {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-soft);
}

/* ==================== 首页 ==================== */
.welcome h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
}

.welcome > p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

.quick-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.quick-cards-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 4px;
}

.quick-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.quick-card:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.quick-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.quick-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==================== 星座网格 ==================== */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.zodiac-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.zodiac-item:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

.zodiac-item.selected {
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

.zodiac-symbol {
    font-size: 32px;
    margin-bottom: 8px;
}

.zodiac-name {
    font-size: 14px;
    font-weight: 500;
}

.zodiac-element {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==================== 输入框与按钮 ==================== */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.input-group input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

textarea.dream-textarea {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-secondary);
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

textarea.dream-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

.btn-primary {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-primary), #D4B896);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(201, 168, 124, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==================== 结果区域 ==================== */
.result-area {
    margin-top: 24px;
}

/* ==================== 摇卦结果 ==================== */
.hexagram-display {
    text-align: center;
    padding: 32px;
}

.hexagram-gua {
    font-size: 80px;
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease;
}

.hexagram-name {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.hexagram-section {
    text-align: left;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
}

.hexagram-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

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

/* ==================== 运势结果 ==================== */
.horoscope-result {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-top: 24px;
}

.horoscope-header {
    text-align: center;
    margin-bottom: 32px;
}

.horoscope-symbol {
    font-size: 64px;
    margin-bottom: 8px;
}

.horoscope-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.horoscope-date {
    color: var(--text-muted);
    font-size: 14px;
}

.horoscope-score {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    margin: 16px 0;
}

.horoscope-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.horoscope-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
}

.horoscope-item h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.horoscope-item p {
    font-size: 15px;
    color: var(--text-primary);
}

.lucky-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

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

.lucky-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.lucky-value {
    font-size: 16px;
    font-weight: 500;
}

/* ==================== 黄历结果 ==================== */
.calendar-result {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.calendar-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
}

.calendar-item.full-width {
    grid-column: 1 / -1;
}

.calendar-item h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.calendar-item .ganzhi {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-primary);
}

.good-list, .bad-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.tag.good {
    background: rgba(184, 212, 200, 0.3);
    color: #4A7C65;
}

.tag.bad {
    background: rgba(240, 196, 196, 0.3);
    color: #A05A5A;
}

/* ==================== 塔罗结果 ==================== */
.tarot-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.tarot-controls select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-secondary);
}

.tarot-cards {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.tarot-card {
    width: 160px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 2px solid transparent;
}

.tarot-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.tarot-card.reversed {
    transform: rotate(180deg);
}

.tarot-card.reversed:hover {
    transform: rotate(180deg) translateY(-8px);
}

.tarot-symbol {
    font-size: 48px;
    margin-bottom: 12px;
}

.tarot-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tarot-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tarot-reading {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.tarot-reading h5 {
    font-size: 13px;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.tarot-reading p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== 星座详情 ==================== */
.zodiac-detail-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-top: 24px;
}

.zodiac-detail-header {
    text-align: center;
    margin-bottom: 32px;
}

.zodiac-detail-symbol {
    font-size: 80px;
    margin-bottom: 12px;
}

.zodiac-detail-name {
    font-size: 32px;
    font-weight: 600;
}

.zodiac-detail-range {
    color: var(--text-muted);
    margin-top: 4px;
}

.zodiac-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.zodiac-info-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
}

.zodiac-info-item h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.zodiac-info-item p {
    font-size: 15px;
}

/* ==================== 血型网格 ==================== */
.bloodtype-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.bloodtype-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.bloodtype-item:hover {
    border-color: var(--accent-pink);
    transform: translateY(-2px);
}

.bloodtype-type {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.bloodtype-name {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== MBTI 网格 ==================== */
.mbti-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.mbti-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 15px;
    font-weight: 500;
}

.mbti-item:hover {
    border-color: var(--accent-tertiary);
    transform: translateY(-2px);
}

/* ==================== 生肖网格 ==================== */
.chinesezodiac-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.chinesezodiac-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.chinesezodiac-item:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

.chinesezodiac-symbol {
    font-size: 28px;
    margin-bottom: 4px;
}

.chinesezodiac-animal {
    font-size: 13px;
    font-weight: 500;
}

/* ==================== 详情卡片 ==================== */
.detail-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-top: 24px;
}

.detail-header {
    text-align: center;
    margin-bottom: 24px;
}

.detail-type {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
}

.detail-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.detail-section h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.detail-section ul {
    list-style: none;
}

.detail-section li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-section li::before {
    content: "•";
    color: var(--accent-primary);
    margin-right: 8px;
}

/* ==================== 解读内容样式 ==================== */
.interpretation-content {
    background: linear-gradient(135deg, #FAF8F5 0%, #F5F0EA 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
    line-height: 1.9;
    font-size: 14px;
    color: var(--text-primary);
}

.interpretation-content .interp-heading {
    font-size: 15px;
    font-weight: bold;
    color: var(--accent-primary);
    margin: 16px 0 8px 0;
    padding: 0;
    text-align: left;
    background: none;
    border: none;
}

.interpretation-content .interp-heading + .interp-p,
.interpretation-content .interp-heading-lg {
    margin-top: 0;
}

.interpretation-content .interp-p {
    margin: 0 0 12px 0;
    line-height: 1.9;
}

.interpretation-content .interp-heading-lg {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent-primary);
    margin: 20px 0 10px 0;
    padding: 0;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.interpretation-content strong {
    color: var(--accent-primary);
}

/* ==================== 加载状态 ==================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 12px;
    vertical-align: middle;
}

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

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
    .bloodtype-grid { grid-template-columns: repeat(2, 1fr); }
    .mbti-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .sidebar {
        width: 180px;
    }
    .main-content {
        margin-left: 180px;
        padding: 24px;
    }
    .quick-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .horoscope-grid {
        grid-template-columns: 1fr;
    }
    .calendar-result {
        grid-template-columns: 1fr;
    }
}

/* ==================== 移动端顶部导航 ==================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    padding: 0 16px;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    gap: 5px;
    border-radius: var(--radius-sm);
}

.hamburger:hover {
    background: var(--bg-secondary);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.mobile-logo .logo-icon {
    font-size: 22px;
}

.mobile-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.mobile-nav-btn {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.mobile-nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.mobile-nav-btn-register {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    border: none;
}

.mobile-nav-btn-register:hover {
    opacity: 0.9;
    color: #fff;
}

/* 遮罩层 */
.nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==================== 顶部导航栏 ==================== */
.top-nav-bar {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    padding: 0 24px;
    gap: 16px;
}

.top-nav-bar .nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.top-nav-bar .nav-brand .logo-icon {
    font-size: 24px;
}

.top-nav-bar .nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.top-nav-bar .nav-btn {
    padding: 6px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.top-nav-bar .nav-btn-login {
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.top-nav-bar .nav-btn-login:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.top-nav-bar .nav-btn-home {
    color: var(--primary-color);
    background: rgba(201,168,124,0.12);
    border: 1px solid rgba(201,168,124,0.3);
    font-weight: 600;
}

.top-nav-bar .nav-btn-home:hover {
    background: rgba(201,168,124,0.2);
}

.top-nav-bar .nav-btn-register {
    color: #a05a5a;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.top-nav-bar .nav-btn-register:hover {
    color: #a05a5a;
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.top-nav-bar .nav-btn-register:active {
    color: #a05a5a;
    opacity: 0.85;
}

/* ==================== 移动端响应式 ==================== */
@media (max-width: 768px) {
    /* 移动端顶部导航 */
    .top-nav-bar {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    /* 侧边栏变成左侧抽屉 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        z-index: 1002;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
        pointer-events: none;
    }

    .sidebar.open {
        transform: translateX(0);
        pointer-events: auto;
    }

    /* logo在抽屉里完整显示 */
    .logo {
        border-bottom: 1px solid var(--border-color);
        border-right: none;
        margin-right: 0;
        padding-right: 0;
        margin-bottom: 16px;
        padding-bottom: 16px;
    }

    .logo h1 {
        font-size: 15px;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-item span {
        display: inline;
    }

    /* 主内容区 */
    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: 68px; /* 顶部导航高度 */
    }

    /* 遮罩层 */
    .nav-overlay {
        /* inherits from base: display:block, pointer-events handled by .active */
    }

    /* 卡片和网格移动端自适应 */
    .quick-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .zodiac-grid,
    .bloodtype-grid,
    .tarot-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .mbti-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

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

    /* 输入框、按钮全宽 */
    .input-group {
        flex-direction: column;
    }

    .input-group input,
    .input-group textarea,
    .input-group select {
        width: 100%;
    }

    .btn-primary {
        width: 100%;
    }

    /* 首页 */
    .welcome h2 {
        font-size: 20px;
    }

    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .module-header h2 {
        font-size: 18px;
    }

    .btn-back {
        font-size: 13px;
        padding: 6px 12px;
    }

    /* 塔罗牌移动端 */
    .tarot-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    /* 解梦textarea */
    .dream-textarea {
        width: 100%;
    }

    /* 结果区域 */
    .result-area {
        margin-top: 16px;
    }
}

@media (max-width: 480px) {
    .quick-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mbti-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .module-header h2 {
        font-size: 17px;
    }

    .btn-back {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* 首页深度分析 */
    .home-analysis-section { margin-top: 24px; }
    .home-analysis-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* === 登录提示弹窗 === */
.login-tip { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); z-index: 300; align-items: center; justify-content: center; padding: 24px; }
.login-tip.show { display: flex; }
.login-tip-box { background: #fff; border-radius: 22px; max-width: 340px; width: 100%; padding: 32px 28px; text-align: center; }
.login-tip-icon { font-size: 40px; margin-bottom: 14px; }
.login-tip-title { font-size: 17px; font-weight: 700; color: #3D3D3D; margin-bottom: 8px; }
.login-tip-desc { font-size: 13px; color: #7A7A7A; margin-bottom: 22px; line-height: 1.6; }
.login-tip-btns { display: flex; gap: 10px; }
.login-tip-btn { flex: 1; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; font-family: inherit; transition: all 0.2s; }
.login-tip-btn-register { background: #C9A87C; color: #fff; border: none; }
.login-tip-btn-login { background: #fff; color: #7A7A7A; border: 1.5px solid #E8E4DE; }
.login-tip-close { display: block; margin-top: 12px; font-size: 12px; color: #A0A0A0; cursor: pointer; background: none; border: none; font-family: inherit; }

/* === 首页深度分析 === */
.home-analysis-section { margin-top: 32px; }
.home-analysis-title { font-size: 17px; font-weight: 600; color: #3D3D3D; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.home-analysis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.home-analysis-card { background: #F5F0EA; border-radius: 14px; padding: 18px; cursor: pointer; transition: all 0.2s; text-align: center; }
.home-analysis-card:hover { background: #EDE6DA; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.home-analysis-icon { font-size: 28px; margin-bottom: 8px; }
.home-analysis-name { font-size: 13px; font-weight: 600; color: #3D3D3D; margin-bottom: 3px; }
.home-analysis-desc { font-size: 11px; color: #7A7A7A; line-height: 1.4; }

/* === 分析结果区 === */
.home-analysis-result-area { margin-top: 16px; display: none; }
.home-analysis-result-area.show { display: block; }
.home-analysis-result-card { background: #FFFCF5; border: 1.5px solid #E8DCC8; border-radius: 16px; padding: 20px; }
.home-analysis-result-card .loading { text-align: center; color: #A0A0A0; font-size: 14px; padding: 20px 0; }
.interpretation-text { font-size: 14px; line-height: 1.8; color: #3D3D3D; white-space: pre-wrap; }

/* === 通用工具历史记录 === */
.btn-history-toggle { width: 100%; padding: 12px; margin-top: 12px; background: #F5F0EA; color: #7A7A7A; border: 1.5px solid #E8E4DE; border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; text-align: center; }
.btn-history-toggle:hover { background: #EDE8E0; color: #C9A87C; border-color: #C9A87C; }
.history-table-container { margin-top: 10px; }
.tool-history-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #E8E4DE; }
.tool-history-table th { padding: 9px 12px; background: #F5F0EA; font-size: 11px; font-weight: 600; color: #7A7A7A; text-align: left; border-bottom: 1px solid #E8E4DE; }
.tool-history-table td { padding: 8px 12px; border-bottom: 1px solid #E8E4DE; }
.tool-history-table tr:last-child td { border-bottom: none; }
.tool-history-table tr:hover { background: #FAF8F5; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); z-index: 200; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.show { display: flex; }
.modal-content { background: #fff; border-radius: 22px; max-width: 600px; width: 100%; padding: 28px; position: relative; max-height: 80vh; overflow-y: auto; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #A0A0A0; }
/* ==================== 电台播放器 ==================== */
.radio-dock {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    transition: right 0.3s ease;
}

.radio-dock:hover {
    right: 0;
}

.radio-trigger {
    width: 56px;
    height: 56px;
    border-radius: 16px 0 0 16px;
    background: linear-gradient(135deg, #C9A87C, #E8C98A);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 2px 12px rgba(0,0,0,0.15);
    font-size: 22px;
    writing-mode: vertical-rl;
    letter-spacing: 2px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding-bottom: 2px;
}

.radio-panel {
    position: fixed;
    right: -320px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    max-height: 80vh;
    background: #fff;
    border-radius: 20px 0 0 20px;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 899;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.radio-panel.open {
    right: 0;
}

.radio-weather {
    padding: 16px 20px;
    background: linear-gradient(135deg, #E8C98A22, #C9A87C22);
    border-bottom: 1px solid #F0E8D8;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-weather-icon { font-size: 20px; }

.radio-now {
    padding: 16px 20px;
    border-bottom: 1px solid #F0E8D8;
}

.radio-now-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.radio-song-cover {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.radio-song-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.radio-song-artist {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.radio-song-reason {
    font-size: 11px;
    color: #C9A87C;
    font-style: italic;
}

.radio-controls {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-bottom: 1px solid #F0E8D8;
}

.radio-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
}

.radio-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.radio-btn.play-pause {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #C9A87C, #E8C98A);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-btn.play-pause:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(201,168,124,0.4);
}

.radio-btn.active-mode {
    background: linear-gradient(135deg, #C9A87C, #E8C98A);
    color: #fff;
    border-radius: 50%;
}

.radio-progress-wrap {
    padding: 10px 20px;
    border-bottom: 1px solid #F0E8D8;
}

.radio-progress-bar {
    width: 100%;
    height: 4px;
    background: #E8E4DE;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.radio-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A87C, #E8C98A);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s linear;
}

.radio-time {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.radio-queue {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.radio-queue-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 8px 6px;
}

.radio-queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.radio-queue-item:hover {
    background: var(--bg-secondary);
}

.radio-queue-item.playing {
    background: #F5EFE6;
}

.radio-queue-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.radio-queue-info {
    flex: 1;
    min-width: 0;
}

.radio-queue-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-queue-artist {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-tts-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #C9A87C, #E8C98A);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.radio-empty {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.radio-empty-icon { font-size: 32px; margin-bottom: 8px; display: block; }

.radio-login-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    background: linear-gradient(135deg, #C9A87C, #E8C98A);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: opacity 0.2s;
}
.radio-login-btn:hover { opacity: 0.88; }

.radio-btn-text {
    font-size: 16px;
    min-width: 36px;
}

.radio-btn.active-mode {
    background: linear-gradient(135deg, #C9A87C22, #E8C98A22);
    color: #C9A87C;
    border: 1.5px solid #C9A87C;
}
