/* 高顺环球 GOOSUN FX 全局样式 */
* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,0.5); }

/* 实时行情滚动 */
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
#ticker-track {
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}
#ticker-track:hover { animation-play-state: paused; }

/* 价格变化高亮闪烁 */
.flash-up {
  background-color: rgba(22, 163, 74, 0.2) !important;
  transition: background-color 0.6s ease-out;
}
.flash-down {
  background-color: rgba(220, 38, 38, 0.2) !important;
  transition: background-color 0.6s ease-out;
}
.price-up { color: #16a34a; }
.price-down { color: #dc2626; }

/* 表格行 hover */
.market-row { transition: background-color 0.15s; }
.market-row:hover { background-color: rgba(241, 245, 249, 0.6); }

/* 交易终端品种列表 */
.symbol-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 8px; border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  cursor: pointer; transition: background-color 0.15s;
}
.symbol-row:hover { background-color: rgba(51, 65, 85, 0.5); }
.symbol-row.active { background-color: rgba(10, 77, 171, 0.4); }

/* 隐藏 input number 的默认箭头 */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

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

/* fade in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease-out; }

/* ========== Hero 装饰动画 ========== */
/* 浮动动画（上下缓慢漂浮） */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.animate-float { animation: floatY 4s ease-in-out infinite; }
.animate-float-slow { animation: floatY 6s ease-in-out infinite; }

/* 光晕脉冲 */
@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.08); }
}
.animate-glow { animation: glowPulse 4s ease-in-out infinite; }

/* 闪烁（星光） */
@keyframes sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
.animate-sparkle { animation: sparkle 2.5s ease-in-out infinite; }

/* 按钮金色 shimmer 光带 */
.btn-shimmer {
  position: relative; overflow: hidden;
}
.btn-shimmer::after {
  content: ''; position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(
    120deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%
  );
  transform: skewX(-20deg);
  animation: btnShimmer 2.8s ease-in-out infinite;
}
@keyframes btnShimmer {
  0%   { left: -75%; }
  60%  { left: 125%; }
  100% { left: 125%; }
}

/* 金色文字渐变动画（水平流动） */
.gold-text-gradient {
  background: linear-gradient(90deg, #f5c542, #e5a83a, #d4941f, #f5c542);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldFlow 4s linear infinite;
}
@keyframes goldFlow {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ========== 品牌字体工具类 ========== */
.font-serif-cn { font-family: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif; }
.font-cinzel  { font-family: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif; letter-spacing: 0.12em; }

/* ========== 奢华金属金色（立体光泽，用于品牌 Logo 文字） ========== */
.gold-metal {
  background: linear-gradient(
    180deg,
    #fff4bf 0%,
    #f8d46a 22%,
    #e5a83a 48%,
    #a16a16 62%,
    #e5a83a 78%,
    #f8d46a 92%,
    #fff4bf 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(245, 197, 66, 0.35)) drop-shadow(0 1px 0 rgba(0,0,0,0.4));
}
/* 略轻版金色（副标题/英文用） */
.gold-metal-light {
  background: linear-gradient(180deg, #fbe58a 0%, #f0c14a 40%, #d99d28 60%, #f0c14a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 2px rgba(245,197,66,0.3));
}

/* 金色细分隔线 */
.gold-divider {
  display: inline-block;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5a83a, transparent);
  width: 100%;
}

/* 网格装饰底 */
.hero-grid {
  background-image:
    linear-gradient(rgba(245, 197, 66, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 197, 66, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* 公告条自动滚动 */
@keyframes noticeSlide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.notice-scroll {
  animation: noticeSlide 40s linear infinite;
  will-change: transform;
}
.notice-scroll:hover { animation-play-state: paused; }

/* 放射光纹 */
.hero-rays::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 197, 66, 0.25), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(214, 148, 31, 0.28), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(77, 48, 26, 0.15), transparent 60%);
  pointer-events: none;
}

/* 隐藏横向滚动条（Tabs 区） */
.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* 涨绿跌红全局强化（兼容 Tailwind CDN 未生成类的情形） */
.text-up, .color-up { color: #16a34a !important; }
.text-down, .color-down { color: #dc2626 !important; }
.bg-up { background-color: #16a34a !important; }
.bg-down { background-color: #dc2626 !important; }
.border-up { border-color: #16a34a !important; }
.border-down { border-color: #dc2626 !important; }

/* 主打行情卡价格跳动 */
@keyframes priceBeat {
  0%, 100% { text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
  50%      { text-shadow: 0 2px 18px rgba(245,197,66,0.4), 0 2px 10px rgba(0,0,0,0.5); }
}
#main-price { animation: priceBeat 3s ease-in-out infinite; }

/* 价格闪烁升级：上下整条涨跌色条 */
.flash-up  { background-color: rgba(22, 163, 74, 0.25) !important; transition: background-color 0.6s ease-out; }
.flash-down{ background-color: rgba(220, 38, 38, 0.25) !important; transition: background-color 0.6s ease-out; }

/* Toast */
.toast {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  padding: 12px 20px; border-radius: 8px;
  background: white; box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  animation: slideInRight 0.3s ease-out;
  max-width: 360px;
}
.toast.success { border-left: 4px solid #16a34a; }
.toast.error { border-left: 4px solid #dc2626; }
.toast.info { border-left: 4px solid #0a4dab; }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
