/* 全局样式 */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #64748b;
  --success: #10b981;
  --success-light: #34d399;
  --danger: #ef4444;
  --danger-light: #f87171;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --info: #06b6d4;
  --info-light: #22d3ee;
  --light: #f8fafc;
  --dark: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius: 0.75rem;
  --border-radius-lg: 1rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-900);
  background: var(--gradient-bg);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 导航栏样式 */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
  color: var(--primary);
}

.navbar-nav .nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

/* 英雄区样式 */
.hero {
  padding-top: 5rem;
  padding-bottom: 5rem;
  background: var(--gradient-bg);
}

/* 价格卡片样式 - 优化版 */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card-body {
  padding: 1rem;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.card-body {
  padding: 1.5rem;
}

.card h3, .card h6 {
  font-weight: 600;
}

.card h6.text-muted {
  color: var(--gray-500) !important;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.price-up {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.price-down {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* 按钮样式优化 */
.btn {
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--gradient-primary);
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
  border: 2px solid var(--gray-300);
  color: var(--gray-600);
  background: white;
}

.btn-outline-secondary:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
  color: var(--gray-700);
}

.btn-warning {
  background: var(--gradient-danger);
  color: white;
  box-shadow: var(--shadow);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 功能图标样式 */
.feature-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 加载占位符样式 */
.placeholder {
  background-color: #e9ecef;
}

/* 加密货币卡片样式 - 优化版 */
.crypto-card {
  border-radius: 0.5rem;
  overflow: hidden;
}

.crypto-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
}

.crypto-symbol {
  font-size: 0.8rem;
  color: var(--secondary);
  text-transform: uppercase;
}

.crypto-price {
  font-weight: 600;
  font-size: 0.95rem;
}

.crypto-change {
  font-weight: 500;
  font-size: 0.9rem;
}

/* 响应式调整 - 优化版 */
@media (max-width: 768px) {
  .hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
  }

  .card-body {
    padding: 0.875rem;
  }

  .crypto-logo {
    width: 28px;
    height: 28px;
  }

  .crypto-symbol {
    font-size: 0.75rem;
  }

  .crypto-price {
    font-size: 0.9rem;
  }

  .crypto-change {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 0.75rem;
  }

  .crypto-logo {
    width: 24px;
    height: 24px;
  }

  .crypto-symbol {
    font-size: 0.7rem;
  }

  .crypto-price {
    font-size: 0.85rem;
  }

  .crypto-change {
    font-size: 0.8rem;
  }
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-up {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotate {
  animation: rotate 1s linear infinite;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 骨架屏加载效果 */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.375rem;
}

/* 渐变文字效果 */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 玻璃态效果 */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 悬浮效果 */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 错误提示样式增强 */
.alert-danger {
  border-left: 4px solid var(--danger);
  animation: fadeIn 0.3s ease-in-out;
}

/* 无数据提示样式 */
#no-data-message {
  animation: fadeIn 0.5s ease-in-out;
}

/* 加载指示器增强 */
#loading-indicator .spinner-border {
  width: 3rem;
  height: 3rem;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 为语言切换器添加样式 */
#lang-switcher {
  transition: all 0.3s ease;
}

#lang-switcher .btn {
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

#lang-switcher .dropdown-menu {
  min-width: 120px;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: none;
  padding: 0.5rem 0;
}

#lang-switcher .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

#lang-switcher .dropdown-item.active {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

#lang-switcher .dropdown-item:hover {
  background-color: rgba(13, 110, 253, 0.1);
}

/* 登录页面自定义语言切换器 */
.language-switcher {
  text-align: center;
  margin-top: 15px;
}

.language-switcher button {
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.language-switcher button:hover {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

/* 表格样式优化 */
.table-responsive {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: white;
}

.table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  padding: 1.25rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
  background: var(--gray-50);
  transform: scale(1.01);
}

.table tbody td {
  padding: 1.25rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 500;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* 加密货币表格样式 */
#trending-coins-table {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

#trending-coins-table thead th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  padding: 1.25rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.crypto-row {
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-100);
}

.crypto-row:hover {
  background: var(--gray-50);
  transform: scale(1.01);
}

.crypto-row td {
  padding: 1.25rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 500;
}

.crypto-logo {
  border-radius: 50%;
  object-fit: cover;
}

.crypto-price {
  font-weight: 600;
  font-size: 1rem;
}

.crypto-change {
  font-weight: 500;
  font-size: 0.9rem;
}

.crypto-symbol {
  font-size: 0.8rem;
  font-weight: 500;
}

/* 持仓表格样式优化 */
.holdings-table {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.holdings-table thead th {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border-bottom: 2px solid var(--primary-light);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--gray-800);
  padding: 1.5rem 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: center;
}

.holdings-table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-100);
  background: white;
}

.holdings-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, rgba(99, 102, 241, 0.05) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.holdings-table tbody td {
  padding: 1.5rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 500;
  text-align: center;
}

.holdings-table .coin-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  justify-content: flex-start;
}

