/* ==========================================
   现代金融理财USDT - 专业美化样式
   配色方案: 深蓝色系 + 金色点缀
   设计理念: 专业、科技、信任
   ========================================== */

/* ========== 颜色变量定义 ========== */
:root {
  /* 主色调 - 深蓝色系 */
  --primary-dark-blue: #0a1929;
  --primary-blue: #1a2f4a;
  --secondary-blue: #2d4a6f;
  --accent-blue: #3d5a80;
  --light-blue: #4a6fa5;

  /* 金色点缀 */
  --gold-primary: #d4af37;
  --gold-light: #f4d03f;
  --gold-dark: #b8941c;

  /* 功能色 */
  --success-green: #00e676;
  --danger-red: #ff1744;
  --warning-orange: #ff9800;

  /* 中性色 */
  --white: #ffffff;
  --light-gray: #e0e0e0;
  --medium-gray: #757575;
  --dark-gray: #424242;

  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #0a1929 0%, #2d4a6f 50%, #3d5a80 100%);
  --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  --gradient-card: linear-gradient(135deg, rgba(26, 47, 74, 0.9) 0%, rgba(61, 90, 128, 0.8) 100%);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
}

/* ========== 全局基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--primary-dark-blue);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ========== 动态背景渐变 ========== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at top, rgba(61, 90, 128, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
    var(--gradient-primary);
  z-index: -2;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-20px); }
}

/* ========== 玻璃态效果 (Glassmorphism) ========== */
.glass-card {
  background: rgba(26, 47, 74, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(26, 47, 74, 0.6);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  transform: translateY(-5px);
}

/* ========== 卡片容器 ========== */
.modern-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: left 0.5s ease;
}

.modern-card:hover::before {
  left: 100%;
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.3);
}

/* ========== 按钮样式 ========== */
.btn-primary {
  background: var(--gradient-gold);
  color: var(--primary-dark-blue);
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  background: transparent;
  color: var(--gold-primary);
  border: 2px solid var(--gold-primary);
  padding: 10px 30px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--gold-primary);
  color: var(--primary-dark-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

/* ========== 数据展示卡片 ========== */
.data-card {
  background: rgba(61, 90, 128, 0.3);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.data-card:hover {
  background: rgba(61, 90, 128, 0.5);
  border-color: var(--gold-primary);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.data-label {
  font-size: 14px;
  color: var(--light-gray);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.data-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-primary);
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.data-change {
  font-size: 14px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.data-change.positive {
  color: var(--success-green);
}

.data-change.negative {
  color: var(--danger-red);
}

/* ========== 表格样式 ========== */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.modern-table thead th {
  background: rgba(61, 90, 128, 0.4);
  color: var(--gold-primary);
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
}

.modern-table tbody tr {
  background: rgba(26, 47, 74, 0.4);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.modern-table tbody tr:hover {
  background: rgba(61, 90, 128, 0.6);
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.modern-table tbody td {
  padding: 16px;
  border: none;
  color: var(--white);
}

.modern-table tbody tr td:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.modern-table tbody tr td:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

/* ========== 输入框样式 ========== */
.modern-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(26, 47, 74, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modern-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: rgba(26, 47, 74, 0.7);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.modern-input::placeholder {
  color: var(--medium-gray);
}

/* ========== 标签徽章 ========== */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(0, 230, 118, 0.2);
  color: var(--success-green);
  border: 1px solid var(--success-green);
}

.badge-warning {
  background: rgba(255, 152, 0, 0.2);
  color: var(--warning-orange);
  border: 1px solid var(--warning-orange);
}

.badge-danger {
  background: rgba(255, 23, 68, 0.2);
  color: var(--danger-red);
  border: 1px solid var(--danger-red);
}

.badge-gold {
  background: var(--gradient-gold);
  color: var(--primary-dark-blue);
  border: none;
  box-shadow: var(--shadow-gold);
}

/* ========== 导航栏 ========== */
.modern-header {
  background: rgba(10, 25, 41, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.modern-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.modern-nav-link {
  color: var(--white);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

.modern-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.modern-nav-link:hover::after,
.modern-nav-link.active::after {
  width: 80%;
}

.modern-nav-link:hover,
.modern-nav-link.active {
  color: var(--gold-primary);
}

/* ========== 加载动画 ========== */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========== 进度条 ========== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 10px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ========== 图表容器 ========== */
.chart-container {
  background: rgba(26, 47, 74, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.chart-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

/* ========== 网格布局 ========== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ========== 弹性布局工具类 ========== */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

/* ========== 间距工具类 ========== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* ========== 文本样式 ========== */
.text-gold {
  color: var(--gold-primary);
}

.text-white {
  color: var(--white);
}

.text-success {
  color: var(--success-green);
}

.text-danger {
  color: var(--danger-red);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

/* ========== 移动端响应式设计 ========== */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .why-us-grid {
    grid-template-columns: 1fr !important;
  }

  .why-us-carousel-grid {
    grid-template-columns: 1fr !important;
  }

  .modern-card {
    padding: 16px;
  }

  .data-value {
    font-size: 24px;
  }

  .chart-container {
    padding: 16px;
  }

  .modern-nav {
    flex-wrap: wrap;
  }

  .modern-nav-link {
    padding: 8px 12px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 12px 20px;
  }

  .modern-table {
    font-size: 12px;
  }

  .modern-table thead th,
  .modern-table tbody td {
    padding: 10px;
  }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 47, 74, 0.3);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-gold);
  border-radius: 5px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* ========== 选中文本样式 ========== */
::selection {
  background: var(--gold-primary);
  color: var(--primary-dark-blue);
}

::-moz-selection {
  background: var(--gold-primary);
  color: var(--primary-dark-blue);
}

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

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

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* ========== 脉冲效果 (用于实时数据) ========== */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ========== 模态框 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 41, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  animation: slideInRight 0.3s ease;
}

/* ========== 通知提示 ========== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--gradient-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border-left: 4px solid var(--gold-primary);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  z-index: 3000;
  max-width: 400px;
}

.notification.success {
  border-left-color: var(--success-green);
}

.notification.error {
  border-left-color: var(--danger-red);
}

/* ========== 容器 ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

/* ========== 标题样式 ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

h1 {
  font-size: 48px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 36px;
  color: var(--gold-primary);
}

h3 {
  font-size: 28px;
  color: var(--white);
}

h4 {
  font-size: 22px;
  color: var(--white);
}

/* ========== 链接样式 ========== */
a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ========== 分隔线 ========== */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  margin: 30px 0;
}

/* ========== 图标样式 ========== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  transition: all 0.3s ease;
}

.icon:hover {
  background: var(--gold-primary);
  color: var(--primary-dark-blue);
  transform: rotate(15deg) scale(1.1);
}

/* ========== 特效：发光效果 ========== */
.glow {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.glow:hover {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
}

/* ========== 禁用状态 ========== */
.disabled,
[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== 隐藏元素 ========== */
.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

/* ========== 打印样式 ========== */
@media print {
  body {
    background: white;
    color: black;
  }

  .modern-card,
  .glass-card {
    border: 1px solid #000;
    background: white;
  }
}
