/* MysticPlate - AI紫薇斗数命理分析系统 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --indigo-50: #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --amber-50: #fffbeb;
    --amber-500: #f59e0b;
    --amber-700: #b45309;
    
    /* 主星颜色 */
    --star-ziwei: #8b5cf6;      /* 紫微 - 紫色 */
    --star-tianji: #3b82f6;     /* 天机 - 蓝色 */
    --star-taiyang: #f59e0b;    /* 太阳 - 金色 */
    --star-wuqu: #ef4444;       /* 武曲 - 红色 */
    --star-tiantong: #10b981;   /* 天同 - 绿色 */
    --star-lianzhen: #ec4899;   /* 廉贞 - 粉色 */
    --star-tianfu: #8b5cf6;     /* 天府 - 紫色 */
    --star-taiyin: #06b6d4;     /* 太阴 - 青色 */
    --star-tanlang: #f97316;    /* 贪狼 - 橙色 */
    --star-jumen: #a855f7;      /* 巨门 - 紫罗兰 */
    --star-tianxiang: #14b8a6;  /* 天相 - 青绿色 */
    --star-tianliang: #6366f1;  /* 天梁 - 靛蓝 */
    --star-qisha: #dc2626;      /* 七杀 - 深红 */
    --star-pojun: #78716c;      /* 破军 - 灰色 */
    
    /* 四化颜色 */
    --hua-lu: #22c55e;          /* 化禄 - 绿色 */
    --hua-quan: #ef4444;        /* 化权 - 红色 */
    --hua-ke: #3b82f6;          /* 化科 - 蓝色 */
    --hua-ji: #6b7280;          /* 化忌 - 灰色 */
    
    /* 辅星颜色 */
    --star-fu: #f59e0b;         /* 吉星辅星 - 金色 */
    --star-sha: #dc2626;        /* 煞星 - 暗红色 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f4f7fa;
    color: var(--slate-900);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 全局背景 */
.global-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(100px);
}

.bg-blob-1 {
    top: 25%;
    left: 10%;
    width: 384px;
    height: 384px;
    background: rgba(165, 180, 252, 0.2);
    animation: float-1 20s ease-in-out infinite;
}

.bg-blob-2 {
    bottom: 25%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: rgba(196, 181, 253, 0.2);
    animation: float-2 25s ease-in-out infinite reverse;
}

@keyframes float-1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(50px, -30px, 50px) scale(1.1); }
}

@keyframes float-2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-60px, 40px, -50px) scale(1.05); }
}

/* 顶部导航 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    width: 32px;
    height: 32px;
    background: var(--indigo-600);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-800);
    letter-spacing: -0.025em;
}

.nav-badge {
    display: none;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: var(--indigo-50);
    color: var(--indigo-600);
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid var(--indigo-100);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (min-width: 640px) {
    .nav-badge { display: inline-block; }
}

.nav-right {
    display: none;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-500);
}

@media (min-width: 768px) {
    .nav-right { display: flex; }
}

.nav-link {
    color: var(--slate-500);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--slate-800);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--indigo-600);
    background: var(--indigo-50);
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--indigo-100);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-btn:hover {
    color: var(--indigo-700);
    background: var(--indigo-100);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .main-container { padding: 1.5rem; }
}

/* 卡片基础样式 */
.section-card {
    background: white;
    border: 1px solid var(--slate-200);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card-bg-blob {
    position: absolute;
    top: 0;
    right: 0;
    width: 256px;
    height: 256px;
    background: var(--indigo-50);
    border-radius: 50%;
    filter: blur(48px);
    transform: translate(50%, -50%);
    pointer-events: none;
}

@media (min-width: 768px) {
    .section-card { padding: 2rem; }
}

/* 区域标题 */
.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate-800);
}

.title-bar {
    width: 6px;
    height: 24px;
    background: var(--indigo-600);
    border-radius: 9999px;
}

