/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', serif;
  line-height: 1.8;
  color: #2c3e50;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 中国风背景装饰 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* 应用容器 */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航 - 中国风设计 */
.header {
  background: linear-gradient(135deg, #8B4513 0%, #D2691E 50%, #CD853F 100%);
  color: #FFF8DC;
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(139, 69, 19, 0.3);
  border-bottom: 3px solid #DAA520;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #DAA520, transparent);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.header-content .back-btn {
  position: absolute;
  left: 0.5rem;
  background: rgba(255, 248, 220, 0.2);
  border: 1px solid rgba(255, 248, 220, 0.3);
  color: #FFF8DC;
  padding: 0.3rem 0.6rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-content .back-btn:hover {
  background: rgba(255, 248, 220, 0.3);
  transform: translateX(-2px);
}

.header-content .logo {
  margin-left: 3rem; /* 减少为返回按钮留出的空间 */
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  background: linear-gradient(45deg, #FFF8DC, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.logo::after {
  content: '📜';
  position: absolute;
  right: -30px;
  top: -5px;
  font-size: 1.2rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: white;
  transition: 0.3s;
}

/* 侧边菜单 - 中国风设计 */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(180deg, #FFF8DC 0%, #F5DEB3 100%);
  box-shadow: 4px 0 20px rgba(139, 69, 19, 0.2);
  transition: left 0.3s ease;
  z-index: 1001;
  overflow-y: auto;
  border-right: 3px solid #DAA520;
  padding-top: 20px; /* 减少顶部空白 */
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(218, 165, 32, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.sidebar.open {
  left: 0;
}

.sidebar-content {
  padding: 2rem 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.user-name {
  font-weight: bold;
  color: #2c3e50;
}

.menu-list {
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  border-radius: 15px;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  position: relative;
  border: 2px solid transparent;
}

.menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #DAA520, #8B4513);
  border-radius: 0 2px 2px 0;
  transition: height 0.3s ease;
}

.menu-item:hover,
.menu-item.active {
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.1), rgba(139, 69, 19, 0.1));
  color: #8B4513;
  border-color: #DAA520;
  transform: translateX(5px);
}

.menu-item:hover::before,
.menu-item.active::before {
  height: 100%;
}

.menu-item .icon {
  font-size: 1.2rem;
}

/* 主内容区域 */
.main-content {
  flex: 1;
  margin-top: 80px;
  padding: 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  height: calc(100vh - 80px);
  overflow-y: auto;
  position: relative;
}

/* 页面样式 */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  margin-bottom: 0.5rem;
}

.page-header h2 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

/* 首页样式 - 中国风设计 */
.hero-section {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #8B4513 0%, #D2691E 50%, #CD853F 100%);
  color: #FFF8DC;
  border-radius: 25px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.3);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%),
    radial-gradient(circle at 80% 20%, rgba(218, 165, 32, 0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.hero-section p {
  font-size: 1.2rem;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  font-style: italic;
}

/* 统计容器 */
.stats-container {
  margin-bottom: 2rem;
}

/* 统计卡片 */
.stats-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 15px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.15);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #DAA520, #8B4513, #DAA520);
}

.stats-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: #DAA520;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.25);
}

.stats-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.stat-item {
  text-align: center;
  padding: 0.3rem;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  background: linear-gradient(45deg, #8B4513, #DAA520);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.2rem 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.stat-label {
  color: #8B4513;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
}

.featured-section h3,
.recent-section h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.recent-section {
  margin-top: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.clear-recent-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.clear-recent-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.recent-poem-card {
  position: relative;
  border-left: 4px solid #3498db;
}

.recent-poem-card::before {
  content: '📖';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2rem;
  opacity: 0.6;
}

.recent-time {
  color: #3498db;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* 统计页面样式 */
.stats-page-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.overview-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.overview-card:hover {
  transform: translateY(-5px);
  border-color: #DAA520;
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.25);
}

.overview-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.overview-info {
  flex: 1;
}

.overview-number {
  font-size: 2rem;
  font-weight: bold;
  background: linear-gradient(45deg, #8B4513, #DAA520);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.overview-label {
  color: #8B4513;
  font-size: 0.9rem;
  font-weight: 500;
}

.stats-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
  border: 2px solid #DAA520;
}

.chart-card h3 {
  color: #8B4513;
  margin-bottom: 1rem;
  text-align: center;
}

.chart-container {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chart-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  background: rgba(218, 165, 32, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.chart-bar:hover {
  background: rgba(218, 165, 32, 0.2);
  transform: translateX(5px);
}

.chart-label {
  min-width: 80px;
  font-weight: 500;
  color: #8B4513;
}

.chart-progress {
  flex: 1;
  height: 20px;
  background: rgba(218, 165, 32, 0.2);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.chart-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #DAA520, #8B4513);
  border-radius: 10px;
  transition: width 0.8s ease;
}

.chart-value {
  min-width: 30px;
  text-align: right;
  font-weight: bold;
  color: #8B4513;
}

.stats-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stats-actions .btn {
  min-width: 150px;
}

/* 安装卡片 */
.install-section {
  margin-top: 2rem;
}

.install-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 1.5rem;
  color: white;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transition: transform 0.3s;
  position: relative;
}

.install-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.install-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.install-card:hover {
  transform: translateY(-5px);
}

.install-card-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.install-card-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.install-card-text {
  flex: 1;
}

.install-card-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.install-card-text p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

.install-card .btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
}

.install-card .btn:hover {
  background: rgba(255,255,255,0.3);
}

.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* 诗词卡片 - 中国风设计 */
.poem-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.poem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #DAA520, #8B4513, #DAA520);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.poem-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.25);
  border-color: #DAA520;
}

.poem-card:hover::before {
  transform: scaleX(1);
}

.poem-card h4 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.poem-card .author {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.poem-card .content {
  color: #333;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.poem-card .dynasty {
  color: #999;
  font-size: 0.8rem;
}

/* 筛选控件 */
.filter-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-controls select {
  padding: 0.75rem 1.5rem;
  border: 2px solid #DAA520;
  border-radius: 25px;
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  font-size: 0.9rem;
  color: #8B4513;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-controls select:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

/* 朝代分类卡片 */
.dynasty-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.dynasty-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 20px;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.dynasty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #DAA520, #8B4513, #DAA520);
}

.dynasty-card:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: #DAA520;
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.25);
}