.holdings-table .coin-icon-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.holdings-table tr:hover .coin-icon-small {
  border-color: var(--primary-light);
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.holdings-table .coin-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.holdings-table .coin-symbol {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.holdings-table .amount {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-800);
}

.holdings-table .price {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary);
}

.holdings-table .value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
}

.holdings-table .profit {
  font-weight: 600;
  text-align: center;
}

.holdings-table .profit.positive {
  color: var(--success);
}

.holdings-table .profit.negative {
  color: var(--danger);
}

.holdings-table .profit-percentage {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  text-align: center;
}

.holdings-table .allocation {
  font-weight: 600;
  color: var(--info);
  min-width: 60px;
}

/* 交易记录表格样式优化 */
.transactions-table {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.transactions-table thead th {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border-bottom: 2px solid var(--primary-light);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--gray-800);
  padding: 1rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: center;
}

.transactions-table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-100);
  background: white;
}

.transactions-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, rgba(99, 102, 241, 0.05) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.transactions-table tbody td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 500;
  text-align: center;
  font-size: 0.875rem;
}

.transactions-table .coin-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  justify-content: flex-start;
}

.transactions-table .coin-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.transactions-table tr:hover .coin-icon-small {
  border-color: var(--primary-light);
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.transactions-table .coin-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.transactions-table .coin-symbol {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transactions-table .transaction-type {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.transactions-table .transaction-type.buy {
  color: var(--success);
}

.transactions-table .transaction-type.sell {
  color: var(--danger);
}

.transactions-table .amount {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-800);
}

.transactions-table .price,
.transactions-table .total,
.transactions-table .current-price {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary);
}

.transactions-table .profit {
  font-weight: 600;
}

.transactions-table .profit.positive {
  color: var(--success);
}

.transactions-table .profit.negative {
  color: var(--danger);
}

.transactions-table .profit-percentage {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  opacity: 0.8;
}

.transactions-table .time-display {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.transactions-table .actions {
  text-align: center;
}

.transactions-table .btn-icon {
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.transactions-table .btn-icon:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

/* 交易记录头部样式 */
.transactions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.transactions-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 分页样式优化 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1.5rem;
}

.page-btn {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: var(--transition);
  cursor: pointer;
  min-width: 44px;
  text-align: center;
}

.page-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.page-btn.active {
  background: var(--gradient-primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.page-ellipsis {
  color: var(--gray-400);
  font-weight: 600;
  padding: 0.75rem 0.5rem;
}

/* 空状态样式优化 */
.empty-holdings {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-holdings .empty-state {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2rem;
  border: 2px dashed rgba(99, 102, 241, 0.2);
}

.empty-holdings .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-holdings p {
  color: var(--gray-600);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

/* 响应式表格调整 */
@media (max-width: 768px) {
  #trending-coins-table thead th,
  .crypto-row td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }

  .crypto-logo {
    width: 28px !important;
    height: 28px !important;
  }

  .crypto-price {
    font-size: 0.9rem;
  }

  /* 持仓表格响应式 */
  .holdings-table thead th,
  .holdings-table tbody td {
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
  }

  .holdings-table .coin-icon-small {
    width: 32px;
    height: 32px;
  }

  .holdings-table .coin-name {
    font-size: 0.9rem;
  }

  .holdings-table .coin-symbol {
    font-size: 0.8rem;
  }

  .holdings-table .value {
    font-size: 1rem;
  }

  /* 交易记录表格响应式 */
  .transactions-table thead th,
  .transactions-table tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .transactions-table .coin-icon-small {
    width: 28px;
    height: 28px;
  }

  .transactions-table .coin-name {
    font-size: 0.8rem;
  }

  .transactions-table .coin-symbol {
    font-size: 0.7rem;
  }

  .transactions-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .transactions-header h3 {
    font-size: 1.25rem;
  }

  .transactions-table .transaction-type {
    font-size: 0.8rem;
  }

  .transactions-table .btn-icon {
    width: 32px;
    height: 32px;
  }

  .pagination {
    padding: 1rem;
    flex-wrap: wrap;
  }

  .page-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 36px;
  }
}

@media (max-width: 576px) {
  #trending-coins-table thead th,
  .crypto-row td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }

  .crypto-logo {
    width: 24px !important;
    height: 24px !important;
  }

  /* 持仓表格小屏幕优化 */
  .holdings-table {
    font-size: 0.8rem;
  }

  .holdings-table thead th,
  .holdings-table tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .holdings-table .coin-info {
    gap: 0.5rem;
  }

  .holdings-table .coin-icon-small {
    width: 28px;
    height: 28px;
  }

  .holdings-table .coin-name {
    font-size: 0.85rem;
  }

  .holdings-table .coin-symbol {
    font-size: 0.75rem;
  }

  .holdings-table .allocation {
    padding: 0.375rem;
    font-size: 0.8rem;
    min-width: 50px;
  }

  /* 交易记录表格小屏幕优化 */
  .transactions-table {
    font-size: 0.8rem;
  }

  .transactions-table thead th,
  .transactions-table tbody td {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }

  .transactions-table .coin-info {
    gap: 0.5rem;
  }

  .transactions-table .coin-icon-small {
    width: 24px;
    height: 24px;
  }

  .transactions-table .coin-name {
    font-size: 0.75rem;
  }

  .transactions-table .coin-symbol {
    font-size: 0.65rem;
  }

  .transactions-header {
    padding: 0.75rem;
  }

  .transactions-header h3 {
    font-size: 1.1rem;
  }

  .transactions-table .transaction-type {
    font-size: 0.75rem;
  }

  .transactions-table .btn-icon {
    width: 28px;
    height: 28px;
  }

  .pagination {
    padding: 0.75rem;
  }

  .page-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    min-width: 32px;
  }

  /* 表格水平滚动 */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .holdings-table,
  .transactions-table {
    min-width: 600px;
  }
}

/* 关注列表卡片样式 - 优化版 */
.coin-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  border: 1px solid var(--gray-200);
  position: relative;
  height: 100%;
}

.coin-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.coin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.coin-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.coin-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
  transition: border-color 0.2s ease;
}

