:root {
  --bg: #070b16;
  --bg-soft: #0f1730;
  --card: rgba(18, 26, 48, 0.85);
  --card-2: #151f3a;
  --muted: #9cb1d9;
  --text: #eaf1ff;
  --accent: #5fd3ff;
  --accent-2: #7f84ff;
  --success: #3ddc97;
  --warn: #ffd166;
  --border: #2a385f;
  --shadow: 0 14px 40px rgba(3, 8, 22, 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(95, 211, 255, 0.12), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(127, 132, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #070b16, #0d1326 50%, #0a1225 100%);
  min-height: 100vh;
}

a { color: #99c7ff; text-decoration: none; }
a:hover { color: #bedcff; }

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.bg-orb {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.25;
}
.bg-orb-1 { background: #5fd3ff; top: -140px; left: -130px; }
.bg-orb-2 { background: #6d74ff; top: 12%; right: -140px; }

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid rgba(86, 104, 145, 0.25);
  z-index: 30;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.top-nav {
  display: flex;
  gap: 1.05rem;
}

.top-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  padding: 4.2rem 0 2rem;
}

.eyebrow {
  color: #9ad7ff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0;
}

h1 {
  margin: 0.7rem 0 0;
  line-height: 1.08;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-family: 'Bricolage Grotesque', sans-serif;
}

.subtitle {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 760px;
  font-size: clamp(1rem, 1.9vw, 1.1rem);
}

.hero-actions {
  margin-top: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.btn-primary {
  color: #081125;
  background: linear-gradient(135deg, #77dcff, #a1a8ff);
  box-shadow: 0 8px 24px rgba(118, 180, 255, 0.35);
}

.updated-pill {
  display: inline-block;
  background: rgba(20, 30, 54, 0.9);
  border: 1px solid rgba(129, 153, 204, 0.35);
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: #c9d8f5;
}

.freshness-badge {
  display: inline-block;
  border: 1px solid rgba(129, 153, 204, 0.35);
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  font-size: 0.84rem;
}
.freshness-badge.fresh { background: rgba(61, 220, 151, 0.18); color: #b8f2d8; border-color: rgba(61,220,151,0.6); }
.freshness-badge.aging { background: rgba(255, 209, 102, 0.16); color: #ffe6ac; border-color: rgba(255,209,102,0.55); }
.freshness-badge.stale { background: rgba(255, 111, 145, 0.14); color: #ffd2de; border-color: rgba(255,111,145,0.5); }

.comparison {
  padding-bottom: 1.3rem;
}

.controls {
  position: sticky;
  top: 70px;
  background: rgba(16, 24, 45, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
  z-index: 10;
}

.control-actions {
  display: flex;
  align-items: end;
}

.btn-ghost {
  background: rgba(95, 211, 255, 0.1);
  color: #d5e5ff;
  border: 1px solid rgba(95, 211, 255, 0.38);
  cursor: pointer;
}

.btn-ghost:hover { background: rgba(95, 211, 255, 0.2); }

.preset-strip {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.preset-btn {
  border-radius: 999px;
  border: 1px solid #405a91;
  background: #0f1934;
  color: #dce8ff;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.preset-btn.active {
  border-color: rgba(61, 220, 151, 0.75);
  background: rgba(61, 220, 151, 0.16);
  color: #c8f4de;
}

.controls label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--muted);
}

input, select {
  width: 100%;
  padding: 0.62rem;
  border-radius: 10px;
  border: 1px solid #334774;
  background: #0f1934;
  color: var(--text);
  outline: none;
}

input:focus, select:focus {
  border-color: #6cb6ff;
  box-shadow: 0 0 0 3px rgba(108, 182, 255, 0.18);
}

.best-deal {
  margin-top: 1rem;
  background: linear-gradient(120deg, rgba(61, 220, 151, 0.16), rgba(95, 211, 255, 0.12));
  border: 1px solid rgba(61, 220, 151, 0.7);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.results-meta {
  margin: 0.9rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.trust-layer {
  margin: 0 0 1rem;
  background: rgba(13, 22, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  color: #c5d7fb;
}

.trust-layer p { margin: 0.22rem 0; font-size: 0.9rem; }

.provider-insights {
  margin: 0 0 1rem;
  background: rgba(13, 22, 42, 0.86);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
}

.provider-insights h2 { margin: 0 0 0.55rem; font-size: 1.1rem; font-family: 'Bricolage Grotesque', sans-serif; }

.best-three {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.7rem;
}

.best-option-card {
  border: 1px solid #37508a;
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(17, 27, 49, 0.9);
}

.best-option-card h3 { margin: 0.15rem 0; font-size: 0.98rem; }
.best-option-card p { margin: 0.18rem 0; color: #cddcf8; }
.best-rank { color: #8dd9ff !important; font-weight: 700; }

.compare-controls {
  margin: 0 0 1rem;
  background: rgba(13, 22, 42, 0.86);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
}

.compare-controls h2 { margin: 0 0 0.3rem; font-size: 1.1rem; font-family: 'Bricolage Grotesque', sans-serif; }

.compare-provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.compare-chip {
  border: 1px solid #3e578f;
  border-radius: 999px;
  background: #0f1934;
  color: #d8e5ff;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
}

.compare-chip.active {
  border-color: rgba(127, 132, 255, 0.7);
  background: rgba(127, 132, 255, 0.25);
}

.compare-summary { overflow: auto; }

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

.compare-table th,
.compare-table td {
  border-bottom: 1px solid #2a385f;
  padding: 0.55rem;
  text-align: left;
  font-size: 0.88rem;
}

.table-wrap {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

th, td {
  padding: 0.78rem;
  border-bottom: 1px solid #2a385f;
  text-align: left;
  font-size: 0.91rem;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: #1a284a;
  color: #d4e4ff;
  font-weight: 600;
}

tbody tr:hover {
  background: rgba(130, 151, 212, 0.08);
}

.price { font-weight: 700; color: var(--warn); }

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  font-size: 0.76rem;
  line-height: 1;
}

.provider-chip {
  background: rgba(127, 132, 255, 0.15);
  border-color: rgba(154, 157, 255, 0.5);
  color: #d4d6ff;
}

.provider-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.provider-link:hover { color: #f0f4ff; }

.pin-provider-btn {
  margin-left: 0.35rem;
  border: 1px solid rgba(127, 132, 255, 0.45);
  background: rgba(127, 132, 255, 0.14);
  color: #d9dcff;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.pin-provider-btn.active {
  border-color: rgba(61, 220, 151, 0.8);
  background: rgba(61, 220, 151, 0.2);
  color: #bff3d8;
}

.type-chip {
  color: #d1eaff;
  background: rgba(103, 179, 255, 0.16);
}

.confidence-chip { font-size: 0.7rem; }
.confidence-api { background: rgba(61, 220, 151, 0.15); border-color: rgba(61, 220, 151, 0.58); color: #b9f1d8; }
.confidence-html { background: rgba(95, 211, 255, 0.15); border-color: rgba(95, 211, 255, 0.58); color: #c7efff; }
.confidence-fallback { background: rgba(255, 209, 102, 0.15); border-color: rgba(255, 209, 102, 0.58); color: #ffe7af; }
.quality-chip { background: rgba(219, 226, 255, 0.12); border-color: rgba(219, 226, 255, 0.32); color: #dbe4ff; }
.quality-warning { background: rgba(255, 209, 102, 0.14); border-color: rgba(255, 209, 102, 0.52); color: #ffe6ac; }
.quality-hidden { background: rgba(255, 111, 145, 0.14); border-color: rgba(255,111,145,0.5); color: #ffd2de; }
.hotness-chip { background: rgba(255, 144, 64, 0.14); border-color: rgba(255, 144, 64, 0.55); color: #ffd5b0; }
.compare-chip.is-disabled { opacity: 0.45; cursor: not-allowed; }

.type-chip.spot {
  background: rgba(61, 220, 151, 0.14);
  border-color: rgba(61, 220, 151, 0.5);
  color: #b8f2d8;
}

.type-chip.on-demand {
  background: rgba(255, 209, 102, 0.14);
  border-color: rgba(255, 209, 102, 0.52);
  color: #ffe6ac;
}

.cards { display: none; gap: 0.75rem; margin-top: 1rem; }

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(21, 31, 58, 0.96), rgba(16, 24, 44, 0.98));
  padding: 0.9rem;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
}

.card p { margin: 0.33rem 0 0; color: #cad8f8; }

.provider-detail-card {
  border: 1px solid #2d4374;
  border-radius: 12px;
  padding: 0.8rem;
  background: linear-gradient(170deg, rgba(26, 39, 69, 0.9), rgba(15, 25, 46, 0.95));
}
.provider-detail-card header {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.provider-detail-card h3 { margin: 0; font-size: 1.06rem; }
.provider-detail-card h4 { margin: 0.45rem 0 0.2rem; font-size: 0.9rem; }
.provider-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 0.7rem; }
.provider-detail-card ul { margin: 0; padding-left: 1.05rem; color: #c7d8ff; }
.reliability-chip { background: rgba(95,211,255,0.14); border-color: rgba(95,211,255,0.45); }

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

#pageInfo { color: #c8d9fd; font-size: 0.9rem; }

.monetag-section {
  margin-top: 1.2rem;
  margin-bottom: 1.8rem;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.monetag-section h2 {
  margin: 0 0 0.4rem;
}

.model-vram-section .table-wrap {
  max-height: none;
  margin-top: 0.7rem;
}

.model-vram-section td,
.model-vram-section th {
  font-size: 0.88rem;
}

.muted { color: var(--muted); margin-top: 0; }

.ad-placeholder {
  margin-top: 0.8rem;
  border: 2px dashed #45609a;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  min-height: 90px;
  display: grid;
  place-items: center;
}

.site-footer {
  border-top: 1px solid rgba(70, 92, 139, 0.35);
  background: rgba(7, 11, 22, 0.7);
}

.footer-inner {
  padding: 1.2rem 0 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-inner p,
.footer-inner small {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 920px) {
  .controls {
    position: static;
  }
}

@media (max-width: 760px) {
  .top-nav { display: none; }
  .hero { padding-top: 2.2rem; }
  .table-wrap { display: none; }
  .cards { display: grid; }
}