.dynasty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.dynasty-name {
  font-size: 1rem;
  font-weight: bold;
  color: #8B4513;
  margin-bottom: 0.5rem;
}

.dynasty-count {
  font-size: 0.9rem;
  color: #666;
  background: rgba(218, 165, 32, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  display: inline-block;
}

/* 诗词列表 */
.poem-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* 句子列表 */
.sentence-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* 收藏列表 */
.favorite-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

/* 句子筛选器 */
.sentence-filters {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 1rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border: 2px solid #e9ecef;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-tab:hover {
  border-color: #3498db;
  background: #f8f9fa;
}

.filter-tab.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.sentence-search {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.sentence-search input {
  flex: 1;
  padding: 0.8rem;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-size: 0.9rem;
}

.sentence-search input:focus {
  outline: none;
  border-color: #3498db;
}

.sentence-search button {
  padding: 0.8rem 1rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sentence-search button:hover {
  background: #2980b9;
  transform: scale(1.05);
}

/* 每日推荐句子 */
.daily-sentence {
  margin: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  color: white;
  text-align: center;
}

.daily-sentence h3 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
}

.daily-sentence-content {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.daily-sentence-text {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.daily-sentence-source {
  font-size: 1rem;
  opacity: 0.9;
  font-style: italic;
}

.daily-sentence-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.daily-sentence-actions .btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.daily-sentence-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 黑暗主题下的句子筛选器 */
body.dark-theme .sentence-filters {
  background: #34495e;
}

body.dark-theme .filter-tab {
  background: #2c3e50;
  border-color: #4a5568;
  color: #ecf0f1;
}

body.dark-theme .filter-tab:hover {
  border-color: #3498db;
  background: #34495e;
}

body.dark-theme .filter-tab.active {
  background: #3498db;
  color: white;
}

body.dark-theme .sentence-search input {
  background: #2c3e50;
  border-color: #4a5568;
  color: #ecf0f1;
}

body.dark-theme .sentence-search input::placeholder {
  color: #bdc3c7;
}

body.dark-theme .sentence-search input:focus {
  border-color: #3498db;
}

.sentence-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.sentence-card:hover {
  transform: translateY(-5px);
}

.sentence-card .sentence {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1rem;
  font-style: italic;
}

.sentence-card .source {
  color: #666;
  font-size: 0.9rem;
}

/* 增强句子卡片 */
.sentence-card.enhanced {
  position: relative;
  padding-top: 2.5rem;
}

.sentence-category {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #6c757d;
  background: #f8f9fa;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
}

.category-icon {
  font-size: 1rem;
}

.sentence-actions-mini {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sentence-card.enhanced:hover .sentence-actions-mini {
  opacity: 1;
}

.mini-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.mini-btn:hover {
  background: #3498db;
  color: white;
  border-color: #3498db;
  transform: scale(1.1);
}

/* 作者网格 */
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.author-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.author-card:hover {
  transform: translateY(-5px);
}

.author-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.author-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card .name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.author-card .intro {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 搜索样式 */
.search-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.2);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-box input {
  flex: 1;
  padding: 1.2rem 1.5rem;
  border: 3px solid #DAA520;
  border-radius: 30px;
  font-size: 1.1rem;
  background: white;
  box-shadow: inset 0 2px 10px rgba(139, 69, 19, 0.1);
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 20px rgba(139, 69, 19, 0.3);
  transform: translateY(-2px);
}

.search-box button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #8B4513 0%, #DAA520 100%);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

.search-box button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.search-filters {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}

.search-filters label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  color: #8B4513;
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
  transition: all 0.3s ease;
}

.search-filters label:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

.search-results {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-results .poem-card {
  margin-bottom: 0;
}

/* 返回按钮 */
.back-btn {
  background: linear-gradient(135deg, #8B4513, #D2691E);
  color: #FFF8DC;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 10px 0; /* 减少顶部空白 */
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

/* 详情页面特殊样式 - 完全重写布局 */
#poemDetailPage,
#authorDetailPage {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  z-index: 999;
}

/* 详情页面头部样式已移除，直接使用卡片标题 */

.poem-detail-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 25px;
  padding: 1.5rem;
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.2);
  border: 2px solid #DAA520;
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 100%;
}

.poem-detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #DAA520, #8B4513, #DAA520);
}

.poem-detail-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(218, 165, 32, 0.3);
}

.poem-detail-header h3 {
  font-size: 2rem;
  color: #8B4513;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.poem-detail-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: #666;
  font-size: 1.1rem;
}

.poem-detail-content-text {
  font-size: 1.3rem;
  line-height: 2.5;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.poem-detail-translation,
.poem-detail-remark {
  background: rgba(218, 165, 32, 0.1);
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #DAA520;
}

.poem-detail-translation h4,
.poem-detail-remark h4 {
  color: #8B4513;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.poem-detail-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 详情页面内容区域 */
.poem-detail-content,
.author-detail-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100%;
}

.author-detail-card {
  background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
  border-radius: 25px;
  padding: 1.5rem;
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.2);
  border: 2px solid #DAA520;
  margin: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.author-detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #DAA520, #8B4513, #DAA520);
}

.author-detail-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(218, 165, 32, 0.3);
}

.author-detail-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #DAA520;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.author-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-detail-info h3 {
  font-size: 1.8rem;
  color: #8B4513;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.author-detail-info p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.author-detail-bio {
  background: rgba(218, 165, 32, 0.1);
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  border-left: 4px solid #DAA520;
  line-height: 1.8;
  color: #2c3e50;
}

