/* ═══════════════════════════════════════════════════════════════════════════
   BetaCang｜美股成长组合 — Design System v2.1
   Premium dark-mode glassmorphism theme
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #080d1a;
  --bg-secondary: #0d1527;
  --bg-card: rgba(17, 24, 39, 0.65);
  --bg-card-hover: rgba(22, 33, 55, 0.85);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(59, 130, 246, 0.15);
  
  --brand-blue: #3b82f6;
  --brand-purple: #8b5cf6;
  --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --brand-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
  
  --accent-green: #10b981;
  --accent-green-dim: rgba(16, 185, 129, 0.1);
  --accent-red: #ef4444;
  --accent-red-dim: rgba(239, 68, 68, 0.1);
  --accent-blue: #60a5fa;
  --accent-purple-dim: rgba(139, 92, 246, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', "Courier New", monospace;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Resets ──────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Grid texture layer — separate pseudo-element so mask-image never clips page content */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    /* FinTech grid texture: horizontal lines — cold blue tint */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(59, 130, 246, 0.04) 59px,
      rgba(59, 130, 246, 0.04) 60px
    ),
    /* FinTech grid texture: vertical lines — cold blue tint */
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(59, 130, 246, 0.04) 59px,
      rgba(59, 130, 246, 0.04) 60px
    ),
    /* Ambient radial corner glows */
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 45%);
  /* Edge-fade: grid lines vanish toward screen borders — safe because this is a pseudo-element only */
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, black 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, black 35%, transparent 100%);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(59, 130, 246, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
  animation: ambientDrift 40s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  0%   { transform: translate(0px, 0px) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.03); }
  66%  { transform: translate(-20px, 15px) scale(0.97); }
  100% { transform: translate(15px, 25px) scale(1.02); }
}


.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Top Ticker Bar ─────────────────────────────────────────────────────── */
.ticker-bar {
  background: linear-gradient(90deg, #090e1b 0%, #15223e 50%, #090e1b 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.ticker-wrapper {
  display: flex;
  width: 100%;
}

.ticker-content {
  display: inline-flex;
  white-space: nowrap;
  gap: 32px;
  padding-left: 100%;
  animation: marquee 28s linear infinite;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.ticker-bar:hover .ticker-content {
  animation-play-state: paused;
}

.ticker-content span {
  display: flex;
  align-items: center;
}

.green-text {
  color: var(--accent-green);
  font-weight: 700;
  margin-left: 6px;
}

.blue-text {
  color: var(--accent-blue);
  font-weight: 700;
  margin-left: 6px;
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* ── Hero Section ───────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 60px 0 45px;
  position: relative;
}

.hero-brand {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 10px rgba(59, 130, 246, 0.15));
}

.hero-tagline {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-subline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-updated {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
}

/* ── KPI Grid ───────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  margin-top: 40px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  position: relative;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.kpi-card.kpi-row2 {
  padding: 18px 16px;
}

.kpi-card.kpi-row2 .kpi-value {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.25);
  box-shadow:
    var(--shadow-md),
    0 0 20px rgba(59, 130, 246, 0.08),
    0 0 40px rgba(139, 92, 246, 0.04);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.kpi-value.positive {
  color: var(--accent-green);
  text-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}
.kpi-value.negative {
  color: var(--accent-red);
  text-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}
.kpi-value.neutral {
  color: var(--accent-blue);
  text-shadow: 0 0 16px rgba(96, 165, 250, 0.35);
}

.kpi-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lbl-detail {
  display: inline-block;
  font-size: 0.7rem;
  color: #94a3b8;            /* Brightened from var(--text-muted) #64748b */
  font-weight: 500;          /* Increased weight */
  margin-top: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.kpi-explain {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
  line-height: 1.4;
  font-weight: 400;
  max-width: 220px;
}

/* Live Card with Badge */
.live-card {
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.05) 0%, rgba(17, 24, 39, 0.65) 100%);
}

.live-card:hover {
  border-color: rgba(139, 92, 246, 0.6);
}

.kpi-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: translateX(-50%) scale(1); box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
  50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 2px 14px rgba(239, 68, 68, 0.6); }
  100% { transform: translateX(-50%) scale(1); box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
}

