/* css/xmmarkets.css */
:root {
  --xm-blue: #1A73E8;
  --xm-blue-light: #4D90FE;
  --xm-blue-dark: #0E5BC6;
  --xm-blue-glow: rgba(26, 115, 232, 0.6);
  
  --xm-bg-dark: #030014;
  --xm-bg-deep: #0A041A;
  --xm-bg-mid: #120824;
  --xm-bg-light: #1C1130;
  
  --xm-accent-purple: #6B21A5;
  --xm-accent-blue: #2563EB;
  --xm-cyan: #00E0FF;
}

/* 全局重置 - 彻底禁止横向滚动 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--xm-bg-dark) 0%, var(--xm-bg-deep) 50%, var(--xm-bg-mid) 100%);
  color: #ffffff;
  overflow-x: hidden;
  width: 100%;
}

/* 动态粒子背景 */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  opacity: 1;
  pointer-events: none;
}

/* 自定义滚动条 - 只保留垂直滚动条 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--xm-bg-mid);
}
::-webkit-scrollbar-thumb {
  background: var(--xm-blue);
  border-radius: 10px;
  box-shadow: 0 0 15px var(--xm-blue);
}

/* 隐藏水平滚动条 */
body::-webkit-scrollbar-horizontal {
  display: none;
}


/* 鼠标跟随光效 */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.25) 0%, rgba(107, 33, 165, 0.15) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.1s ease;
  filter: blur(20px);
}

/* 顶部通告栏 */
.top-banner {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: linear-gradient(to right, #1A0A2A, #2A1A3A, #1A0A2A);
  border-bottom: 1px solid rgba(26, 115, 232, 0.4);
}

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(18, 10, 30, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 115, 232, 0.2);
  transition: all 0.4s;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* 玻璃面板效果 */
.glass-panel {
  background: rgba(28, 17, 48, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 115, 232, 0.25);
  border-radius: 24px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(26, 115, 232, 0.15) inset;
  transition: all 0.4s;
}

.glass-panel:hover {
  border-color: rgba(26, 115, 232, 0.5);
  box-shadow: 0 25px 50px -15px rgba(26, 115, 232, 0.4), 0 0 0 1px rgba(26, 115, 232, 0.3) inset;
}

/* 蓝色渐变按钮 */
.btn-blue {
  background: linear-gradient(135deg, var(--xm-blue), var(--xm-blue-dark));
  color: var(--xm-bg-dark);
  font-weight: 700;
  border: none;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

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

.btn-blue:hover::after {
  width: 300px;
  height: 300px;
}

.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -5px var(--xm-blue);
}

.btn-outline-blue {
  background: transparent;
  border: 2px solid var(--xm-blue);
  color: var(--xm-blue);
  font-weight: 600;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-outline-blue::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--xm-blue);
  transition: left 0.4s;
  z-index: -1;
}

.btn-outline-blue:hover {
  color: var(--xm-bg-dark);
}

.btn-outline-blue:hover::before {
  left: 0;
}

/* 导航项 */
.nav-item {
  position: relative;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--xm-blue);
  transition: width 0.3s;
  box-shadow: 0 0 10px var(--xm-blue);
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
}

.nav-item.active {
  color: var(--xm-blue);
}

/* 多语言切换 - 纯点击版，无悬停 */
.lang-group {
  position: relative;
  display: inline-block;
  z-index: 10000;
}

.lang-group > button {
  position: relative;
  z-index: 10001;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #e5e5e5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s;
}

.lang-group > button:hover {
  color: var(--xm-blue);
  background: rgba(255, 255, 255, 0.05);
}

.lang-dropdown {
  position: fixed;
  min-width: 180px;
  background: rgba(18, 10, 30, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--xm-blue);
  border-radius: 16px;
  padding: 8px 0;
  display: none;
  z-index: 10002;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--xm-blue) inset;
  animation: dropdownFade 0.2s ease;
}

/* 显示下拉框 */
.lang-dropdown.show {
  display: block !important;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #fff;
  transition: all 0.2s;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--xm-blue);
  color: var(--xm-bg-dark);
}

