/* ─── Proof of Honesty — Transparency Dashboard ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #08080e;
  --bg2: #0e0e16;
  --bg3: #161622;
  --bg4: #1e1e2e;
  --text: #eeeef2;
  --text2: #a0a0b8;
  --text3: #606078;
  --accent: #e8584a;
  --accent-hover: #ff7b6b;
  --teal: #0ec9ac;
  --gold: #ffb84d;
  --purple: #a855f7;
  --blue: #3b82f6;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: 'JetBrains Mono', monospace; }
a { color: inherit; text-decoration: none; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,14,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.nav-badge {
  background: rgba(14,201,172,0.1); color: var(--teal); border: 1px solid rgba(14,201,172,0.2);
  padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
}

/* ─── Hero ─── */
.hero {
  padding: 100px 0 48px; text-align: center;
  background: radial-gradient(ellipse at top, rgba(14,201,172,0.06) 0%, transparent 60%);
}
.hero-badge {
  display: inline-block; padding: 6px 18px; border-radius: 20px; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; color: var(--teal); background: rgba(14,201,172,0.08);
  border: 1px solid rgba(14,201,172,0.15); margin-bottom: 20px;
}
.hero h1 { font-size: 48px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 12px; }
.hero-sub { font-size: 16px; color: var(--text2); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 700px; margin: 0 auto 20px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 20px 16px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--teal); font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 11px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-update { font-size: 11px; color: var(--text3); margin-top: 12px; }

/* ─── Sections ─── */
.section { margin: 48px 0; padding: 32px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; }
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.section-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.reserves-icon { background: rgba(14,201,172,0.1); }
.fees-icon { background: rgba(255,184,77,0.1); }
.algo-icon { background: rgba(168,85,247,0.1); }
.markets-icon { background: rgba(59,130,246,0.1); }
.section h2 { font-size: 20px; font-weight: 700; }
.section-desc { font-size: 13px; color: var(--text3); margin-top: 2px; }