/* ── Section Styles ─────────────────────────────────────────────────────── */
.section {
  margin-top: 65px;
  position: relative;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .icon {
  font-size: 1.35rem;
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ── Glass Cards ───────────────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(96, 165, 250, 0.15);
  box-shadow:
    var(--shadow-md),
    0 0 30px rgba(59, 130, 246, 0.06);
}

/* ── Compare Table Section ──────────────────────────────────────────────── */
.performance-card {
  padding: 32px 28px 24px;
}

.compare-table-wrapper {
  margin-bottom: 30px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.compare-table th {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}

.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
  font-family: var(--font-body);
}

.compare-table td:nth-child(2), .compare-table td:nth-child(3), .compare-table td:nth-child(4) {
  font-family: var(--font-mono);
}

.compare-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.bold-text {
  font-weight: 700;
}

.compare-table td.positive {
  color: var(--accent-green);
}

.compare-table td.negative {
  color: var(--accent-red);
}

.highlight-row {
  background: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
}

.highlight-row td {
  border-bottom: none !important;
  font-weight: 600;
}

.compare-table tr.highlight-row:hover {
  background: rgba(59, 130, 246, 0.08) !important;
}

/* ── Chart Layout ───────────────────────────────────────────────────────── */
.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
}

.chart-title-left {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chart-legend {
  display: flex;
  gap: 16px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.chart-legend-dot {
  width: 10px;
  height: 3px;
  border-radius: 2px;
}

.chart-legend-dot.betacang { background: var(--accent-blue); }
.chart-legend-dot.sp500 { background: #6b7280; }

.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
}

.chart-note {
  margin-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Portfolio Holdings ─────────────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  width: 100%;
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.portfolio-table th {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.portfolio-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-secondary);
  vertical-align: middle;
}

.portfolio-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.portfolio-table tbody tr:last-child td {
  border-bottom: none;
}

.badge-count {
  display: inline-block;
  background: var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 1px 8px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.weight-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weight-val {
  font-family: var(--font-mono);
  font-weight: 600;
  min-width: 50px;
}

.weight-track {
  flex-grow: 1;
  max-width: 140px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.weight-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 3px;
}

.stock-ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.stock-name {
  font-weight: 500;
  color: var(--text-primary);
}

.pnl-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: right;
}

.pnl-cell.positive { color: var(--accent-green); }
.pnl-cell.negative { color: var(--accent-red); }

/* ── Timeline (Recent Adjustments) ──────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-date-header {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(96, 165, 250, 0.08);
  padding: 4px 12px;
  border-radius: 99px;
  align-self: flex-start;
  border: 1px solid rgba(96, 165, 250, 0.15);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--border-color);
  margin-left: 16px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.action-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
  min-width: 68px;
}

.action-badge.buy {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.action-badge.sell {
  background: var(--accent-red-dim);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.action-badge.hold {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.timeline-ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-reason {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.timeline-footer {
  margin-top: 25px;
  text-align: center;
}

/* ── Calculator Widget ──────────────────────────────────────────────────── */
.calculator-card {
  padding: 0;
}

.calc-header-box {
  padding: 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  background: rgba(255, 255, 255, 0.01);
}

.input-wrapper {
  flex: 0 0 350px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: block;
}

.input-box-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 6px 16px;
  transition: var(--transition-smooth);
}

.input-box-group:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.currency-prefix {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--brand-blue);
  font-weight: 700;
  margin-right: 8px;
}

.input-box-group input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  width: 100%;
  outline: none;
}

.calc-guide-info {
  flex-grow: 1;
  background: rgba(139, 92, 246, 0.05);
  border-left: 3px solid var(--brand-purple);
  border-radius: 8px;
  padding: 16px 20px;
}

.calc-guide-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.calc-guide-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.calc-guide-text strong {
  color: var(--accent-green);
  font-family: var(--font-mono);
}

.calc-results-wrapper {
  padding: 32px;
}

.calc-table-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
}

.calc-table th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}

.calc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.calc-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.calc-table tbody tr:last-child td {
  border-bottom: none;
}

.calc-table-footer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 15px;
}

/* ── Beginner Guide Section ────────────────────────────────────────────── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.guide-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  position: relative;
  transition: var(--transition-smooth);
}

.guide-step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow:
    var(--shadow-md),
    0 0 20px rgba(59, 130, 246, 0.07);
}

.step-num {
  position: absolute;
  top: -20px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 8px;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-sub-note {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}

/* ── FAQ Section (Accordion) ────────────────────────────────────────────── */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item:hover {
  border-color: rgba(96, 165, 250, 0.18);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.05);
}

.faq-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  gap: 12px;
}

