/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0B0E11;
  --bg-exchange: #161A1E;
  --bg-stock: #0C111E;
  --gold: #F0B90B;
  --gold-light: #FFD54F;
  --green: #00C087;
  --red: #FF4D4F;
  --text-primary: #EAECEF;
  --text-secondary: #848E9C;
  --text-muted: #5E6673;
  --border: #2B3139;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "Roboto Mono", "SF Mono", "Cascadia Code", monospace;
  --radius: 8px;
  --radius-lg: 12px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ===== Utility ===== */
.mono { font-family: var(--font-mono); font-weight: 700; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-secondary); }

/* ===== K-Line Background ===== */
.kline-bg {
  position: absolute; inset: 0;
  overflow: hidden; z-index: 0;
  opacity: 0.12;
}
.kline-bg canvas { width: 100%; height: 100%; }

/* ===== Section Base ===== */
.section {
  position: relative;
  padding: 48px 16px;
  max-width: 480px;
  margin: 0 auto;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 60px 16px 32px;
  overflow: hidden;
}
.hero-banner {
  position: relative; z-index: 1;
  background: rgba(22, 26, 30, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(240, 185, 11, 0.2);
  border-radius: var(--radius);
  padding: 8px 20px;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 1px;
}
.hero-title {
  position: relative; z-index: 1;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #F0B90B 0%, #FFD54F 50%, #F0B90B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-promise {
  position: relative; z-index: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 28px;
  line-height: 1.6;
  max-width: 360px;
}
.hero-promise strong {
  color: var(--gold);
  font-weight: 700;
}

/* ===== Ticker Marquee ===== */
.ticker-wrap {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--bg-exchange);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 32px;
}
.ticker-header {
  padding: 10px 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ticker-header::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}
.ticker-body {
  height: 144px;
  overflow: hidden;
  position: relative;
}
.ticker-list {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.ticker-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(43, 49, 57, 0.5);
  font-size: 0.8rem;
  line-height: 1.5;
}
.ticker-item .pair {
  color: var(--gold);
  font-weight: 700;
  font-family: var(--font-mono);
}
.ticker-item .time {
  color: var(--text-muted);
  font-size: 0.72rem;
}
.ticker-item .profit {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--green);
}

/* ===== CTA Button ===== */
.cta-btn {
  position: relative; z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #F0B90B, #D4A30A);
  color: #0B0E11;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: var(--radius);
  letter-spacing: 0.5px;
  box-shadow: 0 0 20px rgba(240, 185, 11, 0.3), 0 0 60px rgba(240, 185, 11, 0.1);
  animation: breathe 2s ease-in-out infinite;
  transition: transform 0.15s;
}
.cta-btn:active { transform: scale(0.97); }
.cta-btn .dot {
  width: 10px; height: 10px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  background: var(--bg-exchange);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 20px;
}
.tab-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.25s;
  text-align: center;
}
.tab-btn.active {
  background: var(--gold);
  color: #0B0E11;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Fund Curve ===== */
.fund-curve-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.fund-curve-chart {
  width: 100%;
  height: 200px;
  background: var(--bg-exchange);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.fund-curve-chart canvas { width: 100%; height: 100%; }
.fund-roi {
  text-align: center;
}
.fund-roi-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green);
}
.fund-roi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.fund-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ===== Carousel ===== */
.carousel-container {
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-lg);
}
.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  touch-action: pan-y;
}
.carousel-card {
  min-width: 100%;
  flex-shrink: 0;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
}
.carousel-dot.active {
  background: var(--gold);
  width: 18px;
  border-radius: 3px;
}

