/* 启动动画样式 */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
html,
body {
  margin: 0;
  padding: 0;
  background-color: #fff;
}

/* 顶部/底部安全区适配 */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* 如果有顶部导航栏 */
.header {
  padding-top: env(safe-area-inset-top);
  height: calc(44px + env(safe-area-inset-top));
  background-color: #fff;
}

#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-logo {
  width: 80px;
  height: 80px;
  background: #ffffff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  color: #6c757d;
  margin-bottom: 20px;
  animation: logoBounce 1.5s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.splash-title {
  color: #495057;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 10px;
  animation: titleFadeIn 1s ease-in-out 0.5s both;
}

.splash-subtitle {
  color: #6c757d;
  font-size: 16px;
  animation: titleFadeIn 1s ease-in-out 0.8s both;
}

.splash-loading {
  margin-top: 30px;
  width: 40px;
  height: 40px;
  border: 3px solid #e9ecef;
  border-top-color: #6c757d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes logoBounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, Arial, sans-serif;
  background: #f8f8f8;
  color: #222;
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

/* 夜间模式 */
body.dark-mode {
  background: #121212;
  color: #eaeaea;
}

body.dark-mode .login-box,
body.dark-mode .header,
body.dark-mode .latest-price-card,
body.dark-mode .statistics-card {
  background: #1c1c1c;
  border-color: #2a2a2a;
}

body.dark-mode .title,
body.dark-mode .card-header h2,
body.dark-mode .price-value-h,
body.dark-mode .stat-value {
  color: #eaeaea;
}

body.dark-mode .input-field {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #eaeaea;
}

body.dark-mode .input-field:focus {
  background: #1c1c1c;
  border-color: #d4af37;
}

body.dark-mode .tab-btn {
  background: #2a2a2a;
  color: #eaeaea;
  border-color: #3a3a3a;
}

body.dark-mode .tab-btn:hover {
  background: #3a3a3a;
}

body.dark-mode .tab-btn.active {
  background: #ff6b6b;
  color: white;
}

body.dark-mode .stat-item,
body.dark-mode .price-item-h {
  background: #252525;
  border-color: #333;
  border-radius: 10px;
}

body.dark-mode .refresh-countdown {
  background: #2a2a2a;
  color: #999;
}

body.dark-mode .price-divider {
  background: #3a3a3a;
}

body.dark-mode .price-label-h,
body.dark-mode .stat-label {
  color: #999;
}

/* 容器 */
.container {
  width: 100%;
  min-height: 100vh;
  padding: 20px;
}

/* 登录界面 */
#loginContainer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  max-width: 400px;
  width: 100%;
  animation: fadeIn 0.5s ease-in;
  border: 1px solid #e8e8e8;
}

.title {
  text-align: center;
  color: #222;
  margin-bottom: 30px;
  font-size: 24px;
  font-weight: 500;
}

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #666;
  font-size: 14px;
  font-weight: 400;
}

.input-field {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  background: #f9f9f9;
}

.input-field:focus {
  outline: none;
  border-color: #999;
  background: white;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* 按钮 */
.btn {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}

.btn-primary {
  background: #e24a4a;
  color: white;
}

.btn-primary:hover {
  background: #d43d3d;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(226, 74, 74, 0.25);
}

body.dark-mode .btn-primary {
  background: #ff6b6b;
}

body.dark-mode .btn-primary:hover {
  background: #ff5252;
}

.btn-secondary {
  background: #888;
  color: white;
  width: auto;
  padding: 8px 20px;
  font-size: 14px;
}

.btn-secondary:hover {
  background: #666;
}

.error-message {
  color: #ff3b30;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

/* 主界面 */
#mainContainer {
  max-width: 1400px;
  margin: 0 auto;
}

/* 头部 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 20px 30px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid #e8e8e8;
}

.header .title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: #222;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.today-range {
  font-size: 14px;
  color: #666;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
}

body.dark-mode .today-range {
  color: #999;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-icon:hover {
  transform: translateY(-2px);
}

body.dark-mode .btn-icon {
  background: #3a3a3a;
}

body.dark-mode .btn-icon:hover {
  background: #4a4a4a;
}

.btn-icon .icon-light {
  display: none;
}

body.dark-mode .btn-icon .icon-dark {
  display: none;
}

body.dark-mode .btn-icon .icon-light {
  display: inline;
}

/* 最新价格卡片 - 横向布局 */
.latest-price-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 30px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid #e8e8e8;
}