.faq-icon-arrow {
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  background: rgba(0, 0, 0, 0.15);
}

.faq-content {
  padding: 20px 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 1px solid var(--border-color);
}

/* Open Accordion State */
.faq-item.active {
  border-color: rgba(96, 165, 250, 0.2);
}

.faq-item.active .faq-header {
  color: var(--accent-blue);
}

.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--accent-blue);
}

/* ── AI Commentary ──────────────────────────────────────────────────────── */
.ai-commentary-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-purple);
  border-radius: 8px;
  padding: 24px 28px;
  margin-top: 15px;
  box-shadow: var(--shadow-sm);
}

.ai-commentary-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
}

.ai-commentary-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: right;
}

/* ── Disclaimer & Contact Section ───────────────────────────────────────── */
.disclaimer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 30px;
}

.disclaimer-box {
  background: rgba(239, 68, 68, 0.03);
  border: 1.5px solid rgba(239, 68, 68, 0.15);
  border-radius: 16px;
  padding: 28px;
}

.disclaimer-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.disclaimer-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.contact-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.telegram-btn-group {
  position: relative;
}

.badge-soon {
  position: absolute;
  top: -12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* ── UI Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.disabled-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.tg-icon {
  margin-right: 6px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  text-align: center;
}

.footer-brand {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Scroll Animation Helpers ───────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile Responsiveness ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .container {
    padding: 24px 16px 60px;
  }
  
  .hero {
    padding: 40px 0 25px;
  }
  
  .hero-brand {
    font-size: 2.2rem;
  }
  
  .hero-tagline {
    font-size: 1.15rem;
  }
  
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 30px;
  }

  
  .kpi-value {
    font-size: 1.8rem;
  }
  
  .glass-card {
    padding: 20px 16px;
  }
  
  .calc-header-box {
    flex-direction: column;
    padding: 20px 16px;
    gap: 20px;
  }
  
  .input-wrapper {
    flex: none;
    width: 100%;
  }
  
  .calc-results-wrapper {
    padding: 20px 16px;
  }
  
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .guide-step-card {
    padding: 28px 16px 20px;
  }
  
  .disclaimer-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .chart-container {
    height: 250px;
    touch-action: none; /* Prevents default scroll when dragging chart crosshair */
  }

  /* Compact responsive tables for mobile: hide Company Name and Sector to avoid squeezing */
  .portfolio-table th:nth-child(3),
  .portfolio-table td:nth-child(3),
  .portfolio-table th:nth-child(4),
  .portfolio-table td:nth-child(4) {
    display: none;
  }

  .calc-table th:nth-child(3),
  .calc-table td:nth-child(3) {
    display: none;
  }
}

/* ── 480px Extreme Mobile Responsiveness ─────────────────── */
@media (max-width: 480px) {
  .chart-hud {
    flex-wrap: wrap;
    font-size: 0.68rem;
    gap: 6px;
    justify-content: flex-start;
    padding: 6px 12px;
  }
}

/* ── Chart Interactive HUD ────────────────────────────────── */
.chart-hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: all 0.15s ease;
  min-height: 36px;
}

.chart-hud.active {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.12);
  color: var(--text-secondary);
}

.hud-divider {
  color: rgba(255, 255, 255, 0.08);
}

.hud-val {
  font-weight: 600;
}

.hud-val.positive {
  color: var(--accent-green);
}

.hud-val.negative {
  color: var(--accent-red);
}

/* ── Trust Badge ────────────────────────────────────────── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 12px;
  padding: 4px 14px;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.08);
  border-radius: 99px;
  letter-spacing: 0.01em;
}

/* ── Beta Callout ───────────────────────────────────────── */
.beta-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 20px;
  padding: 14px 18px;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
}

.beta-callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Trade Logs Premium Elements ────────────────────────── */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: #94a3b8;
  font-size: 0.65rem;
  padding: 2px 6px;
  margin-left: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.copy-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: #fff;
}

.calc-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 4px;
  color: var(--accent-blue);
  font-size: 0.65rem;
  padding: 2px 6px;
  margin-left: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.calc-link-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.timeline-sell-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--accent-red);
  opacity: 0.85;
  margin-top: 4px;
  padding-left: 78px;
  text-align: left;
}

.timeline-weight-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.timeline-weight-tag.active {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.timeline-weight-tag.cleared {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.calc-row-highlight {
  background: rgba(59, 130, 246, 0.15) !important;
  box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1);
  transition: background 0.3s ease;
}


