/* ============================================================
   polish.css — 全局轻量美化（黑石策略 dark + 金）
   只做增量覆盖：圆角/呼吸感/悬停微光/动效与无障碍细节。
   安全回退：删掉本文件在 index.html / admin.html 里的 <link> 即可。
   ============================================================ */

/* ---------- 全局：选择、滚动条、焦点、动效偏好 ---------- */

::selection {
  background: rgba(240, 185, 11, 0.9);
  color: #0b0e11;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 185, 11, 0.35) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(240, 185, 11, 0.5); background-clip: padding-box; border: 2px solid transparent; }

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(240, 185, 11, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

html { scroll-padding-top: 92px; }
#features, #pricing { scroll-margin-top: 96px; }

:where(button, a, input, select, textarea) {
  transition: transform 0.16s ease, border-color 0.16s ease,
    background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease,
    opacity 0.16s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- 落地页：分区呼吸感与卡片质感 ---------- */

.ld-section { scroll-margin-top: 96px; }

.ld-intro-copy h2,
.ld-band h2,
.ld-footer-cta h2 {
  letter-spacing: -0.01em;
}

.ld-intro-desc { max-width: 46em; line-height: 1.7; }

/* 功能卡：更柔和的圆角 + 悬停上浮微光 */
.ld-feature-card {
  border-radius: 16px;
  transition: transform 0.22s ease, border-color 0.22s ease,
    box-shadow 0.22s ease, background-color 0.22s ease;
}
.ld-feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 185, 11, 0.35);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(240, 185, 11, 0.08),
    0 0 42px rgba(240, 185, 11, 0.07);
}
.ld-feature-card .ld-feature-visual img { transition: transform 0.5s ease; }
.ld-feature-card:hover .ld-feature-visual img { transform: scale(1.02); }

/* 标签 chip：hover 提亮 */
.ld-chip {
  transition: transform 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, background-color 0.16s ease;
}
.ld-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 185, 11, 0.55);
  color: #fff;
}