/* 日历切换 */
.calendar-toggle {
    display: flex;
    background: var(--slate-100);
    padding: 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
    width: fit-content;
    flex-shrink: 0;
}

.toggle-btn {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: white;
    color: var(--indigo-600);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-btn:hover:not(.active) {
    color: var(--slate-700);
}

/* 表单样式 */
.form-content {
    position: relative;
    z-index: 10;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.form-row-bottom {
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .form-row-bottom {
        margin-top: 1.25rem;
        align-items: end;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-500);
}

.form-group input,
.form-group select {
    width: 100%;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.form-group-wide {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .form-group-wide { grid-column: span 2; }
}

.form-group-btn {
    padding-top: 0.5rem;
}

/* 主按钮 */
.primary-btn {
    width: 100%;
    background: var(--indigo-600);
    color: white;
    font-weight: 700;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    height: 42px;
}

.primary-btn:hover {
    background: var(--indigo-700);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* 双栏布局 */
.dual-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .dual-panel {
        grid-template-columns: 7fr 5fr;
    }
}

/* 命盘区域 */
.chart-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-card {
    background: white;
    border: 1px solid var(--slate-200);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
}

@media (min-width: 768px) {
    .chart-card { padding: 1.5rem; }
}

.chart-frame {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1;
    background: white;
    border: 4px double var(--slate-800);
    padding: 4px;
    position: relative;
    box-shadow: 0 25px 50px rgba(100, 116, 139, 0.3);
    overflow: hidden;
    margin: 0 auto;
}

/* 命盘网格 */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    height: 100%;
    gap: 1px;
    background: var(--slate-800);
    position: relative;
    z-index: 10;
}

.palace-cell {
    position: relative;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.palace-cell:hover {
    background: var(--indigo-50);
}

.palace-cell.selected {
    background: var(--indigo-50);
    box-shadow: inset 0 0 0 2px var(--indigo-500);
    z-index: 20;
    transform: scale(1.02);
}

.palace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.palace-name {
    font-size: 10px;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
    transition: all 0.2s;
}

.palace-cell.selected .palace-name {
    background: var(--indigo-600);
    color: white;
}

.palace-cell:not(.selected) .palace-name {
    background: var(--slate-100);
    color: var(--slate-600);
}

.palace-level {
    font-size: 10px;
    color: var(--slate-400);
}

.palace-stars {
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
    position: relative;
    z-index: 10;
}

.palace-star {
    font-size: 0.875rem;
    font-family: 'Songti SC', 'SimSun', serif;
    position: relative;
    cursor: help;
    transition: all 0.2s;
}

.palace-star:hover {
    transform: scale(1.1);
}

.palace-star:first-child {
    color: var(--slate-900);
    font-weight: 700;
}

.palace-star:not(:first-child) {
    color: var(--slate-600);
}

/* 主星颜色编码 */
.star-ziwei { color: var(--star-ziwei) !important; }
.star-tianji { color: var(--star-tianji) !important; }
.star-taiyang { color: var(--star-taiyang) !important; }
.star-wuqu { color: var(--star-wuqu) !important; }
.star-tiantong { color: var(--star-tiantong) !important; }
.star-lianzhen { color: var(--star-lianzhen) !important; }
.star-tianfu { color: var(--star-tianfu) !important; }
.star-taiyin { color: var(--star-taiyin) !important; }
.star-tanlang { color: var(--star-tanlang) !important; }
.star-jumen { color: var(--star-jumen) !important; }
.star-tianxiang { color: var(--star-tianxiang) !important; }
.star-tianliang { color: var(--star-tianliang) !important; }
.star-qisha { color: var(--star-qisha) !important; }
.star-pojun { color: var(--star-pojun) !important; }

/* 四化标记 */
.hua-lu::after { content: '禄'; font-size: 9px; color: var(--hua-lu); margin-left: 2px; }
.hua-quan::after { content: '权'; font-size: 9px; color: var(--hua-quan); margin-left: 2px; }
.hua-ke::after { content: '科'; font-size: 9px; color: var(--hua-ke); margin-left: 2px; }
.hua-ji::after { content: '忌'; font-size: 9px; color: var(--hua-ji); margin-left: 2px; }

/* 辅星颜色 */
.star-aux-god { color: var(--star-fu) !important; font-size: 0.75rem; }
.star-aux-evil { color: var(--star-sha) !important; font-size: 0.75rem; }

/* 星曜Tooltip */
.star-tooltip {
    position: fixed;
    z-index: 1000;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    animation: tooltipFadeIn 0.2s ease;
    pointer-events: none;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.star-tooltip-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star-tooltip-type {
    font-size: 10px;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.star-tooltip-type.main { background: var(--indigo-50); color: var(--indigo-600); }
.star-tooltip-type.aux { background: var(--amber-50); color: var(--amber-700); }
.star-tooltip-type.transform { background: #dcfce7; color: #15803d; }

.star-tooltip-desc {
    font-size: 0.75rem;
    color: var(--slate-600);
    line-height: 1.6;
}

.star-tooltip-nature {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--slate-100);
    font-size: 0.75rem;
    color: var(--slate-500);
}

/* 宫位干支显示 */
.palace-ganzhi {
    font-size: 9px;
    color: var(--slate-400);
    margin-left: 0.25rem;
}

/* 星曜亮度指示 */
.palace-brightness {
    font-size: 8px;
    padding: 0 0.125rem;
    border-radius: 2px;
    margin-left: 0.125rem;
}

.brightness-miao { background: #dcfce7; color: #15803d; }  /* 庙 - 绿色 */
.brightness-wang { background: #dbeafe; color: #1d4ed8; }  /* 旺 - 蓝色 */
.brightness-li { background: #fef3c7; color: #b45309; }    /* 利 - 黄色 */
.brightness-xian { background: #fee2e2; color: #b91c1c; }  /* 陷 - 红色 */

.palace-element {
    position: absolute;
    bottom: 0.25rem;
    right: 0.375rem;
    font-size: 10px;
    color: var(--slate-300);
    font-family: 'Songti SC', 'SimSun', serif;
}

/* 中宫区域 */
.center-palace {
    grid-column: 2 / 4;
    grid-row: 2 / 4;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    perspective: 1000px;
    transform-style: preserve-3d;
}

.center-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23f1f5f9" width="100" height="100"/><g fill="%23e2e8f0"><polygon points="50 30 100 0 100 20 50 50"/><polygon points="0 0 50 30 50 50 0 20"/></g></svg>');
    background-size: 20px 20px;
    opacity: 0.05;
}

/* 3D 全息罗盘 */
.hologram-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.hologram-svg {
    width: 180%;
    height: 180%;
    color: rgba(245, 158, 11, 0.3);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
    animation: rotate-3d-hologram 60s linear infinite;
}

@keyframes rotate-3d-hologram {
    0% { transform: rotateX(60deg) rotateZ(0deg); }
    100% { transform: rotateX(60deg) rotateZ(360deg); }
}

.rotate-reverse {
    animation: spin-reverse 40s linear infinite;
    transform-origin: center;
}

@keyframes spin-reverse {
    0% { transform: rotateZ(360deg); }
    100% { transform: rotateZ(0deg); }
}

/* 中心卡片 */
.center-card {
    position: relative;
    z-index: 10;
    width: 85%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.center-card:hover {
    transform: scale(1.05);
}

.inner-ring {
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    animation: spin-reverse 40s linear infinite;
    pointer-events: none;
}

.radial-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-radius: 50%;
    pointer-events: none;
}

.ziwei-stamp {
    position: absolute;
    top: 14%;
    right: 14%;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: rgba(239, 68, 68, 0.6);
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(12deg);
    font-family: 'Songti SC', 'SimSun', serif;
    border-radius: 2px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
}

.user-name {
    font-size: 1.5rem;
    font-family: 'Songti SC', 'SimSun', serif;
    color: var(--slate-800);
    margin-bottom: 0.25rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    background: linear-gradient(to bottom right, var(--slate-900), var(--slate-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 20;
    max-width: 75%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .user-name { font-size: 1.875rem; }
}

.user-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 20;
}

.badge {
    padding: 0.125rem 0.375rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 0.25rem;
    color: var(--slate-600);
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-info {
    font-size: 10px;
    color: var(--slate-500);
    text-align: center;
    font-weight: 500;
    position: relative;
    z-index: 20;
}

@media (min-width: 640px) {
    .user-info { font-size: 11px; }
}

.calendar-type {
    color: var(--indigo-600);
    font-weight: 700;
}

.bazi {
    color: var(--slate-400);
    transform: scale(0.95);
}

.mingzhu {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-700);
    position: relative;
    z-index: 20;
}

.mingzhu-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--amber-700);
    background: rgba(255, 251, 235, 0.9);
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    border: 1px solid rgba(251, 191, 36, 0.6);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 10px;
}

.mingzhu-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber-500);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 聊天区域 */
.chat-section {
    height: 600px;
}

.chat-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.chat-header {
    flex-shrink: 0;
    border-bottom: 1px solid var(--slate-100);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to right, var(--slate-50), white);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    background: var(--indigo-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo-600);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-800);
}

.chat-subtitle {
    font-size: 10px;
    color: var(--slate-500);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 10px;
    color: var(--indigo-600);
    background: var(--indigo-50);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--indigo-100);
}

.pulse {
    animation: pulse 2s infinite;
}

/* 聊天消息 */
.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem;
    background: rgba(248, 250, 252, 0.5);
}

.message {
    display: flex;
    margin-bottom: 1rem;
}

.message.user {
    justify-content: flex-end;
}

.message.ai {
    justify-content: flex-start;
}

.message-content {
    max-width: 85%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.625;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.user .message-content {
    background: var(--indigo-600);
    color: white;
    border-radius: 1rem;
    border-top-right-radius: 2px;
}

.message.ai .message-content {
    background: white;
    border: 1px solid var(--slate-200);
    color: var(--slate-700);
    border-radius: 1rem;
    border-top-left-radius: 2px;
}

.typing-indicator {
    display: flex;
    justify-content: flex-start;
}

.typing-dots {
    max-width: 85%;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    border-top-left-radius: 2px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--indigo-400);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: 0ms; }
.typing-dot:nth-child(2) { animation-delay: 150ms; }
.typing-dot:nth-child(3) { animation-delay: 300ms; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* 聊天建议 */
.chat-suggestions {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: white;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    border-top: 1px solid var(--slate-100);
}

.chat-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestion-btn {
    white-space: nowrap;
    padding: 0.375rem 0.75rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.suggestion-btn:hover {
    background: var(--indigo-50);
    border-color: var(--indigo-200);
    color: var(--indigo-600);
}

/* 聊天输入 */
.chat-input-container {
    flex-shrink: 0;
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--slate-100);
}

.chat-form {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-form input {
    width: 100%;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 9999px;
    padding: 0.625rem 1rem;
    padding-right: 3rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-form input:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.send-btn {
    position: absolute;
    right: 6px;
    width: 32px;
    height: 32px;
    background: var(--indigo-600);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.send-btn:hover:not(:disabled) {
    background: var(--indigo-700);
}

.send-btn:disabled {
    background: var(--slate-300);
    cursor: not-allowed;
}

/* 分析区域 */
.analysis-section {
    margin-bottom: 2rem;
}

.analysis-card {
    background: white;
    border: 1px solid var(--slate-200);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .analysis-card { padding: 2rem; }
}

.analysis-title {
    font-size: 1.25rem;
    font-family: 'Songti SC', 'SimSun', serif;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate-800);
    position: relative;
    z-index: 10;
}

.text-indigo {
    color: var(--indigo-600);
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .analysis-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .analysis-grid { grid-template-columns: repeat(4, 1fr); }
}

.analysis-item {
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.analysis-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.analysis-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.analysis-bar {
    width: 6px;
    height: 16px;
    background: var(--indigo-500);
    border-radius: 9999px;
}

.analysis-item-header h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-800);
}

.analysis-value {
    font-size: 1.5rem;
    font-family: 'Songti SC', 'SimSun', serif;
    color: var(--indigo-700);
    margin-bottom: 0.5rem;
}

.analysis-desc {
    font-size: 0.75rem;
    color: var(--slate-500);
    line-height: 1.625;
}

.dayun-list {
    font-size: 0.75rem;
    color: var(--slate-500);
    list-style: none;
}

.dayun-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding-bottom: 0.375rem;
    margin-bottom: 0.375rem;
}

.dayun-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.dayun-list .highlight {
    font-weight: 500;
    color: var(--indigo-600);
}

.wuxing-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tag {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.25rem;
}

.tag-green {
    background: #dcfce7;
    color: #15803d;
}

.tag-red {
    background: #fee2e2;
    color: #b91c1c;
}

.tag-gray {
    background: var(--slate-200);
    color: var(--slate-600);
}

.analysis-quote {
    font-size: 1.125rem;
    font-family: 'Songti SC', 'SimSun', serif;
    color: var(--slate-700);
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* 流年提示 */
.liunian-tip {
    margin-top: 1.5rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .liunian-tip { padding: 1rem 1.25rem; }
}

.tip-icon {
    width: 40px;
    height: 40px;
    background: var(--indigo-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--indigo-600);
}

.liunian-tip h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.5rem;
}

.liunian-tip p {
    font-size: 0.75rem;
    color: var(--slate-600);
    line-height: 1.625;
}

@media (min-width: 768px) {
    .liunian-tip p { font-size: 0.875rem; }
}

/* 设置弹窗 */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@media (min-width: 640px) {
    .modal { padding: 1.5rem; }
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    transition: opacity 0.2s;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 48rem;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modal-in 0.2s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 250, 252, 0.5);
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-icon {
    width: 32px;
    height: 32px;
    background: var(--indigo-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo-600);
}

.modal-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-800);
}

.modal-header p {
    font-size: 11px;
    color: var(--slate-500);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--slate-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--slate-200);
    color: var(--slate-700);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.3);
}