.price-info-horizontal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.price-item-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 120px;
}

.price-label-h {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-value-h {
  font-size: 22px;
  font-weight: 500;
  color: #222;
  display: flex;
  align-items: center;
  gap: 5px;
}

.price-divider {
  width: 1px;
  height: 40px;
  background: #e0e0e0;
}

.trend-arrow {
  font-size: 18px;
  font-weight: bold;
  margin-left: 5px;
  animation: pulse 0.5s ease-in-out;
}

.trend-arrow.trend-up {
  color: #e24a4a;
}

.trend-arrow.trend-down {
  color: #20b26b;
}

body.dark-mode .trend-arrow.trend-up {
  color: #ff6b6b;
}

body.dark-mode .trend-arrow.trend-down {
  color: #4eca78;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.card-header h2 {
  font-size: 18px;
  color: #333;
  margin: 0;
  font-weight: 500;
}

.refresh-countdown {
  font-size: 13px;
  color: #999;
  background: #f5f5f5;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 400;
}

.time-text {
  font-size: 14px;
  color: #86868b;
}

.price-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.price-item {
  text-align: center;
  padding: 15px;
  background: #fbfbfd;
  border-radius: 12px;
  border: 1px solid #f5f5f7;
}

.price-label {
  font-size: 14px;
  color: #6e6e73;
  margin-bottom: 8px;
  font-weight: 500;
}

.price-value {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
}

/* 筛选器（现在在统计卡片内） */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

.tab-btn {
  padding: 10px 20px;
  background: #f5f5f5;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  color: #333;
  font-weight: 400;
}

.tab-btn:hover {
  background: #e8e8e8;
}

.tab-btn.active {
  background: #e24a4a;
  color: white;
  box-shadow: 0 1px 4px rgba(226, 74, 74, 0.2);
}

/* 手动刷新按钮 */
.btn-refresh {
  padding: 10px 20px;
  background: #888;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.3s;
  white-space: nowrap;
  min-width: 100px;
}

.btn-refresh:hover {
  background: #666;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-refresh:active {
  transform: translateY(0);
}

.btn-refresh.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* 内联自定义日期选择 */
.custom-date-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  position: relative;
}

/* 自定义日期切换按钮 */
.custom-date-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.3s;
  white-space: nowrap;
}

.custom-date-toggle:hover {
  background: #e9e9e9;
  border-color: #999;
}

body.dark-mode .custom-date-toggle {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #999;
}

body.dark-mode .custom-date-toggle:hover {
  background: #333;
  border-color: #555;
}

.toggle-icon {
  font-size: 14px;
}

.toggle-text {
  font-size: 12px;
}

/* 自定义日期面板 */
.custom-date-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  flex-direction: column;
  gap: 8px;
}

.custom-date-panel.show {
  display: flex;
}

body.dark-mode .custom-date-panel {
  background: #2a2a2a;
  border-color: #3a3a3a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.date-separator {
  color: #666;
  font-size: 14px;
  user-select: none;
}

body.dark-mode .date-separator {
  color: #999;
}

.date-input-inline {
  cursor: pointer;
  padding: 8px 10px;
  font-size: 13px;
  background: white;
  border: 2px solid #ddd;
  border-radius: 6px;
  color: #333;
  min-width: 140px;
  transition: all 0.3s;
}

.date-input-inline::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
}

.date-input-inline:hover {
  border-color: #999;
}

.date-input-inline:focus {
  border-color: #E24A4A;
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 74, 74, 0.1);
}

body.dark-mode .date-input-inline {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #eaeaea;
}

body.dark-mode .date-input-inline:hover {
  border-color: #555;
}

body.dark-mode .date-input-inline:focus {
  border-color: #D4AF37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.date-group {
  flex: 1;
  min-width: 150px;
}

.date-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

body.dark-mode .date-group label {
  color: #999;
}

/* 日期输入框样式 */
.date-input {
  cursor: pointer;
  position: relative;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  background: white;
  border: 2px solid #ddd;
  border-radius: 8px;
  color: #333;
}

.date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.date-input:focus {
  border-color: #E24A4A;
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 74, 74, 0.1);
}

body.dark-mode .date-input {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #eaeaea;
}

body.dark-mode .date-input:focus {
  border-color: #D4AF37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.custom-date-range .btn {
  width: auto;
  min-width: 100px;
}

/* 统计信息卡片（整合了筛选器、统计数据、图表） */
.statistics-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid #e8e8e8;
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.stat-label {
  font-size: 14px;
  color: #999;
  margin-bottom: 8px;
  font-weight: 400;
}

