:root {
  --bg: #0d0f14;
  --surface: #161921;
  --card: #1d2130;
  --border: #2a3045;
  --orange: #fc8019;
  --orange-dim: rgba(252, 128, 25, 0.12);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.1);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.1);
  --text-primary: #f0f2f7;
  --text-secondary: #8b93a8;
  --text-muted: #505870;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ─── HEADER ─────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot { color: var(--orange); }

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

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-links a.active {
  color: var(--orange);
  background: var(--orange-dim);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 16px;
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-links a { width: 100%; padding: 10px 14px; }
}

/* ─── HERO ─────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 24px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(252,128,25,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 20px;
}

.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--orange);
  opacity: 0.5;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

h1 span { color: var(--orange); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 12px;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

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

.trust-item svg { color: var(--green); }

/* ─── MAIN LAYOUT ──────────────────────────────────────────── */
.main-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .tool-grid { grid-template-columns: 1fr; }
}

/* ─── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.card-title-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--orange-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ─── INPUTS ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.label-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.input-wrap {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: var(--text-muted);
}

input[type="number"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 44px 11px 34px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input[type="number"]:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(252,128,25,0.15);
}

.platform-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.platform-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-btn.active {
  border-color: var(--orange);
  background: var(--orange-dim);
  color: var(--orange);
}

.platform-btn:hover:not(.active) {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.calc-btn {
  width: 100%;
  padding: 14px;
  background: var(--orange);
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.calc-btn:hover { opacity: 0.9; }
.calc-btn:active { transform: scale(0.99); }

/* ─── RESULTS ─────────────────────────────────────────────────── */
.result-hidden { display: none; }

.result-headline {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.big-profit {
  text-align: center;
  padding: 22px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid;
  transition: all 0.4s;
}

.big-profit.good { background: var(--green-dim); border-color: var(--green); }
.big-profit.bad  { background: var(--red-dim);   border-color: var(--red); }

.big-profit-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.big-profit-value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
}

.big-profit.good .big-profit-value { color: var(--green); }
.big-profit.bad  .big-profit-value { color: var(--red); }

.big-profit-margin {
  font-size: 0.85rem;
  margin-top: 4px;
}
.big-profit.good .big-profit-margin { color: var(--green); }
.big-profit.bad  .big-profit-margin { color: var(--red); }

.breakdown-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-value { font-weight: 600; }
.val-neg { color: var(--red); }
.val-pos { color: var(--green); }
.val-neu { color: var(--text-primary); }

.divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 14px 0;
}

.advice-box {
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.85rem;
  margin-top: 16px;
  border: 1px solid;
  line-height: 1.55;
}

.advice-box.warn { background: rgba(239,68,68,0.08); border-color: var(--red); color: #fca5a5; }
.advice-box.ok   { background: var(--green-dim); border-color: var(--green); color: #86efac; }

/* ─── CHART ─────────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 230px;
  margin: 4px 0 20px;
}

/* ─── INFO STRIP ─────────────────────────────────────────────── */
.info-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 32px 0;
}

@media (max-width: 600px) { .info-strip { grid-template-columns: 1fr; } }

.info-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.info-tile-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--orange);
}

.info-tile-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─── CONTENT / SEO ─────────────────────────────────────────── */
.content-section {
  max-width: 760px;
  margin: 48px auto;
  padding: 0 4px;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.content-section h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text-primary);
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.content-section ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

/* ─── FAQ ─────────────────────────────────────────────────────── */
.faq-section {
  max-width: 760px;
  margin: 0 auto 60px;
}

.faq-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

summary {
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--orange);
  transition: transform 0.2s;
}

details[open] summary::after { content: '−'; }

.faq-body {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ─── AD PLACEHOLDERS ───────────────────────────────────────── */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ad-slot-leaderboard { height: 90px; margin: 28px auto; max-width: 728px; }
.ad-slot-rect        { height: 250px; margin: 20px 0; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

footer a { color: var(--text-muted); text-decoration: underline; }
footer a:hover { color: var(--text-secondary); }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fadeUp { animation: fadeUp 0.4s ease forwards; }