/* 套餐卡：柔角 + 主推金边呼吸 */
.ld-plan {
  border-radius: 16px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.ld-plan:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
.ld-plan.is-featured {
  box-shadow:
    0 0 0 1px rgba(240, 185, 11, 0.45),
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 46px rgba(240, 185, 11, 0.12);
}
.ld-plan.is-featured:hover {
  box-shadow:
    0 0 0 1px rgba(240, 185, 11, 0.6),
    0 26px 64px rgba(0, 0, 0, 0.55),
    0 0 58px rgba(240, 185, 11, 0.18);
}

/* 按钮：主按钮金色渐变质感、幽灵按钮 hover 更清晰 */
.ld-btn { border-radius: 10px; transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease; }
.ld-btn-primary {
  background: linear-gradient(135deg, #f8d12f 0%, #f0b90b 100%);
  box-shadow: 0 8px 24px rgba(240, 185, 11, 0.28);
}
.ld-btn-primary:hover {
  background: linear-gradient(135deg, #ffe066 0%, #f5c518 100%);
  box-shadow: 0 12px 30px rgba(240, 185, 11, 0.38);
  transform: translateY(-1px);
}
.ld-btn-ghost { border-radius: 10px; }
.ld-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

/* CTA 收尾区微光分隔 */
.ld-footer-cta {
  position: relative;
  overflow: hidden;
}
.ld-footer-cta::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(640px 300px at 50% 120%, rgba(240, 185, 11, 0.10), transparent 60%);
}
.ld-footer-cta > * { position: relative; z-index: 1; }

/* ---------- 登录 / 联系弹窗：更柔面板与输入框 ---------- */

.ld-auth-panel {
  border-radius: 18px;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
.ld-auth-backdrop {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.6);
}
.ld-field input {
  border-radius: 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.ld-field input:focus {
  border-color: rgba(240, 185, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.16);
  background: #0f1218;
}
.ld-code-send { border-radius: 10px; }
.ld-oauth-btn { border-radius: 10px; }

/* ---------- 登录后 App：面板淡入与行内反馈 ---------- */

.view-panel:not(.hidden) {
  animation: app-panel-in 0.22s ease-out both;
}
@keyframes app-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 桌面行情工作台 ---------- */

@media (min-width: 900px) {
  body.page-watch-detail {
    --market-rail: clamp(360px, 31vw, 500px);
    background:
      radial-gradient(900px 520px at 78% -10%, rgba(240, 185, 11, 0.035), transparent 62%),
      #050607;
  }

  body.page-watch-detail .app-shell {
    width: var(--market-rail);
    min-height: 100vh;
    margin: 0;
    padding: 0 20px 32px;
    background: #080a0d;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
  }

  body.page-watch-detail .topbar {
    min-height: 64px;
    padding: 0 4px;
  }

  body.page-watch-detail .brand {
    color: var(--text);
    text-decoration: none;
  }

  body.page-watch-detail .brand-text {
    display: inline;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  body.page-watch-detail .feature-nav,
  body.page-watch-detail #watchlistView .watchlist-panel {
    width: 100%;
    max-width: none;
  }

  body.page-watch-detail .feature-nav {
    margin-bottom: 16px;
  }

  body.page-watch-detail .feature-item {
    padding-right: 13px;
    padding-left: 13px;
  }

  body.page-watch-detail .wl-cols,
  body.page-watch-detail .wl-row:not(.history-symbol-row) {
    grid-template-columns: minmax(118px, 1fr) 112px 78px;
    gap: 8px;
  }

  body.page-watch-detail .wl-cols {
    padding: 10px 12px;
    border-bottom-color: rgba(255, 255, 255, 0.07);
  }

  body.page-watch-detail .wl-row:not(.history-symbol-row) {
    min-height: 60px;
    margin: 3px 0;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
  }

  body.page-watch-detail .wl-row:not(.history-symbol-row):hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
  }

  body.page-watch-detail .wl-row.is-active {
    border-color: rgba(240, 185, 11, 0.18);
    background:
      linear-gradient(90deg, rgba(240, 185, 11, 0.09), rgba(255, 255, 255, 0.025));
    box-shadow: inset 2px 0 0 var(--accent);
  }

  body.page-watch-detail #watchlistDetailView {
    position: fixed;
    inset: 0 0 0 var(--market-rail);
    width: auto;
    margin: 0;
    padding: 22px clamp(24px, 3vw, 48px) 48px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: transparent;
    border-left: 0;
    box-shadow: none;
  }

  body.page-watch-detail .wl-trade-toolbar {
    min-height: 42px;
    margin-bottom: 8px;
  }

  body.page-watch-detail .wl-trade-pair strong {
    font-size: 20px;
  }

  body.page-watch-detail .wl-trade-head {
    grid-template-columns: minmax(250px, 1fr) minmax(280px, 0.72fr);
    gap: 24px 48px;
    align-items: center;
    margin: 4px 0 14px;
  }

  body.page-watch-detail .wl-trade-price {
    font-size: clamp(34px, 3vw, 46px);
  }

  body.page-watch-detail .wl-trade-stats {
    gap: 12px 24px;
  }

  body.page-watch-detail .wl-trade-stat span {
    font-size: 11px;
  }

  body.page-watch-detail .wl-trade-stat strong {
    font-size: 13px;
  }

  body.page-watch-detail .wl-tf-bar {
    gap: 6px;
    margin-bottom: 10px;
    padding: 0;
  }

  body.page-watch-detail .wl-tf-btn {
    padding: 7px 12px;
    border-radius: 7px;
  }

  body.page-watch-detail .wl-tf-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
  }

  body.page-watch-detail .wl-tf-btn.is-active {
    color: var(--accent);
    background: rgba(240, 185, 11, 0.09);
  }

  body.page-watch-detail .wl-chart-wrap {
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
  }

  body.page-watch-detail .wl-chart-host {
    height: clamp(440px, 58vh, 680px);
    min-height: 440px;
  }

  body.page-watch-detail .wl-analysis {
    margin-bottom: 0;
    border-radius: 12px;
    background:
      linear-gradient(135deg, rgba(246, 70, 93, 0.035), transparent 34%),
      #0c0f14;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  }
}

@media (min-width: 1500px) {
  body.page-watch-detail {
    --market-rail: clamp(440px, 28vw, 540px);
  }

  body.page-watch-detail #watchlistDetailView {
    padding-right: clamp(48px, 5vw, 88px);
    padding-left: clamp(48px, 5vw, 88px);
  }
}

/* 行卡片式悬停微光（策略广场 / 历史 / 行情通用结构） */
.signal-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.signal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 185, 11, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42), 0 0 24px rgba(240, 185, 11, 0.06);
}

/* 顶部导航 item 之间的柔滑过渡（不改变布局） */
.feature-item,
.plaza-tab,
.events-filter,
.symbol-trigger,
.topbar-login-btn,
.topbar-register-btn {
  transition: transform 0.14s ease, border-color 0.16s ease,
    background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.feature-item:hover,
.plaza-tab:hover,
.events-filter:hover {
  transform: translateY(-1px);
}

/* toast 更圆润、更有存在感 */
.toast {
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* skeleton 轻微收敛，避免过于刺眼的闪烁 */
.skeleton-card,
.wl-skeleton {
  animation-duration: 1.4s;
}

/* ---------- 管理后台（admin.html 共用样式） ---------- */

.card {
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: rgba(240, 185, 11, 0.25);
}
.card h3,
.card h4 {
  letter-spacing: -0.005em;
}
.row .mono,
.tag,
.ghost,
.tiny {
  border-radius: 8px;
}
.msg {
  border-radius: 10px;
}
.ghost {
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 185, 11, 0.45);
}

/* ============================================================
   移动端小屏收尾：滚动条更细、卡片悬停位移缩小防误触
   ============================================================ */
@media (hover: none) {
  .ld-feature-card:hover,
  .ld-plan:hover,
  .signal-card:hover,
  .feature-item:hover,
  .plaza-tab:hover,
  .events-filter:hover {
    transform: none;
  }
}