/* ===== Position Card ===== */
.position-card {
  background: var(--bg-exchange);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 0 0 8px;
}
.position-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.position-card .tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.tag-green { background: rgba(0, 192, 135, 0.15); color: var(--green); }
.tag-gold { background: rgba(240, 185, 11, 0.15); color: var(--gold); }
.tag-verify {
  font-size: 0.68rem;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
}
.position-card .pair-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.position-card .pair-name .direction {
  font-weight: 800;
  font-size: 1rem;
}
.position-card .pnl-big {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 8px 0;
  text-shadow: 0 0 20px rgba(0, 192, 135, 0.3);
}
.position-card .roi-big {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.position-card .params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.position-card .param {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.position-card .param span {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Stock Position Card */
.position-card.stock {
  background: var(--bg-stock);
}
.position-card.stock .trade-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.position-card.stock .stock-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.position-card.stock .stock-type {
  font-size: 0.78rem;
  margin-bottom: 8px;
}

/* Total Assets Card */
.position-card.total-assets {
  text-align: center;
  padding: 24px 16px;
}
.position-card.total-assets .total-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.position-card.total-assets .total-btc {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(240, 185, 11, 0.2);
}
.position-card.total-assets .total-usd {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green);
  margin-top: 4px;
}
.position-card.total-assets .audit-bar {
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(0, 192, 135, 0.08);
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--green);
  overflow: hidden;
}
.audit-scroll {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-text 12s linear infinite;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Strategy Accordion ===== */
.strategy-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.strategy-item {
  background: var(--bg-exchange);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s;
}
.strategy-item.unlocked {
  border-color: rgba(240, 185, 11, 0.4);
}
.strategy-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  width: 100%;
  text-align: left;
  color: var(--text-muted);
  transition: color 0.3s;
}
.strategy-item.unlocked .strategy-header {
  color: var(--text-primary);
}
.strategy-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  position: relative;
}
.strategy-item.unlocked .strategy-icon {
  background: rgba(240, 185, 11, 0.12);
}
.strategy-icon .lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: opacity 0.3s;
}
.strategy-item.unlocked .strategy-icon .lock { opacity: 0; }
.strategy-name {
  font-size: 0.9rem;
  font-weight: 700;
  flex: 1;
}
.strategy-arrow {
  font-size: 0.85rem;
  transition: transform 0.3s;
  color: var(--text-muted);
}
.strategy-item.unlocked .strategy-arrow { transform: rotate(180deg); color: var(--gold); }
.strategy-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
}
.strategy-item.unlocked .strategy-body {
  max-height: 400px;
  padding: 0 16px 16px;
}
.strategy-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}
.strategy-chart {
  width: 100%;
  height: 120px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.strategy-chart canvas { width: 100%; height: 100%; }

/* ===== Unlock Section ===== */
/* (see join group + unlock steps styles above) */
.unlock-guarantee {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.5;
}

/* ===== Sticky Bar ===== */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: rgba(11, 14, 17, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(240, 185, 11, 0.15);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.sticky-bar.show { transform: translateY(0); }
.sticky-bar .slots-info {
  font-size: 0.8rem;
  color: var(--text-primary);
}
.sticky-bar .slots-count {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--gold);
  font-size: 1rem;
}
.sticky-bar .cta-mini {
  background: linear-gradient(135deg, #F0B90B, #D4A30A);
  color: #0B0E11;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: var(--radius);
  white-space: nowrap;
  cursor: default;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 192, 135, 0.95);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== Animations ===== */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(240, 185, 11, 0.3), 0 0 60px rgba(240, 185, 11, 0.1); }
  50% { box-shadow: 0 0 30px rgba(240, 185, 11, 0.5), 0 0 80px rgba(240, 185, 11, 0.2); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes scroll-text {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}
@keyframes glow-number {
  0%, 100% { text-shadow: 0 0 8px rgba(0, 192, 135, 0.3); }
  50% { text-shadow: 0 0 16px rgba(0, 192, 135, 0.6); }
}

/* ===== Carousel hint ===== */
.carousel-hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== Section divider ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 16px;
}

/* ===== Hot Trade Card ===== */
.hot-trade-card {
  background: var(--bg-exchange);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-width: 280px;
  flex-shrink: 0;
  margin: 0 6px;
}
.hot-trade-card .trade-type {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 600;
}
.hot-trade-card .trade-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.hot-trade-card .trade-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.hot-trade-card .trade-profit {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.3rem;
  margin-top: 8px;
}

/* Hot trades carousel - horizontal scroll */
.hot-trades-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
  padding: 4px 0;
  scrollbar-width: none;
}
.hot-trades-scroll::-webkit-scrollbar { display: none; }
.hot-trades-scroll .hot-trade-card {
  scroll-snap-align: start;
  min-width: calc(85vw - 32px);
  max-width: 320px;
}

/* ===== Body padding for sticky bar ===== */
body { padding-bottom: 0; }
body.sticky-visible { padding-bottom: 60px; }

/* ===== Case Gallery (vertical stack) ===== */
.section-subtitle {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -12px;
  margin-bottom: 16px;
}
.cases-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.case-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-exchange);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.case-card:active {
  transform: scale(0.98);
}
.case-card:hover {
  border-color: rgba(240, 185, 11, 0.3);
}
.case-card img {
  width: 100%;
  display: block;
}
.case-tag {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 24px 12px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
}

/* ===== Join Group Button ===== */
.unlock-intro {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}
/* ===== Tips Cards (合约战法干货) ===== */
.tip-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tip-card {
  background: var(--bg-exchange);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.2s;
}
.tip-card:hover {
  border-color: rgba(240, 185, 11, 0.25);
}
.tip-num {
  display: inline-block;
  background: linear-gradient(135deg, #F0B90B, #D4A30A);
  color: #0B0E11;
  font-size: 0.72rem;
  font-weight: 800;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 6px;
  margin-bottom: 8px;
}
.tip-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.tip-body {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.tip-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--gold);
  margin-top: 20px;
  font-weight: 600;
}
.tip-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.tip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.tip-icon.gold { background: rgba(240, 185, 11, 0.15); }
.tip-icon.green { background: rgba(0, 192, 135, 0.15); }
.tip-icon.red { background: rgba(255, 77, 79, 0.15); }
.tip-icon.blue { background: rgba(59, 130, 246, 0.15); }
.tip-icon.purple { background: rgba(168, 85, 247, 0.15); }
.tip-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.tip-card p {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}
.tip-card .highlight {
  color: var(--gold);
  font-weight: 600;
}
.tip-card .green-text {
  color: var(--profit);
  font-weight: 600;
}
.tip-card .red-text {
  color: var(--loss);
  font-weight: 600;
}

.join-group-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #F0B90B, #D4A30A);
  color: #0B0E11;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: var(--radius-lg);
  text-align: center;
  letter-spacing: 0.5px;
  box-shadow: 0 0 24px rgba(240, 185, 11, 0.3), 0 0 60px rgba(240, 185, 11, 0.1);
  animation: breathe 2s ease-in-out infinite;
  cursor: default;
  box-sizing: border-box;
  margin-bottom: 24px;
}

/* ===== Unlock Steps (new style) ===== */
.unlock-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.unlock-step {
  flex: 1;
  background: rgba(0, 192, 135, 0.08);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  color: var(--green);
  transition: all 0.3s;
}
.unlock-step .step-icon {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.unlock-step .step-label {
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 600;
}
.unlock-step.done {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 192, 135, 0.08);
}
