:root {
    /* 颜色变量 - 浅色模式 */
    --bg-primary: #f5f5f7;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-color: #9c27b0;
    --accent-light: #e1bee7;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --positive-color: #4caf50;
    --negative-color: #f44336;
    --hover-bg: #f0f0f0;
  }
  
  [data-theme="dark"] {
    /* 颜色变量 - 深色模式 */
    --bg-primary: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --accent-color: #bb86fc;
    --accent-light: #3700b3;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --positive-color: #81c784;
    --negative-color: #e57373;
    --hover-bg: #2c2c2c;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    font-size: 16px;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  .container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    flex-grow: 1;
  }
  
  /* 头部样式 */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: var(--bg-card);
    box-shadow: 0 1px 3px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .logo-container {
    display: flex;
    align-items: center;
  }
  
  .logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
  }
  
  h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
  }
  
  .header-controls {
    display: flex;
    gap: 16px;
    align-items: center;
  }
  
  .theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .theme-toggle:hover {
    background-color: var(--hover-bg);
  }
  
  .language-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
  }
  
  .language-selector select:focus {
    border-color: var(--accent-color);
  }
  
  /* 网格布局 */
  .grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
  }
  
  @media (min-width: 768px) {
    .grid-container {
      grid-template-columns: 1fr 2fr;
    }
  }
  
  /* 卡片样式 */
  .card {
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    padding: 24px;
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
  }
  
  /* 价格卡片样式 */
  .price-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  
  .price-currency {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-left: 8px;
  }
  
  .price-stats {
    display: flex;
    gap: 24px;
    margin: 16px 0;
  }
  
  .price-change, .price-volume {
    display: flex;
    flex-direction: column;
  }
  
  .price-updated {
    font-size: 0.875rem;
    color: var(--text-tertiary);
  }
  
  .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
  }
  
  .positive-change {
    color: var(--positive-color);
  }
  
  .negative-change {
    color: var(--negative-color);
  }
  
  /* 图表卡片样式 */
  .chart-card h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--text-primary);
  }
  
  #chart-container {
    height: 300px;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
  }
  
  /* 货币表格样式 */
  .currency-table-card h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--text-primary);
  }
  
  .currency-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  @media (min-width: 640px) {
    .currency-table {
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
    }
  }
  
  .currency-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .currency-row:last-child {
    border-bottom: none;
  }
  
  .currency-flag {
    width: 24px;
    height: 16px;
    margin-right: 12px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }
  
  .currency-name {
    flex: 1;
    color: var(--text-primary);
  }
  
  .currency-value {
    font-weight: 500;
    color: var(--text-primary);
  }
  
  .currency-symbol {
    color: var(--text-secondary);
    margin-right: 4px;
  }
  
  .data-source {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
  }
  
  .data-source p {
    margin: 4px 0;
  }
  
  /* 页脚样式 */
  .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
    background-color: var(--bg-card);
  }
  
  .refresh-control {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .refresh-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .refresh-button:hover {
    background-color: var(--accent-light);
  }
  
  .refresh-time {
    font-size: 0.875rem;
    color: var(--text-tertiary);
  }
  
  /* 加载状态 */
  .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--bg-primary-rgb, 245, 245, 247), 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
  }
  
  .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-light);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 16px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* 错误提示 */
  .error-message {
    padding: 16px;
    background-color: rgba(var(--negative-color-rgb, 244, 67, 54), 0.1);
    color: var(--negative-color);
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
  }
  
  /* 离线提示 */
  .offline-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-card);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 12px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
  }
  
  /* 工具类 */
  .hidden {
    display: none;
  }
  
  /* 动画效果 */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .fade-in {
    animation: fadeIn 0.3s ease-in;
  }
  
  /* 响应式调整 */
  @media (max-width: 480px) {
    .header {
      padding: 12px 16px;
    }
    
    h1 {
      font-size: 1.25rem;
    }
    
    .price-value {
      font-size: 1.75rem;
    }
  }
  