.coin-card:hover .coin-icon {
  border-color: var(--primary-light);
}

.coin-details h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.2;
}

.coin-symbol {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.custom-badge {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.remove-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.2s ease;
  cursor: pointer;
}

.remove-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.coin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.metric {
  text-align: center;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.metric:hover {
  background: white;
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 0.5rem;
}

.metric-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.metric-value.price {
  font-size: 1.25rem;
  color: var(--primary);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-value.positive {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  display: inline-block;
}

.metric-value.negative {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  display: inline-block;
}

.alert-info {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #0066cc;
}

.alert-info i {
  color: #0066cc;
}

/* 空状态和错误状态样式 */
.empty-state,
.error-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.empty-state::before,
.error-state::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.empty-icon,
.error-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--gray-400);
  opacity: 0.8;
}

.error-icon {
  color: var(--danger);
}

.empty-state h3,
.error-state h3 {
  color: var(--gray-900);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.empty-state p,
.error-state p {
  color: var(--gray-600);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* 模态框样式优化 */
.modal-content {
  border-radius: var(--border-radius-lg);
  border: none;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
}

.modal-header {
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem;
}

.modal-title {
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
  padding: 1.5rem;
}

/* 表单样式优化 */
.form-control {
  border: 2px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  font-weight: 500;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-select {
  border: 2px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  font-weight: 500;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

/* 加载指示器优化 */
#loading {
  z-index: 9999;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* 节标题样式 */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* 响应式调整 - 优化版 */
@media (max-width: 768px) {
  .coin-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  .coin-icon {
    width: 36px;
    height: 36px;
  }

  .coin-details h4 {
    font-size: 1rem;
  }

  .coin-header {
    margin-bottom: 0.75rem;
  }

  .coin-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .metric {
    padding: 0.5rem;
  }

  .metric-value {
    font-size: 0.875rem;
  }

  .metric-value.price {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 576px) {
  .coin-card {
    padding: 0.875rem;
  }

  .coin-header {
    margin-bottom: 0.75rem;
  }

  .coin-icon {
    width: 32px;
    height: 32px;
  }

  .coin-details h4 {
    font-size: 0.95rem;
  }

  .remove-btn {
    width: 28px;
    height: 28px;
  }

  .coin-metrics {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }

  .metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0.5rem;
  }

  .metric-label {
    margin-bottom: 0;
    font-size: 0.7rem;
  }

  .metric-value {
    font-size: 0.8rem;
  }

  .metric-value.price {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* 额外的现代化样式 */

/* 页面背景优化 */
body {
  min-height: 100vh;
}

/* 容器样式优化 */
.container {
  position: relative;
}

/* 页面节区样式 */
section {
  position: relative;
}

section.bg-light {
  background: var(--gray-50) !important;
}

/* 统计卡片特殊样式 */
.card h3 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 价格变化动画 */
.price-change {
  transition: var(--transition);
}

.price-change.updated {
  animation: pulse 0.6s ease-in-out;
}

/* 表格行悬停效果增强 */
.table tbody tr:hover {
  background: linear-gradient(135deg, var(--gray-50) 0%, rgba(99, 102, 241, 0.05) 100%);
  transform: scale(1.01);
  box-shadow: var(--shadow-sm);
}

/* 按钮组样式 */
.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

.btn-group .btn:last-child {
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* 工具提示样式 */
.tooltip {
  font-size: 0.875rem;
}

.tooltip-inner {
  background: var(--gray-900);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

/* 徽章样式优化 */
.badge {
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
}

/* 输入组样式 */
.input-group-text {
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  color: var(--gray-600);
  font-weight: 600;
}

/* 下拉菜单样式 */
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  transition: var(--transition);
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* 页脚样式 */
footer {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--gray-200) !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* 选择文本样式 */
::selection {
  background: rgba(99, 102, 241, 0.2);
  color: var(--gray-900);
}

/* 焦点样式 */
*:focus {
  outline: none;
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 打印样式 */
@media print {
  .navbar,
  .btn,
  .modal,
  footer {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid var(--gray-300) !important;
  }
}