.modal-body::-webkit-scrollbar {
    display: none;
}

.settings-group {
    margin-bottom: 2rem;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--slate-200);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.settings-group-title svg {
    color: var(--indigo-500);
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .settings-grid { grid-template-columns: repeat(2, 1fr); }
}

.settings-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-600);
    margin-bottom: 0.5rem;
}

.label-badge {
    font-size: 10px;
    color: var(--indigo-500);
    background: var(--indigo-50);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.toggle-group {
    display: flex;
    background: var(--slate-100);
    padding: 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.toggle-option {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.toggle-option.active {
    background: white;
    color: var(--indigo-600);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.toggle-option:hover:not(.active) {
    color: var(--slate-700);
}

.option-sub {
    font-size: 9px;
    font-weight: 400;
    color: var(--slate-400);
}

.settings-item select {
    width: 100%;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    appearance: none;
}

.settings-item select:focus {
    outline: none;
    border-color: var(--indigo-500);
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.reset-btn {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-500);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--slate-300);
    transition: color 0.2s;
}

.reset-btn:hover {
    color: var(--slate-800);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
}

.cancel-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-600);
    background: var(--slate-100);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.cancel-btn:hover {
    background: var(--slate-200);
}

.save-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    background: var(--indigo-600);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transition: all 0.2s;
}

.save-btn:hover {
    background: var(--indigo-700);
}

.save-btn:active {
    transform: scale(0.95);
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--slate-50);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--slate-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-300);
}

