/* 首页专用样式 - 子淳世界 */

/* 导入公共基础样式 */
@import url('./base.css');

/* 页面头部 */
.header {
    background-color: var(--bg-secondary);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.user-settings {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
}

.user-settings .profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* 确保触摸目标大小符合最佳实践 */
    min-width: 48px;
    min-height: 48px;
}

/* 响应式调整用户设置入口 */
@media (max-width: 768px) {
    .user-settings {
        top: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .user-settings {
        top: 1rem;
        right: 1rem;
    }
    
    .user-settings .profile-link {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .user-settings .profile-link svg {
        width: 20px;
        height: 20px;
    }
}

.user-settings .profile-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.user-settings .profile-link svg {
    width: 24px;
    height: 24px;
}

/* 九宫格布局 - 子淳世界风格 */
.main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
    max-width: 500px;
    margin: auto;
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
}

/* 针对移动设备的九宫格布局优化 - 紧凑设计 */
@media (max-width: 768px) {
    .main-grid {
        padding: 1.2rem 0;
        gap: 0.75rem;
        margin: auto;
        align-self: center;
        max-width: 90%;
    }
    
    .container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        height: 100%;
        min-height: -webkit-fill-available;
        padding-top: 1rem;
    }
    
    .container > * {
        flex-shrink: 0;
    }
}

/* 九宫格项目 - 正方形设计 */
.grid-item {
    aspect-ratio: 1;
    background-color: var(--card-bg);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    /* 移除默认阴影，只有中间宫格有阴影 */
    box-shadow: none;
    padding: 8px;
}

/* 悬停效果 - 微妙的光影变化 */
.grid-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* 标题样式 - 简洁优雅 */
.grid-item h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    word-break: break-word;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    max-width: 4.5em;
    text-align: center;
    overflow-wrap: break-word;
}

/* 描述文字 - 淡化处理 */
.grid-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin: 0;
}

/* 核心模块 - 天时枢（中间宫格） */
.core-module {
    position: relative;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 2px solid rgba(76, 175, 80, 0.3);
    /* 中间宫格保留阴影效果 */
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* 天时枢动态背景效果 */
.core-module::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(76, 175, 80, 0.1) 60deg,
        transparent 120deg,
        transparent 180deg,
        rgba(76, 175, 80, 0.1) 240deg,
        transparent 300deg,
        transparent 360deg
    );
    animation: rotate 20s linear infinite;
    z-index: 0;
}

/* 天时枢内部光晕效果 */
.core-module::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: radial-gradient(
        circle,
        rgba(76, 175, 80, 0.15) 0%,
        rgba(76, 175, 80, 0.05) 40%,
        transparent 70%
    );
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    animation: pulse 4s ease-in-out infinite;
}

/* 天时枢内容层 - 确保在动画之上 */
.core-module .content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 1rem;
}

/* 确保核心模块内容居中显示 */
[data-module="time-center"] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.core-module:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

/* 核心模块特殊标识 */
.core-module h3 {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

/* 动画定义 */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* 优先级高亮 - 两个层级 */
/* 第一优先级 - 主题色背景 + 白色文字 */
.priority-1 {
    background: var(--priority-color, var(--primary-color));
    border: 2px solid var(--priority-color, var(--primary-color));
    box-shadow: 0 0 15px rgba(var(--priority-color-rgb, 76, 175, 80), 0.2);
    transform: scale(1.02);
}

.priority-1 h3,
.priority-1 p {
    color: #ffffff;
}

.priority-1:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 0 25px rgba(var(--priority-color-rgb, 76, 175, 80), 0.3);
}

/* 第二优先级 - 主题色边框 + 主题色文字 */
.priority-2 {
    background: var(--card-bg);
    border: 2px solid var(--priority-color, var(--primary-color));
    box-shadow: 0 0 8px rgba(var(--priority-color-rgb, 76, 175, 80), 0.15);
}

.priority-2 h3 {
    color: var(--priority-color, var(--primary-color));
}

.priority-2:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(var(--priority-color-rgb, 76, 175, 80), 0.2);
}

/* 第三优先级 - 灰色文字 + 浅灰背景 */
.priority-3 {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    opacity: 0.8;
}

.priority-3 h3 {
    color: var(--text-muted);
}

