/* GTFX 全局样式 */
* { -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; }

/* 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; }
}