.lang-option .fi {
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

/* 产品图标盒子 */
.product-icon-box {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
  transition: all 0.5s;
  background: rgba(26, 115, 232, 0.1);
  border: 1px solid rgba(26, 115, 232, 0.3);
  position: relative;
  overflow: hidden;
}

.product-icon-box::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(26, 115, 232, 0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.product-icon-box:hover::before {
  transform: translateX(100%);
}

.product-icon-box:hover {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--xm-blue);
  box-shadow: 0 0 30px var(--xm-blue);
}

/* 区块差异化背景 */
.section-why {
  background: linear-gradient(135deg, #0D0620 0%, #1A0E2E 100%);
  position: relative;
  overflow: hidden;
}

.section-why::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(26, 115, 232, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.section-products {
  background: linear-gradient(135deg, #0F0824 0%, #1C1230 100%);
}

.section-accounts {
  background: linear-gradient(135deg, #120A28 0%, #201634 100%);
}

.section-platforms {
  background: linear-gradient(135deg, #150D2C 0%, #241A38 100%);
}

.section-regulatory {
  background: linear-gradient(135deg, #0E0722 0%, #1E1432 100%);
}

.section-faq {
  background: linear-gradient(135deg, #110A26 0%, #221836 100%);
}

/* 流光卡片 */
.xm-card {
  background: rgba(35, 20, 55, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(26, 115, 232, 0.2);
  border-radius: 30px;
  padding: 40px 25px;
  transition: all 0.5s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}

.xm-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(26, 115, 232, 0.25), transparent);
  transition: left 0.8s;
  z-index: -1;
}

.xm-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--xm-blue);
  box-shadow: 0 30px 50px -20px rgba(26, 115, 232, 0.6);
}

.xm-card:hover::after {
  left: 100%;
}

.xm-card:hover .xm-icon {
  animation: iconPulse 1s infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 20px var(--xm-blue)); }
}

/* 3D倾斜效果 */
.tilt-card {
  transition: transform 0.3s;
  transform-style: preserve-3d;
}

/* 实时价格动画 */
.price-item {
  transition: all 0.3s;
}

.price-item:hover {
  transform: translateX(10px);
  background: rgba(26, 115, 232, 0.15);
  border-radius: 12px;
}

@keyframes priceFlash {
  0%, 100% { color: #fff; }
  50% { color: var(--xm-blue); text-shadow: 0 0 20px var(--xm-blue); }
}

.price-change-positive {
  animation: priceFlash 1s;
}

/* 账户表格样式 */
.account-table {
  width: 100%;
  border-collapse: collapse;
}

.account-table th {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--xm-blue);
  padding: 30px 20px;
  background: rgba(45, 25, 65, 0.95);
  text-shadow: 0 0 15px var(--xm-blue);
}

.account-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(26, 115, 232, 0.2);
  color: #f0e6ff;
  transition: all 0.3s;
}

.account-table tr:hover td {
  background: rgba(26, 115, 232, 0.1);
}

.account-table td:first-child {
  font-weight: 600;
  color: #fff;
  background: rgba(65, 35, 85, 0.8);
}

/* 数据卡片 */
.stat-card {
  background: linear-gradient(145deg, #2A1A3A, #1E0E2A);
  border: 1px solid rgba(26, 115, 232, 0.3);
  border-radius: 30px;
  padding: 30px;
  text-align: center;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
}

.stat-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--xm-blue);
  box-shadow: 0 0 40px rgba(26, 115, 232, 0.4);
}

.stat-card:hover::before {
  opacity: 1;
  animation: rotate 10s linear infinite;
}

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

/* 平台卡片 */
.platform-card {
  background: rgba(45, 25, 65, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(26, 115, 232, 0.25);
  border-radius: 40px;
  padding: 40px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.platform-card:hover {
  border-color: var(--xm-blue);
  transform: translateY(-10px);
  box-shadow: 0 30px 50px -20px var(--xm-blue);
}

.platform-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
}

.platform-card:hover::after {
  opacity: 1;
  animation: rotateSlow 20s linear infinite;
}

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

/* 监管徽章 - 对齐修复 */
.regulatory-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: rgba(26, 115, 232, 0.15);
  border: 1px solid rgba(26, 115, 232, 0.4);
  border-radius: 30px;
  font-size: 0.9rem;
  color: var(--xm-blue);
  transition: all 0.3s;
  text-align: center;
  min-height: 100px;
}

.regulatory-badge:hover {
  background: var(--xm-blue);
  color: var(--xm-bg-dark);
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--xm-blue);
}

.regulatory-badge .fi {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.regulatory-badge span:last-child {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* 新闻卡片 */
.news-card {
  background: rgba(45, 25, 65, 0.8);
  border-radius: 30px;
  overflow: hidden;
  transition: all 0.4s;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px -10px rgba(26, 115, 232, 0.5);
}

.news-card:hover .news-title {
  color: var(--xm-blue);
}

.news-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, #4A2A6A, #2A1A4A);
  position: relative;
  overflow: hidden;
}

.news-img-placeholder::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(26, 115, 232, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s;
}

.news-card:hover .news-img-placeholder::after {
  transform: translateX(100%);
}

/* details样式 */
details.glass-panel summary::-webkit-details-marker {
  display: none;
}

details.glass-panel {
  transition: all 0.4s;
}

details.glass-panel[open] {
  background: rgba(55, 35, 75, 0.95);
  border-color: var(--xm-blue);
}

details.glass-panel:hover summary {
  color: var(--xm-blue);
}

/* Hero区域增强 */
.hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 40px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(26, 115, 232, 0.3) 0%, transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(107, 33, 165, 0.4) 0%, transparent 45%),
              radial-gradient(circle at 20% 80%, rgba(0, 224, 255, 0.25) 0%, transparent 50%);
  animation: heroBackgroundPulse 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroBackgroundPulse {
  0%, 100% {
      transform: rotate(0deg) scale(1);
      opacity: 0.8;
  }
  33% {
      transform: rotate(5deg) scale(1.05);
      opacity: 1;
  }
  66% {
      transform: rotate(-5deg) scale(0.95);
      opacity: 0.9;
  }
}

