/* 基础变量 */
:root {
  --primary-blue: #8AC4FF;
  --primary-pink: #FF7AA2;
  --bg-color: #F5F9FF; /* 浅蓝背景 */
  --card-bg: rgba(255, 255, 255, 0.6);
  --text-color: #4A5568;
  --shadow: 6px 6px 12px rgba(174,190,205,0.2),
           -6px -6px 12px rgba(255,255,255,0.8);
  --progress-bg: rgba(138, 196, 255, 0.2); /* 新增进度条背景 */
}
[data-theme="dark"] {
  --card-bg: rgba(74, 85, 104, 0.85); /* 原为 #4A5568 */
}

/* 拟态设计核心 */
body {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  background: var(--bg-color);
  font-family: 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
}
[data-theme="dark"] body {
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* 主题切换按钮 */
.theme-switch {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 1000;
  cursor: pointer;
  transition: transform 0.3s;
}

.heart {
  width: 36px;
  height: 36px;
  position: relative;
  transform: rotate(45deg);
  background: var(--primary-pink);
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.heart::before,
.heart::after {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-pink);
}

.heart::before {
  left: -18px;
  top: 0;
}

.heart::after {
  top: -18px;
  left: 0;
}

/* 顶部信息栏 */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border-radius: 16px;
  margin: 20px;
  box-shadow: var(--shadow);
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

/* 导航栏优化 */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 15px;
  margin: 20px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.nav-item {
  padding: 12px 24px;
  border-radius: 8px;
  color: var(--text-color);
  transition: all 0.3s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item.active {
  background: linear-gradient(145deg, #FFFFFF, #F0F4F9);
  box-shadow: inset 3px 3px 6px rgba(174,190,205,0.2),
             inset -3px -3px 6px rgba(255,255,255,0.8);
}

/* 内容区布局 */
.content-container {
  background: rgba(32, 100, 172, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 20px;
  margin: 20px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 25px;
  padding: 0 20px;
}

.left-panel, .right-panel {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.section-title {
  color: var(--primary-blue);
  margin-bottom: 15px;
  padding-left: 10px;
  border-left: 4px solid var(--primary-blue);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-container {
      grid-template-columns: 1fr;
  }

  .top-bar {
      flex-direction: column;
      gap: 15px;
  }

  .main-nav {
      flex-wrap: wrap;
      gap: 10px;
  }

  .nav-item {
      padding: 8px 16px;
  }
}

.layout-container {
  display: flex;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 卡片通用样式 */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
}

/* 头像卡片 */
.avatar-card {
  flex: 0 0 200px;
  text-align: center;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 10px auto;
}

/* 信息卡片 */
.info-card {
  flex: 1;
}

.time-module {
  margin-bottom: 20px;
}

.date-week {
  color: #666;
  margin-bottom: 8px;
}

.current-time {
  font-family: 'Courier New', monospace;
  font-size: 24px;
  color: var(--text-color);
}

/* 运势卡片 */
.luck-card {
  flex: 0 0 280px;
}

.progress-bar {
  height: 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  margin: 8px 0;
  overflow: hidden;
}

.progress-value {
  height: 100%;
  width: 75%;
  transition: width 0.5s ease;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .layout-container {
      flex-direction: column;
  }
}

/* ========== 进度条样式 ========== */
.luck-progress {
  margin: 20px 0;
}

.progress-container {
  height: 8px;
  background: rgba(138, 196, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-value {
  height: 100%;
  width: 75%;
  background: linear-gradient(90deg, 
    #269ee4 0%, 
    #ff9ebde2 50%, 
    #0431f5 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
  box-shadow: 2px 0 4px rgba(255,122,162,0.2);
}

/* 不同运势颜色 */
.career .progress-value { background: linear-gradient(90deg, #8AC4FF, #A3D1FF); }
.wealth .progress-value { background: linear-gradient(90deg, #FFD700, #FFE44D); }
.health .progress-value { background: linear-gradient(90deg, #77DD77, #95E695); }

/* ========== 背景图片设置 ========== */
.background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url(../image/首页背景图.jpg) center/cover;
  opacity: 0.95;
  z-index: -1;
  filter: blur(1px);
}

/* 深色模式适配 */
[data-theme="dark"] .background-layer {
  filter: blur(2px) brightness(0.1);
}

/* 移动端导航 */
@media (max-width: 768px) {
  /* 隐藏桌面导航 */
  .main-nav:not(.mobile-nav) {
    display: none;
  }

  /* 汉堡菜单 */
  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    padding: 12px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .hamburger {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    position: relative;
    transition: all 0.3s;
  }
  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    transition: inherit;
  }
  .hamburger::before { top: -6px; }
  .hamburger::after { top: 6px; }

  /* 侧边导航栏 */
  .mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    padding: 20px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .mobile-nav.active {
    transform: translateX(280px);
  }

  /* 内容缩放容器 */
  .scale-container {
    transform: scale(0.85);
    transform-origin: top center;
    margin-top: 60px;
    transition: transform 0.3s ease;
  }
}

/* 移动端导航容器 */
.mobile-nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

/* 导航栏主体 */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 300px;
  height: 100vh;
  background: rgba(255,255,255,0.98);
  box-shadow: 4px 0 15px rgba(0,0,0,0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* 导航头部 */
.nav-header {
  padding: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  text-align: center;
}

.nav-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

/* 导航项容器 */
.nav-items {
  flex: 1;
  overflow-y: auto;
  padding: 15px 0;
}

/* 单个导航项 */
.nav-item {
  display: block;
  padding: 14px 25px;
  margin: 6px 15px;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.nav-item.active {
  background: rgba(138, 196, 255, 0.15);
}

/* 关闭按钮 */
.nav-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 激活状态 */
.mobile-nav.active {
  transform: translateX(100%);
}

/* 深色模式 */
[data-theme="dark"] .mobile-nav {
  background: rgba(49,58,73,0.98);
  border-right: 1px solid rgba(255,255,255,0.1);
}

[data-theme="dark"] .nav-header {
  border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .nav-item.active {
  background: rgba(138, 196, 255, 0.2);
}

/* 桌面导航 - 默认显示 */
.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 15px;
  margin: 20px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* 移动导航容器 - 默认隐藏 */
.mobile-nav-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

/* 响应式设计 - 手机端 */
@media (max-width: 768px) {
  /* 隐藏桌面导航 */
  .desktop-nav {
    display: none !important;
  }

  /* 显示移动导航容器 */
  .mobile-nav-container {
    display: block;
  }
}

.desktop-nav {
  display: flex; /* 默认显示 */
}

.mobile-nav-container {
  display: none; /* 默认隐藏 */
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none !important; /* 手机隐藏桌面导航 */
  }
  .mobile-nav-container {
    display: block; /* 手机显示移动导航 */
  }
}
/* 首页动态优化样式 */
.dynamic-board {
  position: relative;
  min-height: 300px;
}

.dynamic-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.dynamic-item:hover {
  transform: translateY(-3px);
}

.dynamic-thumbnail {
  max-width: 120px;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  float: right;
  shape-outside: margin-box;
}

.dynamic-image-container {
  clear: both;
  text-align: right;
}

.dynamic-item h4 {
  color: var(--primary-blue);
  margin-bottom: 8px;
  font-size: 1.1em;
}

.dynamic-item p {
  color: var(--text-color);
  font-size: 0.9em;
  line-height: 1.4;
  clear: both;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .dynamic-thumbnail {
      max-width: 80px;
  }

  .dynamic-item {
      margin-bottom: 10px;
      padding: 12px;
  }
}

@media (min-width: 1200px) {
  .dynamic-thumbnail {
      max-width: 150px;
  }
}
/* 首页动态优化样式 */
.dynamic-thumbnail {
  max-width: 100px; /* 限制图片的最大宽度 */
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  float: right; /* 使图片浮动到右边 */
}

.dynamic-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.dynamic-item:hover {
  transform: translateY(-3px);
}

.dynamic-item h4 {
  color: var(--primary-blue);
  margin-bottom: 8px;
  font-size: 1.1em;
}

.dynamic-item p {
  color: var(--text-color);
  font-size: 0.9em;
  line-height: 1.4;
  clear: both; /* 清除浮动，使文字环绕图片 */
}

/* 响应式布局 */
@media (max-width: 768px) {
  .dynamic-thumbnail {
      max-width: 80px;
  }

  .dynamic-item {
      margin-bottom: 10px;
      padding: 12px;
  }
}

@media (min-width: 1200px) {
  .dynamic-thumbnail {
      max-width: 120px;
  }
}