/* 选择文本颜色 */
::selection {
    background: rgba(99, 102, 241, 0.2);
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loading-hologram {
    width: 200px;
    height: 200px;
    position: relative;
}

.loading-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
}

.loading-ring-1 {
    animation: loadingSpin 3s linear infinite;
    transform-origin: center;
}

.loading-ring-2 {
    animation: loadingSpinReverse 4s linear infinite;
    transform-origin: center;
}

.loading-ring-3 {
    animation: loadingSpin 5s linear infinite;
    transform-origin: center;
}

.loading-star {
    animation: loadingPulse 2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes loadingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes loadingSpinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.loading-text {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

@keyframes loadingTextPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.loading-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.loading-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fcd34d;
    border-radius: 50%;
    animation: particleFloat 2s ease-in-out infinite;
}

@keyframes particleFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* 星曜入场动画 */
.palace-star {
    animation: starFadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes starFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 宫位选中发光效果 */
.palace-cell.selected {
    box-shadow: inset 0 0 0 2px var(--indigo-500), 0 0 15px rgba(99, 102, 241, 0.3);
}

/* 宫位悬停效果增强 */
.palace-cell:hover {
    background: linear-gradient(135deg, var(--indigo-50) 0%, white 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ==================== 移动端响应式优化 ==================== */

/* 小屏幕手机 (< 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .nav-title {
        font-size: 1rem;
    }
    
    .main-container {
        padding: 0.75rem;
    }
    
    .section-card {
        padding: 1rem;
        border-radius: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .form-row-bottom {
        grid-template-columns: 1fr;
    }
    
    .form-group label {
        font-size: 0.625rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .primary-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .dual-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-frame {
        max-width: 100%;
        border-width: 2px;
        padding: 2px;
    }
    
    .palace-cell {
        padding: 0.25rem;
    }
    
    .palace-name {
        font-size: 8px;
        padding: 0.0625rem 0.25rem;
    }
    
    .palace-ganzhi {
        display: none;
    }
    
    .palace-level {
        font-size: 8px;
    }
    
    .palace-stars {
        margin-top: 0.25rem;
    }
    
    .palace-star {
        font-size: 0.625rem;
    }
    
    .star-aux-god,
    .star-aux-evil {
        font-size: 0.5rem;
    }
    
    .palace-element {
        font-size: 8px;
        bottom: 0.125rem;
        right: 0.25rem;
    }
    
    .center-palace {
        grid-column: 2 / 4;
        grid-row: 2 / 4;
    }
    
    .hologram-svg {
        width: 160%;
        height: 160%;
    }
    
    .center-card {
        width: 80%;
    }
    
    .user-name {
        font-size: 1rem;
    }
    
    .user-badges {
        gap: 0.25rem;
    }
    
    .badge {
        font-size: 8px;
        padding: 0.0625rem 0.25rem;
    }
    
    .user-info {
        font-size: 8px;
    }
    
    .mingzhu {
        margin-top: 0.25rem;
    }
    
    .mingzhu-badge {
        font-size: 8px;
        padding: 0.125rem 0.375rem;
    }
    
    .chat-section {
        height: 400px;
    }
    
    .chat-header {
        padding: 0.75rem 1rem;
    }
    
    .chat-avatar {
        width: 28px;
        height: 28px;
    }
    
    .chat-title {
        font-size: 0.75rem;
    }
    
    .chat-subtitle {
        font-size: 8px;
    }
    
    .chat-messages {
        padding: 0.75rem;
    }
    
    .message-content {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .chat-suggestions {
        padding: 0.375rem 0.75rem;
    }
    
    .suggestion-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
    }
    
    .chat-input-container {
        padding: 0.75rem;
    }
    
    .chat-form input {
        padding: 0.5rem 0.75rem;
        padding-right: 2.5rem;
        font-size: 0.75rem;
    }
    
    .send-btn {
        width: 28px;
        height: 28px;
    }
    
    .analysis-card {
        padding: 1rem;
    }
    
    .analysis-title {
        font-size: 1rem;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-item {
        padding: 1rem;
    }
    
    .analysis-value {
        font-size: 1.25rem;
    }
    
    .star-tooltip {
        max-width: 220px;
        padding: 0.75rem;
    }
    
    .star-tooltip-title {
        font-size: 0.875rem;
    }
    
    .star-tooltip-desc {
        font-size: 0.625rem;
    }
}

/* 中等屏幕手机 (480px - 640px) */
@media (min-width: 480px) and (max-width: 640px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dual-panel {
        grid-template-columns: 1fr;
    }
    
    .chart-frame {
        max-width: 100%;
    }
    
    .chat-section {
        height: 450px;
    }
    
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 平板 (640px - 1024px) */
@media (min-width: 640px) and (max-width: 1024px) {
    .dual-panel {
        grid-template-columns: 1fr 1fr;
    }
    
    .chart-frame {
        max-width: 100%;
    }
    
    .chat-section {
        height: 550px;
    }
    
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .palace-cell:hover {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: none;
    }
    
    .palace-cell:active {
        background: var(--indigo-50);
        transform: scale(0.98);
    }
    
    .palace-star:hover {
        transform: none;
    }
    
    .suggestion-btn:hover {
        background: var(--slate-50);
        border-color: var(--slate-200);
        color: var(--slate-600);
    }
    
    .suggestion-btn:active {
        background: var(--indigo-50);
        border-color: var(--indigo-200);
        color: var(--indigo-600);
    }
    
    .nav-btn:hover {
        color: var(--indigo-600);
        background: var(--indigo-50);
    }
    
    .nav-btn:active {
        transform: scale(0.95);
    }
    
    .primary-btn:hover {
        background: var(--indigo-600);
    }
    
    .primary-btn:active {
        background: var(--indigo-700);
        transform: scale(0.98);
    }
    
    .toggle-btn:hover:not(.active) {
        color: var(--slate-500);
    }
    
    .toggle-btn:active {
        background: white;
        color: var(--indigo-600);
    }
}

/* 横屏手机 */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .main-container {
        padding: 0.5rem;
    }
    
    .dual-panel {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .chart-frame {
        max-height: 60vh;
        aspect-ratio: auto;
    }
    
    .chat-section {
        height: 60vh;
    }
    
    .section-header {
        margin-bottom: 0.75rem;
    }
    
    .form-row {
        gap: 0.5rem;
    }
}

/* ==================== 城市选择样式 ==================== */

.city-select-wrapper {
    position: relative;
}

.city-select-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.city-select-wrapper input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.city-select-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.city-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.city-option:hover {
    background: rgba(245, 158, 11, 0.1);
}

.city-name {
    color: white;
    font-weight: 500;
}

.city-province {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.optional-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: normal;
}

/* ==================== 用户认证相关样式 ==================== */

/* 导航栏用户按钮 */
.auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-btn-login {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.nav-btn-login:hover {
    background: rgba(245, 158, 11, 0.1);
}

.nav-btn-register {
    background: var(--gold);
    border: none;
    color: #1a1a2e;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.nav-btn-register:hover {
    background: #fcd34d;
}

/* 用户信息导航 */
.user-info-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
}

.user-name-nav {
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-btn-logout {
    background: transparent;
    border: none;
    color: #ef4444;
    padding: 0.25rem;
    opacity: 0.7;
}

.nav-btn-logout:hover {
    opacity: 1;
}

/* 登录/注册模态框 */
.auth-modal {
    max-width: 400px;
    width: 90%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form label {
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-form input {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-error {
    color: #ef4444;
    font-size: 0.875rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-submit-btn {
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--gold), #fcd34d);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-switch {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.auth-switch a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .auth-buttons {
        gap: 0.25rem;
    }
    
    .nav-btn-login,
    .nav-btn-register {
        padding: 0.3rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .user-name-nav {
        display: none;
    }
}

/* 深色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    /* 预留深色模式样式 */
}