.stat-value {
  font-size: 18px;
  font-weight: 500;
  color: #222;
}

/* 图表区域（现在在统计卡片内） */
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  margin-bottom: 15px;
  padding-top: 20px;
  padding-bottom: 10px;
  border-top: 1px solid #e5e5e7;
}

.chart-header h2 {
  font-size: 18px;
  color: #1d1d1f;
  margin: 0;
  font-weight: 600;
}

.chart-container {
  width: 100%;
  height: 500px;
  margin-top: 10px;
  /* 防止图表更新时闪烁 */
  will-change: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 加载提示 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(29, 29, 31, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 18px;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e24a4a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

body.dark-mode .loading-spinner {
  border-top-color: #ff6b6b;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .container {
    padding: 8px;
  }

  .login-box {
    padding: 30px 20px;
    margin: 10px;
  }

  .title {
    font-size: 18px;
  }

  .header {
    padding: 12px 15px;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 10px;
  }

  .header .title {
    font-size: 16px;
    flex: 1;
  }

  .header-actions {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .today-range {
    font-size: 11px;
    padding: 5px 10px;
    white-space: nowrap;
  }

  .btn-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .latest-price-card,
  .statistics-card {
    padding: 12px 10px;
    margin-bottom: 10px;
  }

  /* 最新价格卡片 - 移动端网格布局 */
  .latest-price-card {
    padding: 8px 6px;
  }

  .price-info-horizontal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .price-item-h {
    background: #f5f5f5;
    border-radius: 6px;
    padding: 5px 3px;
    min-width: 0;
    gap: 2px;
  }

  /* 隐藏所有分隔线 */
  .price-divider {
    display: none;
  }

  .price-label-h {
    font-size: 8.5px;
    letter-spacing: 0.2px;
  }

  .price-value-h {
    font-size: 10px;
    font-weight: 600;
  }

  .trend-arrow {
    font-size: 10px;
    margin-left: 1px;
  }

  .refresh-countdown {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* 筛选区域 - 紧凑布局 */
  .filter-header {
    flex-direction: row;
    gap: 5px;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .filter-header::-webkit-scrollbar {
    display: none;
  }

  .filter-tabs {
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .custom-date-inline {
    flex: 0 0 auto;
    order: 0;
    margin-top: 0;
    margin-left: 8px;
    position: relative;
  }
  
  .custom-date-toggle {
    width: auto;
    justify-content: center;
    padding: 0px 10px;
    font-size: 12px;
    min-width: 60px;
  }
  
  .custom-date-panel {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    margin-top: 4px;
    z-index: 1000;
  }
  
  .date-input-inline {
    min-width: 110px;
    font-size: 12px;
    padding: 6px 8px;
  }
  
  .date-separator {
    font-size: 12px;
  }

  .tab-btn {
    flex: 0 0 auto;
    padding: 4px 8px;
    font-size: 10px;
    min-width: 0;
    white-space: nowrap;
  }

  .btn-refresh {
    flex-shrink: 0;
    width: auto;
    padding: 4px 10px;
    font-size: 10px;
    min-width: 50px;
    margin-left: 8px;
  }

  .custom-date-range {
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .date-group {
    width: 100%;
  }

  .date-group label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .input-field {
    padding: 8px 10px;
    font-size: 13px;
  }

  .custom-date-range .btn {
    width: 100%;
    padding: 8px 16px;
    font-size: 14px;
  }

  /* 统计信息卡片 - 紧凑布局 */
  .statistics-card {
    padding: 10px 8px;
  }

  .statistics-card .card-header {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .statistics-card .card-header h2 {
    font-size: 13px;
  }

  .statistics-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }

  .stat-item {
    padding: 5px 3px;
  }

  .stat-label {
    font-size: 9px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stat-value {
    font-size: 10px;
    line-height: 1.2;
    word-break: break-word;
  }

  /* 图表区域 - 移动端样式 */
  .chart-header {
    margin-top: 15px;
    margin-bottom: 10px;
    padding-top: 12px;
    padding-bottom: 6px;
  }

  .chart-header h2 {
    font-size: 13px;
  }

  .chart-container {
    height: 400px;
    margin-top: 8px;
  }

  .card-header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .card-header h2 {
    font-size: 15px;
    margin: 0;
  }
}

@media screen and (max-width: 480px) {
  .header .title {
    font-size: 14px;
    text-align: left;
  }

  .header-actions {
    gap: 5px;
  }

  .today-range {
    font-size: 9px;
    padding: 4px 6px;
  }

  .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  /* 价格卡片 - 3列网格（小屏） */
  .price-info-horizontal {
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
  }

  .price-item-h {
    padding: 4px 2px;
  }

  .price-label-h {
    font-size: 7.5px;
  }

  .price-value-h {
    font-size: 9px;
  }
  .trend-arrow {
    font-size: 9px;
  }

  /* 筛选按钮更小 */
  .tab-btn {
    padding: 3px 6px;
    font-size: 9px;
  }

  .btn-refresh {
    padding: 3px 8px;
    font-size: 9px;
    min-width: 40px;
  }

  /* 统计信息 - 4列网格 */
  .statistics-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .stat-item {
    padding: 4px 2px;
  }

  .stat-label {
    font-size: 8px;
  }

  .stat-value {
    font-size: 9px;
    word-break: break-word;
  }

  .chart-header {
    margin-top: 12px;
    padding-top: 10px;
  }

  .chart-header h2 {
    font-size: 12px;
  }

  .chart-container {
    height: 350px;
  }
}

/* 弹窗样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.3s ease-in;
}

body.dark-mode .modal-content {
  background: #1c1c1c;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #e8e8e8;
}

body.dark-mode .modal-header {
  border-bottom-color: #3a3a3a;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: #222;
}

body.dark-mode .modal-header h2 {
  color: #eaeaea;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

body.dark-mode .modal-close:hover {
  color: #e0e0e0;
}

.modal-body {
  padding: 25px;
}

.reminder-tips {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

body.dark-mode .reminder-tips {
  background: #3a3a2a;
  border-color: #5a5a3a;
  color: #d4d47a;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

body.dark-mode .checkbox-group label {
  color: #999;
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-footer .btn {
  flex: 1;
}

/* 多个提醒的样式 */
.modal-large {
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.reminder-section {
  margin-bottom: 25px;
}

.reminder-section h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 12px 0;
  color: #333;
}

body.dark-mode .reminder-section h3 {
  color: #eaeaea;
}

.reminder-add-group {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.reminder-add-group .input-field {
  flex: 3;
  min-width: 0;
  background: #ffffff !important;
  border: 2px solid #999 !important;
  color: #333 !important;
  min-height: 42px;
  font-size: 15px;
  padding: 10px 12px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.reminder-add-group .input-field:focus {
  border-color: #E24A4A !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(226, 74, 74, 0.2);
  outline: none;
}

.reminder-add-group .input-field::placeholder {
  color: #999;
  opacity: 1;
}

body.dark-mode .reminder-add-group .input-field {
  background: #2a2a2a !important;
  border: 2px solid #555 !important;
  color: #ffffff !important;
}

body.dark-mode .reminder-add-group .input-field:focus {
  border-color: #D4AF37 !important;
  background: #333 !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

body.dark-mode .reminder-add-group .input-field::placeholder {
  color: #888;
  opacity: 1;
}

.btn-add {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: #E24A4A;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.3s;
  min-width: 60px;
  max-width: 80px;
}

.btn-add:hover {
  background: #C73939;
}

body.dark-mode .btn-add {
  background: #D4AF37;
  color: #1C1C1C;
}

body.dark-mode .btn-add:hover {
  background: #C4A027;
}

.reminder-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px;
  background: #f9f9f9;
}

body.dark-mode .reminder-list {
  border-color: #3a3a3a;
  background: #2a2a2a;
}

.reminder-empty {
  text-align: center;
  color: #999;
  padding: 20px;
  font-size: 14px;
}

.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: white;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background 0.3s;
}

.reminder-item:last-child {
  margin-bottom: 0;
}

.reminder-item:hover {
  background: #f5f5f5;
}

body.dark-mode .reminder-item {
  background: #1c1c1c;
}

body.dark-mode .reminder-item:hover {
  background: #252525;
}

.reminder-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  flex: 1;
}

.reminder-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.reminder-price {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

body.dark-mode .reminder-price {
  color: #eaeaea;
}

.btn-delete {
  padding: 5px 12px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.3s;
}

.btn-delete:hover {
  background: #cc0000;
}

body.dark-mode .btn-delete {
  background: #cc3333;
}

body.dark-mode .btn-delete:hover {
  background: #aa1111;
}

/* 平板适配 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .price-info {
    grid-template-columns: repeat(2, 1fr);
  }

  .statistics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