.priority-3 p {
    color: var(--text-muted);
}

/* 能量状态样式 - 微妙的边框色彩 */
.energy-high {
    border-left: 3px solid var(--energy-su-xi);
}

.energy-medium {
    border-left: 3px solid var(--energy-xiao-ji);
}

.energy-low {
    border-left: 3px solid var(--energy-kong-wang);
}

/* 时空信息显示 - 简洁风格 */
.lunar-time {
    text-align: center;
    margin: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
    letter-spacing: 1px;
    padding: 0 1rem;
    line-height: 1.4;
    flex-shrink: 0;
}

/* 响应式调整时空信息 */
@media (max-width: 480px) {
    .lunar-time {
        margin: 1.5rem 0;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
}

/* 留白区域 */
.spacer {
    height: 1rem;
    flex-shrink: 0;
}

/* 响应式设计 - 保持正方形比例 */
@media (max-width: 768px) {
    .main-grid {
        max-width: 90%;
        gap: 0.75rem;
        padding: 1.2rem 0;
    }
    
    .grid-item h3 {
        font-size: 0.95rem;
        word-break: break-word;
        word-wrap: break-word;
        white-space: normal;
        line-height: 1.3;
        max-width: 4em;
        text-align: center;
        overflow-wrap: break-word;
    }
    
    .grid-item p {
        font-size: 0.7rem;
        display: none;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .grid-item {
        padding: 0.5rem;
        border-radius: 12px;
    }
    
    .grid-item .icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 600px) {
    .main-grid {
        max-width: 92%;
        gap: 0.6rem;
        padding: 1rem 0;
    }
    
    .grid-item h3 {
        font-size: 0.85rem;
    }
    
    .core-module {
        border-width: 1.5px;
    }
}

/* ========================================
   个人仪表盘布局样式 - 移动端紧凑设计
   ======================================== */

/* 主容器 - 移动端紧凑 */
.personal-dashboard {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .personal-dashboard {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .dashboard-header {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .user-identity {
        gap: 0.75rem;
    }
    
    .avatar {
        width: 48px;
        height: 48px;
    }
    
    .user-name {
        font-size: 1.25rem;
    }
    
    .user-tags {
        gap: 0.5rem;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .time-context {
        gap: 0.5rem;
    }
    
    .current-time {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .time-theme {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }
    
    .dashboard-main {
        gap: 0.75rem;
    }
    
    .instrument-panel {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .panel-header {
        gap: 0.5rem;
    }
    
    .instrument-grid {
        gap: 0.75rem;
    }
    
    .instrument {
        padding: 0.75rem;
    }
    
    .instrument-label {
        font-size: 0.75rem;
    }
    
    .instrument-value {
        font-size: 1rem;
    }
    
    .liuren-insight,
    .personal-suggestions,
    .comprehensive-suggestions {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .liuren-insight h3,
    .personal-suggestions h3,
    .comprehensive-suggestions h3 {
        font-size: 0.95rem;
    }
    
    .ai-wisdom-insight {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .insight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .insight-content {
        gap: 0.75rem;
    }
    
    .insight-summary h3,
    .strategy h4 {
        font-size: 0.9rem;
    }
    
    .strategy {
        padding: 0.75rem;
    }
    
    .ai-insight-content {
        font-size: 0.9rem;
    }
    
    .insight-feedback {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .feedback-btn {
        flex: 1;
        min-width: 120px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .personal-dashboard {
        padding: 0.25rem;
        gap: 0.2rem;
        max-width: 100%;
    }
    
    /* 头部：极简 */
    .dashboard-header {
        padding: 0.25rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.25rem;
        margin-bottom: 0.2rem;
    }
    
    .user-identity {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .avatar {
        width: 22px;
        height: 22px;
        border: 1px solid var(--border-color);
    }
    
    .avatar-icon {
        font-size: 0.85rem;
    }
    
    .user-name {
        font-size: 0.8rem;
        font-weight: 600;
    }
    
    .user-tags {
        display: none;
    }
    
    .time-context {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.55rem;
    }
    
    .current-time {
        display: flex;
        gap: 0.25rem;
        color: var(--text-secondary);
    }
    
    .chinese-date {
        display: none;
    }
    
    .solar-term {
        color: var(--accent-gold, #f6ad55);
        font-weight: 500;
    }
    
    .chinese-hour {
        display: none;
    }
    
    .time-theme {
        font-size: 0.5rem;
        color: var(--text-muted);
        padding: 0.03rem 0.2rem;
        background: var(--glass-bg);
        border-radius: 8px;
    }
    
    /* 主内容：单列紧凑 */
    .dashboard-main {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }
    
    /* 面板统一样式 */
    .instrument-panel {
        padding: 0.25rem;
        background: var(--glass-bg, rgba(255,255,255,0.03));
        border-radius: 4px;
        border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    }
    
    .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.15rem;
        padding-bottom: 0.1rem;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .panel-header h2 {
        font-size: 0.6rem;
        font-weight: 600;
        margin: 0;
    }
    
    .liuren-indicator,
    .refresh-time,
    .location-badge {
        font-size: 0.45rem;
        padding: 0.03rem 0.2rem;
        background: var(--accent-bg, rgba(66,153,225,0.1));
        border-radius: 8px;
        color: var(--accent-blue, #4299e1);
    }
    
    /* 仪表网格 */
    .instrument-grid {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    
    /* 仪表卡片 */
    .instrument {
        padding: 0.15rem;
        background: var(--bg-secondary, rgba(0,0,0,0.2));
        border-radius: 3px;
    }
    
    .instrument-label {
        font-size: 0.4rem;
        color: var(--text-secondary);
        margin-bottom: 0.03rem;
    }
    
    .instrument-value {
        font-size: 0.7rem;
        font-weight: 600;
    }
    
    /* 天时整合行 - 更紧凑 */
    .tiancai-panel .instrument-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.15rem;
    }
    
    .tiancai-panel .jieqi-meter {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.1rem 0.2rem;
    }
    
    .tiancai-panel .jieqi-meter .instrument-label {
        margin-bottom: 0;
    }
    
    .tiancai-panel .wuxing-meter {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.1rem 0.2rem;
    }
    
    .tiancai-panel .wuxing-wheel {
        display: flex;
        gap: 0.03rem;
        margin-top: 0;
    }
    
    .wheel-element {
        flex: 1;
        text-align: center;
        padding: 0.02rem 0;
        font-size: 0.35rem;
        border-radius: 2px;
        background: var(--glass-bg);
    }
    
    .wheel-element.active {
        background: var(--accent-blue, rgba(66,153,225,0.3));
        font-weight: 600;
    }
    
    .tiancai-panel .hour-meter {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.1rem 0.2rem;
    }
    
    .hour-display {
        display: flex;
        align-items: baseline;
        gap: 0.1rem;
    }
    
    .hour-name {
        font-size: 0.75rem;
        font-weight: 700;
    }
    
    .hour-time {
        font-size: 0.4rem;
        color: var(--text-secondary);
    }
    
    .progress-circle {
        width: 22px;
        height: 22px;
        margin: 0;
    }
    
    .progress-text {
        font-size: 0.4rem;
        font-weight: 600;
    }
    
    /* 小六壬解读 - 极简 */
    .liuren-insight {
        padding: 0.15rem;
        margin-top: 0.1rem;
        background: var(--glass-bg);
        border-radius: 3px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .liuren-insight h3 {
        display: none;
    }
    
    .liuren-summary {
        font-size: 0.45rem;
        line-height: 1.1;
        color: var(--text-primary);
        flex: 1;
        margin-right: 0.25rem;
    }
    
    .view-details {
        display: none;
    }
    
    /* 个人状态面板 */
    .personal-panel .instrument-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.15rem;
    }
    
    /* 八字卡片 */
    .bazi-card {
        grid-column: 1 / -1;
    }
    
    .bazi-display {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.08rem;
        margin: 0.1rem 0;
    }
    
    .bazi-year,
    .bazi-month,
    .bazi-day,
    .bazi-hour {
        text-align: center;
        padding: 0.08rem 0.02rem;
        font-size: 0.45rem;
        font-weight: 600;
        background: var(--glass-bg);
        border-radius: 2px;
    }
    
    .bazi-day.active {
        background: var(--accent-gold, rgba(246,173,85,0.3));
        color: var(--accent-gold, #f6ad55);
    }
    
    .bazi-analysis {
        display: flex;
        gap: 0.1rem;
        margin-top: 0.1rem;
    }
    
    .analysis-item {
        flex: 1;
        text-align: center;
        padding: 0.08rem;
        background: var(--glass-bg);
        border-radius: 2px;
    }
    
    .analysis-item .label {
        display: none;
    }
    
    .analysis-item .value {
        font-size: 0.45rem;
        font-weight: 600;
    }
    
    /* 匹配度 */
    .energy-match {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.1rem 0.2rem;
        background: var(--bg-secondary);
        border-radius: 3px;
    }
    
    .energy-match .instrument-label {
        margin-bottom: 0;
    }
    
    .match-score {
        display: flex;
        align-items: center;
        gap: 0.15rem;
    }
    
    .score-circle {
        width: 26px;
        height: 26px;
        flex-shrink: 0;
    }
    
    .score {
        font-size: 0.55rem;
        font-weight: 700;
    }
    
    .score-label {
        display: none;
    }
    
    .match-details {
        display: none;
    }
    
    /* 宜忌 */
    .today-yiji {
        grid-column: 1 / -1;
    }
    
    .yiji-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.15rem;
    }
    
    .yiji-type {
        padding: 0.1rem;
        background: var(--glass-bg);
        border-radius: 3px;
    }
    
    .yiji-type h4 {
        font-size: 0.45rem;
        padding: 0.02rem 0.15rem;
        border-radius: 2px;
        margin-bottom: 0.08rem;
    }
    
    .yiji-type ul {
        padding-left: 0.4rem;
        margin: 0;
    }
    
    .yiji-type li {
        font-size: 0.4rem;
        color: var(--text-secondary);
        margin-bottom: 0.02rem;
    }
    
    /* 个人建议 */
    .personal-suggestions {
        display: none;
    }
    
    /* 环境面板 */
    .environment-panel .instrument-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.15rem;
    }
    
    /* 天气卡片 */
    .weather-card {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.1rem 0.2rem;
        background: var(--bg-secondary);
        border-radius: 3px;
    }
    
    .weather-card .instrument-label {
        margin-bottom: 0;
    }
    
    .weather-main {
        display: flex;
        align-items: center;
        gap: 0.15rem;
    }
    
    .weather-icon {
        font-size: 0.85rem;
    }
    
    .weather-temp {
        font-size: 0.7rem;
        font-weight: 700;
    }
    
    .weather-desc {
        font-size: 0.4rem;
        color: var(--text-secondary);
    }
    
    .weather-details {
        display: none;
    }
    
    /* 地方五行 */
    .location-wuxing {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.1rem 0.2rem;
        background: var(--bg-secondary);
        border-radius: 3px;
    }
    
    .location-wuxing .instrument-label {
        margin-bottom: 0;
    }
    
    .wuxing-element {
        font-size: 0.95rem;
        font-weight: 700;
    }
    
    .element-impact {
        display: none;
    }
    
    /* 能量分解 */
    .energy-index {
        grid-column: 1 / -1;
    }
    
    .energy-breakdown {
        display: flex;
        flex-direction: column;
        gap: 0.08rem;
    }
    
    .breakdown-item {
        display: flex;
        align-items: center;
        gap: 0.15rem;
        font-size: 0.4rem;
    }
    
    .breakdown-item .label {
        width: 22px;
        color: var(--text-secondary);
    }
    
    .energy-bar {
        flex: 1;
        height: 3px;
        background: var(--glass-bg);
        border-radius: 2px;
        overflow: hidden;
    }
    
    .energy-bar .fill {
        height: 100%;
        border-radius: 2px;
    }
    
    /* 综合建议 */
    .comprehensive-suggestions {
        display: none;
    }
    
    /* AI智慧洞察 - 极简 */
    .ai-wisdom-insight {
        padding: 0.25rem;
        background: linear-gradient(135deg, rgba(128, 90, 213, 0.1), rgba(66, 153, 225, 0.1));
        border-radius: 4px;
        border: 1px solid rgba(128, 90, 213, 0.2);
    }
    
    .insight-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.1rem;
    }
    
    .insight-header h2 {
        font-size: 0.6rem;
        font-weight: 600;
        color: var(--accent-purple, #805ad5);
    }
    
    .insight-time {
        display: none;
    }
    
    .insight-summary {
        display: none;
    }
    
    /* 策略网格 */
    .insight-strategies {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.1rem;
    }
    
    .strategy {
        padding: 0.1rem;
        background: var(--glass-bg);
        border-radius: 3px;
        text-align: center;
    }
    
    .strategy h4 {
        font-size: 0.4rem;
        margin-bottom: 0.03rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.02rem;
    }
    
    .strategy-icon {
        font-size: 0.65rem;
    }
    
    .strategy p {
        display: none;
    }
    
    /* 反馈按钮 */
    .insight-feedback {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-grid {
        max-width: 95%;
        gap: 0.8rem;
        padding: 1.5rem 0;
    }
    
    .grid-item h3 {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    .grid-item p {
        font-size: 0.7rem;
        line-height: 1.2;
    }
}

@media (max-width: 360px) {
    .main-grid {
        max-width: 98%;
        gap: 0.6rem;
        padding: 1.2rem 0;
    }

    .grid-item h3 {
        font-size: 0.85rem;
        margin-bottom: 0.15rem;
    }

    .grid-item p {
        font-size: 0.65rem;
    }
}

/* ========================
   个人仪表盘样式 - Personal Dashboard
   ======================== */

/* 仪表盘容器 */
.personal-dashboard {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 仪表盘头部 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: var(--card-bg);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--card-border);
}

/* 用户身份区域 */
.user-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 2px solid var(--border-color);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.user-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.tag.bazi-tag {
    background: rgba(76, 175, 80, 0.1);
    color: var(--energy-su-xi);
    border-color: var(--energy-su-xi);
}

.tag.astrology-tag {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
    border-color: #2196F3;
}

.tag.strength-tag {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
    border-color: #9C27B0;
}

/* 时间上下文 */
.time-context {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.current-time {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chinese-date {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.solar-term {
    font-size: 0.9rem;
    color: var(--energy-su-xi);
}

.chinese-hour {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.time-theme {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    display: inline-block;
    align-self: flex-end;
}

/* 仪表盘主内容区 */
.dashboard-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* 响应式仪表盘布局 */
@media (max-width: 1200px) {
    .dashboard-main {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
    }
    
    .personal-dashboard {
        padding: 16px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .time-context {
        text-align: left;
        align-self: flex-start;
    }
}

/* 仪表盘面板 */
.instrument-panel {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.refresh-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 仪表网格 */
.instrument-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 仪表卡片 */
.instrument {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instrument-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instrument-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.instrument-value.木 {
    color: #4CAF50;
}

.instrument-value.火 {
    color: #FF5722;
}

.instrument-value.土 {
    color: #795548;
}

.instrument-value.金 {
    color: #9E9E9E;
}

.instrument-value.水 {
    color: #2196F3;
}

/* 进度条 */
.instrument-progress,
.match-bar,
.energy-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar,
.match-bar .fill,
.energy-bar .fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.match-bar .fill.tiancai {
    background: var(--energy-su-xi);
}

.match-bar .fill.dicai {
    background: var(--energy-xiao-ji);
}

.match-bar .fill.rencai {
    background: var(--energy-kong-wang);
}

.progress-label {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 五行轮盘 */
.wuxing-wheel {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
}

.wheel-element {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.wheel-element.木.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
}

.wheel-element.火.active {
    background: rgba(255, 87, 34, 0.2);
    color: #FF5722;
    box-shadow: 0 0 12px rgba(255, 87, 34, 0.3);
}

.wheel-element.土.active {
    background: rgba(121, 85, 72, 0.2);
    color: #795548;
    box-shadow: 0 0 12px rgba(121, 85, 72, 0.3);
}

.wheel-element.金.active {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
    box-shadow: 0 0 12px rgba(158, 158, 158, 0.3);
}

.wheel-element.水.active {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.3);
}

/* 时辰显示 */
.hour-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hour-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hour-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 圆形进度 */
.hour-progress {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 8px auto 0;
}

.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary-color) 0%,
        var(--primary-color) var(--progress, 0%),
        var(--bg-primary) var(--progress, 0%),
        var(--bg-primary) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle::before {
    content: '';
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--card-bg);
    position: absolute;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 小六壬指示器 */
.liuren-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
}

.liuren-symbol {
    font-size: 1.2rem;
}

.liuren-name {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* 小六壬解读 */
.liuren-insight {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    margin-top: auto;
}

.liuren-insight h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.liuren-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.view-details {
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-details:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* 八字卡片 */
.bazi-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 8px 0;
}

.bazi-year,
.bazi-month,
.bazi-day,
.bazi-hour {
    padding: 8px;
    background: var(--bg-primary);
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.bazi-day.active {
    background: rgba(76, 175, 80, 0.15);
    color: var(--energy-su-xi);
    font-weight: 600;
}

.bazi-analysis {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.analysis-item:last-child {
    border-bottom: none;
}

.analysis-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.analysis-item .value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.analysis-item .value.强 {
    color: var(--energy-su-xi);
}

.analysis-item .value.弱 {
    color: var(--energy-kong-wang);
}

.analysis-item .value.中 {
    color: var(--energy-xiao-ji);
}

/* 匹配度 */
.match-score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(
        var(--energy-su-xi) 0%,
        var(--energy-su-xi) var(--score, 0%),
        var(--bg-primary) var(--score, 0%),
        var(--bg-primary) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.score-circle::before {
    content: '';
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--card-bg);
    position: absolute;
}

.score {
    position: relative;
    z-index: 1;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--energy-su-xi);
}

.score-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.match-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 今日宜忌 */
.yiji-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.yiji-type {
    padding: 12px;
    border-radius: 8px;
}

.yiji-type.yi {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.yiji-type.ji {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.yiji-type h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.yiji-type.yi h4 {
    color: var(--energy-su-xi);
}

.yiji-type.ji h4 {
    color: #F44336;
}

.yiji-type ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yiji-type li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

/* 个人建议 */
.personal-suggestions {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    margin-top: auto;
}

.personal-suggestions h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.personal-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.personal-suggestions li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.suggestion-icon {
    font-size: 1rem;
}

/* 位置标签 */
.location-badge {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 天气卡片 */
.weather-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.weather-icon {
    font-size: 2.5rem;
}

.weather-temp {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.weather-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.weather-details {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.detail-item .value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* 地方五行 */
.wuxing-element {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 8px auto;
}

.wuxing-element.木 {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.wuxing-element.火 {
    background: rgba(255, 87, 34, 0.2);
    color: #FF5722;
}

.wuxing-element.土 {
    background: rgba(121, 85, 72, 0.2);
    color: #795548;
}

.wuxing-element.金 {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

.wuxing-element.水 {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.element-impact {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
}

/* 能量指数 */
.energy-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--energy-su-xi);
    text-align: center;
    margin: 8px 0;
}

.energy-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-item .label {
    width: 36px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 综合建议 */
.comprehensive-suggestions {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    margin-top: auto;
}

.comprehensive-suggestions h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.suggestion-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid var(--primary-color);
}

.suggestion-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.suggestion-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

/* AI智慧洞察 */
.ai-wisdom-insight {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--card-border);
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.insight-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.insight-metadata {
    display: flex;
    align-items: center;
    gap: 12px;
}

.generated-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.refresh-insight {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.refresh-insight:hover {
    background: var(--primary-color);
    color: white;
}

.insight-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.insight-summary {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.insight-summary h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.insight-summary p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.insight-strategies {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.strategy {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.strategy h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strategy-icon {
    font-size: 1.2rem;
}

.strategy p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 洞察反馈 */
.insight-feedback {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.feedback-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feedback-btn.helpful {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: var(--energy-su-xi);
}

.feedback-btn.save {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.feedback-btn:hover {
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .dashboard-main {
        grid-template-columns: repeat(2, 1fr);
    }

    .instrument-panel:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
    }

    .time-context {
        text-align: left;
    }

    .time-theme {
        align-self: flex-start;
    }

    .dashboard-main {
        grid-template-columns: 1fr;
    }

    .instrument-panel:last-child {
        grid-column: span 1;
    }

    .insight-strategies {
        grid-template-columns: 1fr;
    }

    .yiji-list {
        grid-template-columns: 1fr;
    }
}