/* 动态网格背景 */
.dynamic-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
      linear-gradient(rgba(26, 115, 232, 0.1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(26, 115, 232, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

/* 蓝色光晕 - 使用fixed定位避免影响布局 */
.blue-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  animation: glowMove 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes glowMove {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  25% { transform: translate(100px, 50px); opacity: 0.8; }
  50% { transform: translate(200px, -30px); opacity: 0.6; }
  75% { transform: translate(50px, 150px); opacity: 0.9; }
}

/* 动画 */
@keyframes gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(30px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}
.animate-fadeInUp {
  animation: fadeInUp 1s ease-out;
}
.animate-spin-slow {
  animation: spin 3s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 移动端修复 */
@media (max-width: 768px) {
  html, body {
      overflow-x: hidden !important;
      width: 100% !important;
  }
  
  .container, .max-w-7xl, .max-w-4xl, section, div {
      max-width: 100vw !important;
      overflow-x: hidden !important;
  }
  
  .blue-glow {
      width: 200px !important;
      height: 200px !important;
      filter: blur(40px);
  }
  
  .-inset-4 {
      inset: -0.5rem !important;
  }
  
  .lang-dropdown {
      min-width: 160px;
  }
  
  .lang-option {
      padding: 10px 16px;
      white-space: normal;
      word-break: keep-all;
  }
  
  .grid.grid-cols-2.md\:grid-cols-4.lg\:grid-cols-7 {
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 0.5rem !important;
  }
  
  .regulatory-badge {
      min-height: 90px;
      padding: 12px 4px;
  }
  
  .regulatory-badge .fi {
      font-size: 28px;
  }
  
  .overflow-x-auto {
      max-width: 100vw !important;
      overflow-x: auto !important;
      -webkit-overflow-scrolling: touch;
  }
  
  .product-icon-box {
      width: 50px !important;
      height: 50px !important;
      font-size: 20px !important;
  }
  
  .xm-card {
      padding: 30px 15px !important;
  }
  
  .platform-card {
      padding: 30px 20px !important;
  }
  
  .stat-card {
      padding: 20px !important;
  }
  
  .stat-card .text-5xl {
      font-size: 2.2rem !important;
  }
}

@media (max-width: 480px) {
  .grid.grid-cols-2.md\:grid-cols-4.lg\:grid-cols-7 {
      gap: 0.25rem !important;
  }
  
  .regulatory-badge {
      min-height: 85px;
      padding: 8px 2px;
  }
  
  .regulatory-badge .fi {
      font-size: 24px;
  }
  
  .regulatory-badge span:last-child {
      font-size: 10px;
  }
}


/* ============================================
   移动端菜单样式
   ============================================ */

/* 移动端菜单按钮 */
#mobileMenuBtn {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

#mobileMenuBtn:active {
    transform: scale(0.95);
}

#mobileMenuBtn i {
    filter: drop-shadow(0 0 5px var(--xm-blue));
}

/* 移动端菜单遮罩动画 */
#mobileMenu {
    transition: display 0.3s;
}

#menuOverlay {
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

/* 移动端菜单内容滚动 */
#menuContent {
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
}

/* 移动端菜单打开动画 */
#menuContent {
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* 移动端菜单打开时的body锁定 */
body.menu-open {
    overflow: hidden;
}

/* 遮罩淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 桌面端隐藏移动端菜单 */
@media (min-width: 1024px) {
    #mobileMenu {
        display: none !important;
    }
}

/* 极小屏幕下Logo文字隐藏（保留IB图标） */
@media (max-width: 480px) {
    .navbar .text-xl span.text-\[var\(--xm-blue\)\] {
        display: none;
    }
}

/* 移动端导航栏高度微调 */
@media (max-width: 768px) {
    .navbar .h-20 {
        height: 70px;
    }
}

.article-content {
    color: #e5e5e5;
    line-height: 1.8;
}
.article-content h1, .article-content h2, .article-content h3 {
    color: var(--xm-blue);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.article-content p {
    margin-bottom: 1em;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
}
.article-content a {
    color: var(--xm-blue);
    text-decoration: none;
}

.article-content a:hover {
    color: var(--xm-blue-light);
    text-decoration: none;
}

/* copyright 样式 */
.copyright {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(26, 115, 232, 0.2);
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    line-height: 1.8;
}
.copyright a {
    color: var(--xm-blue);
    text-decoration: none;
    transition: color 0.3s;
}
.copyright a:hover {
    color: var(--xm-blue-light);
    text-decoration: none;
}
.copyright span {
    margin-right: 0.25rem;
}
.copyright div {
    margin-top: 0.5rem;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.load-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, rgba(26,115,232,0.15), transparent);
    border: 1px solid var(--xm-blue);
    color: var(--xm-blue);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.load-more-btn:hover {
    background: var(--xm-blue);
    color: #030014;
    transform: translateY(-3px);
}
.hidden { display: none; }
.news-card { transition: all 0.4s; }
.news-card:hover { transform: translateY(-5px); }
area,map,bdo:empty,dfn:empty,font:empty,ins:empty,small:empty,sup:empty,time:empty,tt:empty,var:empty{display:none !important}