/* PolyPulse — Polymarket Data Engine CSS */
:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #0f1523;
  --bg-card: rgba(18, 25, 41, 0.75);
  --bg-card-hover: rgba(26, 37, 61, 0.9);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --cyan-primary: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.25);
  --emerald-primary: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --purple-accent: #8b5cf6;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(0, 242, 254, 0.35);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 242, 254, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
header.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--purple-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #000;
  font-size: 0.9rem;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-name span {
  color: var(--cyan-primary);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--cyan-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-primary), #0ea5e9);
  color: #000;
  box-shadow: 0 4px 14px var(--cyan-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--cyan-primary);
}

.btn-outline:hover {
  background: rgba(0, 242, 254, 0.08);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald-primary), #059669);
  color: #fff;
  box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-emerald:hover {
  filter: brightness(1.1);
}

.btn-poly {
  background: #1e293b;
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
}

.btn-poly:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #fff;
}

/* Hero Section */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--cyan-primary);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 span.gradient {
  background: linear-gradient(135deg, #fff 30%, var(--cyan-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.referral-banner {
  background: rgba(139, 92, 246, 0.08);
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.referral-text {
  font-size: 0.9rem;
  color: #e2e8f0;
  text-align: left;
}

.referral-text strong {
  color: #c084fc;
}

/* Metric Strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 3.5rem 0;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.metric-val {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--cyan-primary);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Technical Rationale Section */
.section {
  padding: 4.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-title p {
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
}

.comp-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid var(--border-subtle);
}

.comp-card.flawed {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.02);
}

.comp-card.optimal {
  border-color: rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.03);
}

.comp-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.comp-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.badge-cyan {
  background: rgba(0, 242, 254, 0.15);
  color: var(--cyan-primary);
}

.comp-list {
  list-style: none;
}

.comp-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.comp-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-weight: 800;
  font-size: 1.2rem;
}

.comp-card.flawed .comp-list li::before {
  color: #ef4444;
}

.comp-card.optimal .comp-list li::before {
  color: var(--cyan-primary);
}

/* Interactive Data Inspector Terminal */
.terminal-window {
  background: #06090e;
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  margin: 2rem 0;
}

.terminal-bar {
  background: #0d121c;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  max-height: 380px;
  overflow-y: auto;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

table.data-table th, table.data-table td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table.data-table th {
  color: var(--cyan-primary);
  background: rgba(0, 242, 254, 0.05);
}

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

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
}

.pricing-card.featured {
  border-color: var(--cyan-primary);
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.05) 0%, var(--bg-card) 100%);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.1);
}

.featured-pill {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cyan-primary);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 40px;
}

.card-price {
  margin-bottom: 1.5rem;
}

.price-num {
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.price-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.card-features li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.card-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald-primary);
  font-weight: 700;
}

.btn-block {
  width: 100%;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #0f1523;
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.tab-nav {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(0, 242, 254, 0.1);
  color: var(--cyan-primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.qr-box {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-address-box {
  background: #070a10;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan-primary);
  word-break: break-all;
  margin-bottom: 1rem;
  position: relative;
}

.copy-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin-top: 0.5rem;
  cursor: pointer;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  margin-top: 5rem;
  background: #070a10;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

.footer-meta a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--cyan-primary);
}