/* ─── Reserves ─── */
.reserves-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.reserve-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.reserve-card.healthy { border-color: rgba(14,201,172,0.25); }
.reserve-card.warning { border-color: rgba(255,184,77,0.25); }
.reserve-card.critical { border-color: rgba(239,68,68,0.25); }
.reserve-chain { font-size: 14px; font-weight: 700; margin-bottom: 12px; letter-spacing: 0.5px; }
.reserve-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.reserve-label { font-size: 12px; color: var(--text3); }
.reserve-value { font-size: 13px; font-weight: 600; }
.positive { color: var(--teal); }
.negative { color: #ef4444; }
.reserve-status { margin-top: 12px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.healthy { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.status-dot.warning { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.status-dot.critical { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.reserves-note {
  margin-top: 16px; padding: 14px; background: var(--bg3); border-radius: 10px;
  font-size: 12px; color: var(--text3); line-height: 1.6;
}

/* ─── Fees ─── */
.fee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.fee-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center;
}
.fee-big { font-size: 32px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.fee-big.accent { color: var(--accent); }
.fee-big.teal { color: var(--teal); }
.fee-label { font-size: 13px; color: var(--text2); margin-top: 4px; }
.fee-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }
.fee-comparison {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.fee-comparison h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.fee-bar-group { display: flex; flex-direction: column; gap: 10px; }
.fee-bar-row { display: flex; align-items: center; gap: 12px; }
.fee-bar-label { width: 90px; font-size: 12px; color: var(--text2); text-align: right; font-weight: 600; }
.fee-bar {
  height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; min-width: 40px;
}
.fee-bar-note { font-size: 11px; color: var(--text3); font-style: italic; }

/* ─── Algorithm ─── */
.algo-box { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.algo-name { font-size: 18px; font-weight: 700; color: var(--purple); margin-bottom: 8px; }
.algo-desc { font-size: 14px; color: var(--text2); margin-bottom: 20px; }
.algo-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.algo-step {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text2);
  padding: 8px 12px; background: var(--bg4); border-radius: 8px;
}
.step-num { color: var(--purple); font-weight: 700; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; }
.algo-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.algo-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.algo-detail { font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.algo-detail.muted { color: var(--text3); font-style: italic; margin-top: 8px; }
.algo-security-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2);
  padding: 6px 0;
}
.algo-source {
  display: inline-block; margin-top: 16px; padding: 10px 20px; background: rgba(168,85,247,0.1);
  color: var(--purple); border: 1px solid rgba(168,85,247,0.2); border-radius: 10px;
  font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.algo-source:hover { background: rgba(168,85,247,0.15); transform: translateY(-1px); }

/* ─── Markets List ─── */
.markets-list { display: flex; flex-direction: column; gap: 8px; }
.market-card {
  display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
  transition: all 0.2s;
}
.market-card:hover { border-color: var(--border2); background: var(--bg4); transform: translateX(4px); }
.market-outcome {
  width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; letter-spacing: 0.5px;
}
.market-outcome.yes { background: rgba(34,197,94,0.12); color: #22c55e; }
.market-outcome.no { background: rgba(239,68,68,0.12); color: #ef4444; }
.market-info { flex: 1; min-width: 0; }
.market-question { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-meta { display: flex; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.market-meta span { font-size: 11px; color: var(--text3); }
.market-arrow { font-size: 24px; color: var(--text3); flex-shrink: 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.pagination button {
  padding: 8px 16px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text2); font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.pagination button:hover { background: var(--bg4); color: var(--text); }
.page-info { font-size: 12px; color: var(--text3); }

/* ─── Modal ─── */
.modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.modal-content {
  position: relative; background: var(--bg2); border: 1px solid var(--border2); border-radius: 20px;
  padding: 32px; width: 680px; max-width: 95vw; max-height: 85vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--text3);
  font-size: 28px; cursor: pointer; padding: 4px; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; padding-right: 32px; }
.modal-outcome {
  display: inline-block; padding: 4px 14px; border-radius: 8px; font-size: 13px; font-weight: 700;
  margin-bottom: 12px;
}
.modal-outcome.yes { background: rgba(34,197,94,0.12); color: #22c55e; }
.modal-outcome.no { background: rgba(239,68,68,0.12); color: #ef4444; }
.modal-note { font-size: 13px; color: var(--text3); margin-bottom: 16px; font-style: italic; }
.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.modal-stat {
  background: var(--bg3); padding: 12px; border-radius: 10px; text-align: center;
}
.modal-stat span { font-size: 11px; color: var(--text3); display: block; }
.modal-stat strong { font-size: 16px; font-family: 'JetBrains Mono', monospace; }
.modal-formula {
  background: var(--bg3); padding: 12px 16px; border-radius: 10px; font-size: 13px;
  color: var(--text2); margin-bottom: 20px; font-family: 'JetBrains Mono', monospace;
}
.modal-section-title { font-size: 14px; font-weight: 700; margin: 16px 0 8px; }
.modal-trades { display: flex; flex-direction: column; gap: 4px; }
.modal-trade {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; font-size: 13px;
}
.modal-trade.won { background: rgba(34,197,94,0.06); }
.modal-trade.lost { background: rgba(239,68,68,0.04); color: var(--text3); }
.trade-idx { font-family: 'JetBrains Mono', monospace; color: var(--text3); font-size: 11px; width: 24px; }
.trade-payout { margin-left: auto; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.trade-profit { color: #22c55e; font-weight: 700; font-size: 12px; }
.modal-total {
  margin-top: 16px; padding: 12px; background: var(--bg3); border-radius: 10px; text-align: center;
  font-size: 14px; color: var(--text2);
}
.modal-total strong { color: var(--teal); font-family: 'JetBrains Mono', monospace; font-size: 18px; }
.modal-verify { margin-top: 12px; font-size: 11px; color: var(--text3); font-style: italic; text-align: center; }

/* ─── Comparison Table ─── */
.comparison-title { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.comparison-table { overflow-x: auto; }
.comparison-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.comparison-table th, .comparison-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.comparison-table th { color: var(--text3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.comparison-table th.highlight { color: var(--teal); }
.comparison-table td.highlight { background: rgba(14,201,172,0.04); }
.comparison-table td.good { color: var(--teal); font-weight: 600; }

/* ─── Footer ─── */
.footer {
  margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--border);
  text-align: center; font-size: 13px; color: var(--text3);
}
.footer-sub { font-size: 11px; margin-top: 6px; opacity: 0.6; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 16px; }
.footer-links a { color: var(--text3); font-size: 12px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ─── Loading / Error / Empty States ─── */
.loading-pulse { padding: 24px; text-align: center; color: var(--text3); font-size: 13px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.error-state { padding: 24px; text-align: center; color: #ef4444; font-size: 13px; }
.empty-state { padding: 16px; text-align: center; color: var(--text3); font-size: 13px; }

/* ─── Mobile ─── */
@media (max-width: 768px) {
  .hero { padding: 80px 0 32px; }
  .hero h1 { font-size: 32px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .fee-grid { grid-template-columns: 1fr; }
  .modal-stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 20px; margin: 24px 0; }
  .comparison-table { font-size: 12px; }
  .market-card { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 22px; }
  .modal-stats { grid-template-columns: 1fr 1fr; }
}