.author-detail-poems h4 {
  color: #8B4513;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.author-poems-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.author-poem-item {
  background: rgba(218, 165, 32, 0.1);
  padding: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.author-poem-item:hover {
  background: rgba(218, 165, 32, 0.2);
  border-color: #DAA520;
  transform: translateY(-2px);
}

.author-poem-item h5 {
  color: #8B4513;
  margin-bottom: 0.5rem;
}

.author-poem-item p {
  color: #666;
  font-size: 0.9rem;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 15px;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
}

/* 句子模态框样式 */
.sentence-modal .modal-content {
  max-width: 600px;
  width: 95%;
}

.sentence-detail {
  text-align: center;
}

.sentence-text {
  font-size: 1.4rem;
  font-weight: bold;
  color: #2c3e50;
  margin: 1.5rem 0;
  line-height: 1.6;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  border-left: 4px solid #3498db;
}

.sentence-source {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin-bottom: 2rem;
  font-style: italic;
}

.sentence-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.sentence-actions .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.sentence-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sentence-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: bold;
  color: #2c3e50;
}

.related-sentences {
  margin-top: 2rem;
  text-align: left;
}

.related-sentences h4 {
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
}

.related-sentence-item {
  padding: 1rem;
  margin: 0.5rem 0;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.related-sentence-item:hover {
  background: #f8f9fa;
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.related-sentence-text {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.related-sentence-source {
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
}

.related-poems-modal .modal-content {
  max-width: 700px;
}

.related-hint {
  text-align: center;
  color: #6c757d;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.related-poems-list {
  display: grid;
  gap: 1rem;
}

.related-poem-item {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.related-poem-item:hover {
  background: #f8f9fa;
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  color: #2c3e50;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 1.5rem;
}

.poem-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #666;
}

.poem-content {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: 1rem;
  color: #333;
}

.poem-translation,
.poem-remark {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.poem-actions {
  display: flex;
  gap: 1rem;
}

.btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-primary {
  background: #e74c3c;
  color: white;
}

.btn-primary:hover {
  background: #c0392b;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination button {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination button:hover,
.pagination button.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 底部导航 */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #eee;
  padding: 0.5rem 0;
  z-index: 1000;
  justify-content: space-around;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  color: #666;
  min-width: 60px;
  position: relative;
}

.bottom-nav .nav-item.active {
  background: linear-gradient(135deg, #8B4513 0%, #DAA520 50%, #CD853F 100%);
  color: #fff;
  transform: translateY(-8px) scale(1.2);
  box-shadow: 
    0 8px 25px rgba(139, 69, 19, 0.6),
    0 4px 15px rgba(218, 165, 32, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
  border: 4px solid #DAA520;
  font-weight: bold;
  border-radius: 16px;
  position: relative;
  animation: activeGlow 2s ease-in-out infinite alternate;
}

.bottom-nav .nav-item.active::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 6px;
  background: linear-gradient(90deg, #DAA520, #FFD700, #DAA520);
  border-radius: 3px;
  box-shadow: 
    0 3px 12px rgba(218, 165, 32, 0.8),
    0 0 20px rgba(255, 215, 0, 0.6);
  animation: topIndicator 2s ease-in-out infinite alternate;
}

.bottom-nav .nav-item.active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #DAA520, #FFD700, #DAA520, #CD853F);
  border-radius: 18px;
  z-index: -1;
  opacity: 0.3;
  animation: borderGlow 3s ease-in-out infinite;
}

.bottom-nav .nav-item.active i {
  color: #fff;
  font-size: 24px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bottom-nav .nav-item.active span {
  color: #fff;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  font-size: 13px;
}

.bottom-nav .nav-item {
  transition: all 0.3s ease;
}

.bottom-nav .nav-item:hover {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(218, 165, 32, 0.1));
  transform: translateY(-2px) scale(1.05);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.bottom-nav .nav-item.active:hover {
  background: linear-gradient(135deg, #7A3D0F 0%, #C19A0B 100%);
  transform: translateY(-5px) scale(1.15);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.6);
}

.bottom-nav .nav-item i {
  font-size: 20px;
  margin-bottom: 2px;
}

.bottom-nav .nav-item span {
  font-size: 12px;
  font-weight: 500;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  transition: color 0.3s;
}

.nav-item.active,
.nav-item:hover {
  color: #3498db;
}

.nav-item .icon {
  font-size: 1.2rem;
}

.nav-item span {
  font-size: 0.8rem;
}


/* 安装说明步骤 */
.install-steps {
  margin-bottom: 2rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-number {
  width: 30px;
  height: 30px;
  background: #3498db;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.step-content p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.step-content .icon {
  font-size: 1.2rem;
  margin: 0 0.2rem;
}

.install-benefits {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
}

.install-benefits h4 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
}

.install-benefits ul {
  margin: 0;
  padding-left: 1.5rem;
}

.install-benefits li {
  margin-bottom: 0.5rem;
  color: #666;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 加载指示器 */
.loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3000;
}

.loading.active {
  display: block;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 中国风装饰元素 */
.chinese-decoration {
  position: relative;
}

.chinese-decoration::before {
  content: '❋';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  color: #DAA520;
  font-size: 1.5rem;
  opacity: 0.6;
}

.chinese-decoration::after {
  content: '❋';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  color: #DAA520;
  font-size: 1.5rem;
  opacity: 0.6;
}

/* 诗词内容特殊样式 */
.poem-content {
  font-family: 'Noto Serif SC', serif;
  line-height: 2.2;
  letter-spacing: 1px;
  text-align: center;
  position: relative;
}

.poem-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #DAA520, transparent);
}

.poem-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #DAA520, transparent);
}

/* 页面标题装饰 */
.page-header h2 {
  position: relative;
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h2::before,
.page-header h2::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #DAA520, transparent);
}

.page-header h2::before {
  left: 0;
}

.page-header h2::after {
  right: 0;
}

/* 卡片悬停效果增强 */
.poem-card:hover .poem-content {
  color: #8B4513;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.poem-card,
.author-card,
.sentence-card,
.dynasty-card {
  animation: fadeInUp 0.6s ease-out;
}

.poem-card:nth-child(odd) {
  animation: slideInLeft 0.6s ease-out;
}

.poem-card:nth-child(even) {
  animation: slideInRight 0.6s ease-out;
}

.stats-card:hover {
  animation: pulse 0.6s ease-in-out;
}

/* 页面切换动画 */
.page {
  transition: all 0.3s ease-in-out;
}

.page.active {
  animation: fadeInUp 0.4s ease-out;
}

/* 底部导航动画 */
@keyframes activeGlow {
  0% {
    box-shadow: 
      0 8px 25px rgba(139, 69, 19, 0.6),
      0 4px 15px rgba(218, 165, 32, 0.4),
      inset 0 2px 4px rgba(255, 255, 255, 0.2);
  }
  100% {
    box-shadow: 
      0 12px 35px rgba(139, 69, 19, 0.8),
      0 6px 20px rgba(218, 165, 32, 0.6),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
}

@keyframes topIndicator {
  0% {
    box-shadow: 
      0 3px 12px rgba(218, 165, 32, 0.8),
      0 0 20px rgba(255, 215, 0, 0.6);
  }
  100% {
    box-shadow: 
      0 4px 16px rgba(218, 165, 32, 1),
      0 0 25px rgba(255, 215, 0, 0.8);
  }
}

@keyframes borderGlow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

/* 卡片进入动画 */
@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.poem-card,
.author-card,
.sentence-card {
  animation: cardSlideIn 0.5s ease-out;
}

/* 交错动画 */
.poem-card:nth-child(1) { animation-delay: 0.1s; }
.poem-card:nth-child(2) { animation-delay: 0.2s; }
.poem-card:nth-child(3) { animation-delay: 0.3s; }
.poem-card:nth-child(4) { animation-delay: 0.4s; }
.poem-card:nth-child(5) { animation-delay: 0.5s; }
.poem-card:nth-child(6) { animation-delay: 0.6s; }

/* 黑暗主题动画 */
@keyframes activeGlowDark {
  0% {
    box-shadow: 
      0 8px 25px rgba(52, 152, 219, 0.7),
      0 4px 15px rgba(93, 173, 226, 0.5),
      inset 0 2px 4px rgba(255, 255, 255, 0.2);
  }
  100% {
    box-shadow: 
      0 12px 35px rgba(52, 152, 219, 0.9),
      0 6px 20px rgba(93, 173, 226, 0.7),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
}

@keyframes topIndicatorDark {
  0% {
    box-shadow: 
      0 3px 12px rgba(52, 152, 219, 0.8),
      0 0 20px rgba(93, 173, 226, 0.6);
  }
  100% {
    box-shadow: 
      0 4px 16px rgba(52, 152, 219, 1),
      0 0 25px rgba(93, 173, 226, 0.8);
  }
}

@keyframes borderGlowDark {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

/* 懒加载图片样式 */
.lazy-img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-img.loaded {
  opacity: 1;
}

.lazy-img[data-src] {
  background: #f4f4f4;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgZmlsbD0iI2Y0ZjRmNCIvPjx0ZXh0IHg9IjUwIiB5PSI1MCIgZm9udC1mYW1pbHk9IkFyaWFsIiBmb250LXNpemU9IjE0IiBmaWxsPSIjOTk5IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBkeT0iLjNlbSI+5Yqg6L295LitLi4uPC90ZXh0Pjwvc3ZnPg==');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-content {
    padding: 0.5rem;
    margin-bottom: 80px;
  }
  
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .hero-section h2 {
    font-size: 1.8rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .stats-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  
  .stats-card {
    padding: 0.8rem;
  }
  
  .stat-number {
    font-size: 1.6rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .poem-grid,
  .poem-list,
  .sentence-list {
    grid-template-columns: 1fr;
  }
  
  .author-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dynasty-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  
  .dynasty-card {
    padding: 1rem 0.5rem;
  }
  
  .dynasty-icon {
    font-size: 1.5rem;
  }
  
  .dynasty-name {
    font-size: 0.9rem;
  }
  
  .filter-controls {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .filter-controls select {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  .search-container {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .search-box {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .search-box input {
    padding: 1rem 1.2rem;
    font-size: 1rem;
  }
  
  .search-box button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
  
  .search-filters {
    gap: 1rem;
    justify-content: flex-start;
  }
  
  .search-filters label {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .modal-content {
    max-width: 95%;
    margin: 1rem;
    max-height: 85vh;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .poem-detail-card,
  .author-detail-card {
    padding: 1rem;
    margin: 0;
    border-radius: 15px;
  }
  
  .poem-detail-header h3 {
    font-size: 1.5rem;
  }
  
  .poem-detail-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .poem-detail-content-text {
    font-size: 1.1rem;
    line-height: 2.2;
  }
  
  .poem-detail-actions {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .poem-detail-content,
  .author-detail-content {
    padding: 0.5rem;
  }
  
  .author-detail-info h3 {
    font-size: 1.5rem;
  }
  
  .author-poems-list {
    grid-template-columns: 1fr;
  }
  
  .bottom-nav {
    display: flex;
    padding: 0.4rem 0;
  }
  
  .bottom-nav .nav-item {
    padding: 0.4rem 0.6rem;
    min-width: 50px;
  }
  
  .bottom-nav .nav-item.active {
    transform: translateY(-3px) scale(1.08);
  }
  
  .bottom-nav .nav-item.active::before {
    width: 25px;
    height: 3px;
    top: -6px;
  }
  
  .bottom-nav .nav-item i {
    font-size: 18px;
  }
  
  .bottom-nav .nav-item.active i {
    font-size: 20px;
  }
  
  .bottom-nav .nav-item span {
    font-size: 11px;
  }
  
  .bottom-nav .nav-item.active span {
    font-size: 12px;
  }
  
  .install-card-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .install-card-icon {
    font-size: 2rem;
  }
  
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  
  .overview-card {
    padding: 1rem;
  }
  
  .overview-icon {
    font-size: 2rem;
  }
  
  .overview-number {
    font-size: 1.5rem;
  }
  
  .stats-charts {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .chart-card {
    padding: 1rem;
  }
  
  .stats-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .stats-actions .btn {
    width: 100%;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.8rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .hero-section {
    padding: 1.5rem 0.8rem;
  }
  
  .hero-section h2 {
    font-size: 1.5rem;
  }
  
  .hero-section p {
    font-size: 0.9rem;
  }
  
  .stats-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
  
  .stats-card {
    padding: 0.6rem;
  }
  
  .stat-item {
    padding: 0.2rem;
  }
  
  .stat-number {
    font-size: 1.4rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .author-grid {
    grid-template-columns: 1fr;
  }
  
  .dynasty-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  
  .dynasty-card {
    padding: 0.8rem 0.4rem;
  }
  
  .dynasty-icon {
    font-size: 1.2rem;
  }
  
  .dynasty-name {
    font-size: 0.8rem;
  }
  
  .dynasty-count {
    font-size: 0.75rem;
  }
  
  .poem-card,
  .sentence-card,
  .author-card {
    padding: 1rem;
  }
  
  .poem-card h4 {
    font-size: 1rem;
  }
  
  .poem-card .content {
    font-size: 0.9rem;
  }
  
  .poem-actions,
  .poem-detail-actions {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .search-container {
    padding: 1rem;
  }
  
  .search-box input {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
  
  .search-box button {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .search-filters {
    gap: 0.8rem;
  }
  
  .search-filters label {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .modal-content {
    margin: 0.5rem;
    max-height: 90vh;
  }
  
  .poem-detail-content-text {
    font-size: 1rem;
    line-height: 2;
  }
  
  .poem-detail-content,
  .author-detail-content {
    padding: 0.5rem;
  }
  
  .install-card {
    padding: 1rem;
  }
  
  .install-card-text h3 {
    font-size: 1rem;
  }
  
  .install-card-text p {
    font-size: 0.85rem;
  }
  
  .bottom-nav .nav-item {
    padding: 0.3rem 0.4rem;
    min-width: 45px;
  }
  
  .bottom-nav .nav-item.active {
    transform: translateY(-2px) scale(1.05);
  }
  
  .bottom-nav .nav-item.active::before {
    width: 20px;
    height: 2px;
    top: -5px;
  }
  
  .bottom-nav .nav-item i {
    font-size: 16px;
  }
  
  .bottom-nav .nav-item.active i {
    font-size: 18px;
  }
  
  .bottom-nav .nav-item span {
    font-size: 10px;
  }
  
  .bottom-nav .nav-item.active span {
    font-size: 11px;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
  }
}

body.dark-theme {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
  .header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3c5a78 100%);
  }
  
  .sidebar {
    background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
    border-right-color: #444;
  }
  
  .stats-card,
  .poem-card,
  .sentence-card,
  .author-card,
  .dynasty-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    color: #e0e0e0;
    border-color: #444;
  }
  
  .poem-detail-card,
  .author-detail-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    border-color: #555;
  }
  
  .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  
  .search-container {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
  }
  
  .search-box input {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #555;
  }
  
  .search-box button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  }
  
  .filter-controls select {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #555;
  }
  
  .hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3c5a78 100%);
  }
  
  .bottom-nav {
    background: #2d2d2d;
    border-top-color: #444;
  }
  
  .poem-detail-translation,
  .poem-detail-remark,
  .author-detail-bio {
    background: rgba(52, 73, 94, 0.3);
    border-left-color: #3498db;
  }
  
  /* 媒体查询中的文字颜色修复 */
  .page-header h2 {
    color: #e0e0e0;
  }

  .poem-detail-header h3 {
    color: #64b5f6;
  }

  .poem-detail-meta {
    color: #b0b0b0;
  }

  .poem-detail-content-text {
    color: #e0e0e0;
  }

  .poem-detail-translation h4,
  .poem-detail-remark h4 {
    color: #64b5f6;
  }

  .author-detail-info h3 {
    color: #64b5f6;
  }

  .author-detail-info p {
    color: #b0b0b0;
  }

  .author-detail-bio {
    color: #e0e0e0;
  }

  .poem-card h4 {
    color: #e0e0e0;
  }

  .poem-card .author {
    color: #b0b0b0;
  }

  .poem-card .content {
    color: #d0d0d0;
  }

  .poem-card .dynasty {
    color: #888;
  }

  .dynasty-card .dynasty-name {
    color: #64b5f6;
  }

  .dynasty-card .dynasty-count {
    color: #b0b0b0;
    background: rgba(100, 181, 246, 0.2);
  }

  .menu-item {
    color: #e0e0e0;
  }

  .menu-item:hover,
  .menu-item.active {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2), rgba(66, 165, 245, 0.2));
    color: #64b5f6;
    border-color: #64b5f6;
  }

  .nav-item {
    color: #b0b0b0;
  }

  .nav-item.active,
  .nav-item:hover {
    color: #64b5f6;
  }
}

body.dark-theme .header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3c5a78 100%);
}

body.dark-theme .sidebar {
  background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
  border-right-color: #444;
}

body.dark-theme .stats-card,
body.dark-theme .poem-card,
body.dark-theme .sentence-card,
body.dark-theme .author-card,
body.dark-theme .dynasty-card {
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
  color: #e0e0e0;
  border-color: #444;
}

body.dark-theme .poem-detail-card,
body.dark-theme .author-detail-card {
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
  border-color: #555;
}

body.dark-theme .modal-content {
  background: #2d2d2d;
  color: #e0e0e0;
}

/* 黑暗主题下的句子模态框 */
body.dark-theme .sentence-text {
  color: #ecf0f1;
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  border-left-color: #3498db;
}

body.dark-theme .sentence-source {
  color: #bdc3c7;
}

body.dark-theme .sentence-stats {
  background: #34495e;
}

body.dark-theme .stat-label {
  color: #bdc3c7;
}

body.dark-theme .stat-value {
  color: #ecf0f1;
}

body.dark-theme .related-sentence-item,
body.dark-theme .related-poem-item {
  background: #34495e;
  border-color: #4a5568;
  color: #ecf0f1;
}

body.dark-theme .related-sentence-item:hover,
body.dark-theme .related-poem-item:hover {
  background: #2c3e50;
  border-color: #3498db;
}

body.dark-theme .related-sentence-text,
body.dark-theme .related-poem-item h5 {
  color: #ecf0f1;
}

body.dark-theme .related-sentence-source,
body.dark-theme .poem-author {
  color: #bdc3c7;
}

body.dark-theme .poem-preview {
  color: #d5dbdb;
}

body.dark-theme .search-container {
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
}

body.dark-theme .search-box input {
  background: #1a1a1a;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-theme .search-box button {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

body.dark-theme .filter-controls select {
  background: #1a1a1a;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-theme .hero-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3c5a78 100%);
}

body.dark-theme .bottom-nav {
  background: #2d2d2d;
  border-top-color: #444;
}

body.dark-theme .poem-detail-translation,
body.dark-theme .poem-detail-remark,
body.dark-theme .author-detail-bio {
  background: rgba(52, 73, 94, 0.3);
  border-left-color: #3498db;
}

/* 黑暗主题下的文字颜色修复 */
body.dark-theme {
  color: #e0e0e0;
}

body.dark-theme .page-header h2 {
  color: #e0e0e0;
}

body.dark-theme .poem-detail-header h3 {
  color: #64b5f6;
}

body.dark-theme .poem-detail-meta {
  color: #b0b0b0;
}

body.dark-theme .poem-detail-content-text {
  color: #e0e0e0;
}

body.dark-theme .poem-detail-translation h4,
body.dark-theme .poem-detail-remark h4 {
  color: #64b5f6;
}

body.dark-theme .author-detail-info h3 {
  color: #64b5f6;
}

body.dark-theme .author-detail-info p {
  color: #b0b0b0;
}

body.dark-theme .author-detail-bio {
  color: #e0e0e0;
}

body.dark-theme .author-detail-poems h4 {
  color: #64b5f6;
}

body.dark-theme .author-poem-item h5 {
  color: #64b5f6;
}

body.dark-theme .author-poem-item p {
  color: #b0b0b0;
}

body.dark-theme .poem-card h4 {
  color: #e0e0e0;
}

body.dark-theme .poem-card .author {
  color: #b0b0b0;
}

body.dark-theme .poem-card .content {
  color: #d0d0d0;
}

body.dark-theme .poem-card .dynasty {
  color: #888;
}

body.dark-theme .sentence-card .sentence {
  color: #e0e0e0;
}

body.dark-theme .sentence-card .source {
  color: #b0b0b0;
}

/* 黑暗主题下的增强句子卡片 */
body.dark-theme .sentence-category {
  background: #34495e;
  color: #bdc3c7;
}

body.dark-theme .mini-btn {
  background: #34495e;
  border-color: #4a5568;
  color: #ecf0f1;
}

body.dark-theme .mini-btn:hover {
  background: #3498db;
  color: white;
}

/* 更新可用提示横幅 */
.update-available-banner {
  position: fixed;
  top: -100px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
  transition: all 0.3s ease-out;
}

.update-available-banner.show {
  top: 0;
}

.update-available-content {
  display: flex;
  align-items: center;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.update-available-icon {
  font-size: 1.5rem;
  animation: updateSpin 2s linear infinite;
}

.update-available-text {
  flex: 1;
}

.update-available-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.update-available-desc {
  font-size: 0.9rem;
  opacity: 0.9;
}

.update-available-actions {
  display: flex;
  gap: 0.5rem;
}

.update-available-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.update-now {
  background: rgba(255, 255, 255, 0.9);
  color: #28a745;
}

.update-now:hover {
  background: white;
  transform: scale(1.05);
}

.update-later {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.update-later:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.update-force {
  background: rgba(255, 193, 7, 0.9);
  color: #212529;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.update-force:hover {
  background: #ffc107;
  transform: scale(1.05);
}

/* 版本徽章 */
.version-badge {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: versionFadeIn 0.5s ease-out;
}

.version-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.version-badge.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease-out;
}

.version-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.version-icon {
  font-size: 1rem;
}

.version-text {
  font-weight: bold;
  font-size: 0.9rem;
}

@keyframes versionFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 版本信息模态框 */
.version-modal .modal-content {
  max-width: 500px;
}

.version-info {
  margin: 1.5rem 0;
}

.version-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.version-item:last-child {
  border-bottom: none;
}

.version-label {
  font-weight: bold;
  color: #495057;
}

.version-value {
  color: #6c757d;
  font-family: monospace;
  font-size: 0.9rem;
}

.version-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* 黑暗主题下的版本徽章 */
body.dark-theme .version-badge {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

body.dark-theme .version-item {
  border-bottom-color: #4a5568;
}

body.dark-theme .version-label {
  color: #ecf0f1;
}

body.dark-theme .version-value {
  color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .version-badge {
    top: 10px;
    right: 10px;
    padding: 0.4rem 0.8rem;
  }
  
  .version-text {
    font-size: 0.8rem;
  }
  
  .version-actions {
    flex-direction: column;
  }
}

@keyframes updateSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 黑暗主题下的更新提示 */
body.dark-theme .update-available-banner {
  background: linear-gradient(135deg, #1e7e34 0%, #17a2b8 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .update-available-content {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .update-available-actions {
    justify-content: center;
  }
  
  .update-available-btn {
    padding: 0.6rem 1.2rem;
  }
}

body.dark-theme .author-card .name {
  color: #e0e0e0;
}

body.dark-theme .author-card .intro {
  color: #b0b0b0;
}

body.dark-theme .dynasty-card .dynasty-name {
  color: #64b5f6;
}

body.dark-theme .dynasty-card .dynasty-count {
  color: #b0b0b0;
  background: rgba(100, 181, 246, 0.2);
}

body.dark-theme .stats-overview .overview-number {
  background: linear-gradient(45deg, #64b5f6, #42a5f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-theme .stats-overview .overview-label {
  color: #64b5f6;
}

body.dark-theme .chart-card h3 {
  color: #64b5f6;
}

body.dark-theme .chart-bar .chart-label {
  color: #64b5f6;
}

body.dark-theme .chart-bar .chart-value {
  color: #64b5f6;
}

body.dark-theme .chart-progress {
  background: rgba(100, 181, 246, 0.2);
}

body.dark-theme .chart-progress-fill {
  background: linear-gradient(90deg, #64b5f6, #42a5f5);
}

body.dark-theme .menu-item {
  color: #e0e0e0;
}

body.dark-theme .menu-item:hover,
body.dark-theme .menu-item.active {
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.2), rgba(66, 165, 245, 0.2));
  color: #64b5f6;
  border-color: #64b5f6;
}

body.dark-theme .user-name {
  color: #e0e0e0;
}

body.dark-theme .user-info {
  background: #3a3a3a;
}

body.dark-theme .nav-item {
  color: #b0b0b0;
}

body.dark-theme .nav-item.active,
body.dark-theme .nav-item:hover {
  color: #64b5f6;
}

body.dark-theme .bottom-nav .nav-item.active {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
  color: #fff;
  border: 2px solid #3b82f6;
  transform: translateY(-8px) scale(1.2);
  box-shadow: 
    0 10px 30px rgba(59, 130, 246, 0.8),
    0 6px 20px rgba(96, 165, 250, 0.6),
    0 0 0 3px rgba(59, 130, 246, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: activeGlowDark 2s ease-in-out infinite alternate;
}

body.dark-theme .bottom-nav .nav-item.active::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  box-shadow: 
    0 4px 15px rgba(59, 130, 246, 0.9),
    0 0 25px rgba(96, 165, 250, 0.8);
  animation: topIndicatorDark 2s ease-in-out infinite alternate;
}

body.dark-theme .bottom-nav .nav-item.active::after {
  background: linear-gradient(45deg, #3b82f6, #60a5fa, #3b82f6, #1e3a8a);
  animation: borderGlowDark 3s ease-in-out infinite;
}

body.dark-theme .bottom-nav .nav-item:hover {
  background: linear-gradient(135deg, rgba(52, 62, 80, 0.2), rgba(52, 152, 219, 0.2));
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

body.dark-theme .bottom-nav .nav-item.active:hover {
  background: linear-gradient(135deg, #34495e 0%, #2980b9 100%);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

body.dark-theme .search-filters label {
  background: #3a3a3a;
  color: #64b5f6;
}

body.dark-theme .empty-state {
  color: #b0b0b0;
}

body.dark-theme .empty-state h3 {
  color: #888;
}

body.dark-theme .btn {
  border-color: #555;
}

body.dark-theme .btn-primary {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

body.dark-theme .btn-secondary {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

body.dark-theme .btn-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* 黑暗主题下的更多文字可见性修复 */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
  color: #e0e0e0;
}

body.dark-theme p {
  color: #d0d0d0;
}

body.dark-theme .logo {
  background: linear-gradient(45deg, #64b5f6, #42a5f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-theme .featured-section h3,
body.dark-theme .recent-section h3 {
  color: #64b5f6;
}

body.dark-theme .section-header h3 {
  color: #64b5f6;
}

body.dark-theme .install-card-text h3 {
  color: #e0e0e0;
}

body.dark-theme .install-card-text p {
  color: #d0d0d0;
}

body.dark-theme .recent-time {
  color: #64b5f6;
}

body.dark-theme .step-content h4 {
  color: #64b5f6;
}

body.dark-theme .step-content p {
  color: #d0d0d0;
}

body.dark-theme .install-benefits h4 {
  color: #64b5f6;
}

body.dark-theme .install-benefits li {
  color: #d0d0d0;
}

body.dark-theme .loading p {
  color: #e0e0e0;
}

body.dark-theme .filter-controls select option {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.dark-theme .pagination button {
  background: #3a3a3a;
  color: #e0e0e0;
  border-color: #555;
}

body.dark-theme .pagination button:hover,
body.dark-theme .pagination button.active {
  background: #64b5f6;
  color: #fff;
  border-color: #64b5f6;
}

body.dark-theme .modal-header h3 {
  color: #e0e0e0;
}

body.dark-theme .close-btn {
  color: #b0b0b0;
}

body.dark-theme .close-btn:hover {
  color: #e0e0e0;
}

/* 主题切换按钮 */
.theme-toggle {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.theme-toggle.dark {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B4513 0%, #DAA520 100%);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.back-to-top:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.back-to-top.show {
  display: flex;
}

/* 加载更多指示器 */
.load-more-indicator {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 0.9rem;
  display: none;
}

.load-more-indicator.show {
  display: block;
}

.load-more-indicator .spinner {
  width: 20px;
  height: 20px;
  margin: 0 auto 0.5rem;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #666;
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: #999;
}

.empty-state p {
  font-size: 0.9rem;
  line-height: 1.5;
}
