/* Playmetric design system */
:root {
  --bg: #0c0e13;
  --bg-soft: #12151d;
  --card: #171b25;
  --card-edge: #232936;
  --text: #eef1f7;
  --text-dim: #9aa3b5;
  --snag: #ff5a45; /* brand coral */
  --snag-deep: #e03e2a;
  --mint: #3ddc97; /* money accent */
  --gold: #ffc94d;
  --radius: 14px;
  --maxw: 1080px;
  font-size: 16px;
}

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

html { scroll-behavior: smooth; }
::selection { background: var(--snag); color: #fff; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

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

a { color: var(--snag); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--card-edge);
  background: rgba(12, 14, 19, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo .snag { color: var(--snag); }
.main-nav { display: flex; gap: 22px; }
.main-nav a { color: var(--text-dim); font-weight: 600; font-size: 0.92rem; }
.main-nav a:hover, .main-nav a.active { color: var(--text); text-decoration: none; }

/* ===== Hero ===== */
.hero {
  padding: 64px 0 38px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(12, 14, 19, 0.72) 0%, rgba(12, 14, 19, 0.88) 60%, var(--bg) 100%),
    url("/img/hero-bg.webp") center / cover no-repeat;
  border-bottom: 1px solid var(--card-edge);
}
.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero h1 .accent { color: var(--snag); }
.hero h1 .accent-mint { color: var(--mint); }
.hero p.sub {
  color: var(--text-dim);
  max-width: 640px;
  margin: 14px auto 0;
  font-size: 1.05rem;
}

/* ===== Cards, panels ===== */
.panel {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 26px;
}
.section { padding: 34px 0; }
.section h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 14px; }

/* ===== Inputs, buttons ===== */
.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row input[type="text"], .input-row input[type="url"] { flex: 1 1 320px; }

input[type="text"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  color: var(--text);
  padding: 13px 15px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--snag); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--snag);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:hover { background: var(--snag-deep); box-shadow: 0 6px 24px rgba(255, 90, 69, 0.35); }
.btn.mint:hover { box-shadow: 0 6px 24px rgba(61, 220, 151, 0.3); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn.mint { background: var(--mint); color: #08130e; }
.btn.mint:hover { background: #2fc986; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--card-edge);
  color: var(--text-dim);
  font-weight: 600;
}
.btn.ghost:hover { color: var(--text); border-color: var(--text-dim); background: transparent; }
.btn.sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 8px; }

.hint { color: var(--text-dim); font-size: 0.85rem; margin-top: 10px; }
.error-msg {
  background: rgba(255, 90, 69, 0.12);
  border: 1px solid rgba(255, 90, 69, 0.4);
  color: #ffb3a8;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 14px;
  display: none;
}
.error-msg.show { display: block; }

/* ===== Thumbnail results ===== */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.thumb-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  overflow: hidden;
}
.thumb-card .img-holder { aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.thumb-card .img-holder img { width: 100%; height: 100%; object-fit: cover; }
.thumb-card .meta { padding: 14px; }
.thumb-card .meta .res-label { font-weight: 700; font-size: 0.95rem; }
.thumb-card .meta .res-size { color: var(--text-dim); font-size: 0.82rem; }
.thumb-card .actions { display: flex; gap: 8px; margin-top: 12px; }
.thumb-card .actions .btn { flex: 1; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(61, 220, 151, 0.15);
  color: var(--mint);
  margin-left: 8px;
}

/* ===== Tabs ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  background: transparent;
  border: 1px solid var(--card-edge);
  color: var(--text-dim);
  border-radius: 30px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.tab-btn.active { background: var(--snag); border-color: var(--snag); color: #fff; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== Mock YouTube preview ===== */
.yt-mock {
  background: #0f0f0f;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 22px;
}
.yt-mock h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 16px; }
.yt-result { display: flex; gap: 14px; margin-bottom: 18px; }
.yt-result .yt-thumb { width: 360px; max-width: 45%; flex-shrink: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: #222; }
.yt-result .yt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.yt-result .yt-info .yt-title { font-weight: 600; font-size: 1.05rem; line-height: 1.35; color: #f1f1f1; }
.yt-result .yt-info .yt-meta { color: #aaa; font-size: 0.82rem; margin-top: 6px; }
.yt-sidebar-row { display: flex; gap: 10px; align-items: flex-start; max-width: 420px; }
.yt-sidebar-row .yt-thumb-sm { width: 168px; flex-shrink: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; background: #222; }
.yt-sidebar-row .yt-thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.yt-sidebar-row .t { font-weight: 600; font-size: 0.88rem; color: #f1f1f1; line-height: 1.3; }
.yt-sidebar-row .m { color: #aaa; font-size: 0.78rem; margin-top: 4px; }

/* Mock light mode + squint test */
.yt-mock.light { background: #f9f9f9; border-color: #ddd; }
.yt-mock.light h3 { color: #666; }
.yt-mock.light .yt-result .yt-info .yt-title,
.yt-mock.light .yt-sidebar-row .t { color: #0f0f0f; }
.yt-mock.light .yt-result .yt-info .yt-meta,
.yt-mock.light .yt-sidebar-row .m { color: #606060; }
.yt-mock.squint img { filter: blur(6px) saturate(1.1); }
.mock-toggle.active { background: var(--snag); border-color: var(--snag); color: #fff; }

/* Lineup feed */
.yours-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--snag);
  color: #fff;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== Analyzer ===== */
.analyzer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.stat-tile {
  background: var(--bg-soft);
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  padding: 16px;
}
.stat-tile .k { color: var(--text-dim); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-tile .v { font-size: 1.3rem; font-weight: 800; margin-top: 4px; }
.stat-tile .d { color: var(--text-dim); font-size: 0.82rem; margin-top: 4px; }
.palette-row { display: flex; gap: 8px; margin-top: 8px; }
.palette-swatch { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); }

/* ===== Calculator ===== */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 800px) { .calc-layout { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 7px; }
.field .sub-label { color: var(--text-dim); font-weight: 400; font-size: 0.82rem; }
.result-big { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--mint); letter-spacing: -0.02em; }
.result-range { color: var(--text-dim); font-size: 0.95rem; margin-top: 4px; }
.result-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--card-edge); }
.result-row:last-child { border-bottom: none; }
.result-row .k { color: var(--text-dim); }
.result-row .v { font-weight: 700; }

/* Niche comparison bars */
.compare-row {
  display: grid;
  grid-template-columns: 200px 1fr 90px;
  gap: 12px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.compare-row.selected { background: rgba(61, 220, 151, 0.08); outline: 1px solid rgba(61, 220, 151, 0.35); }
.compare-row .cr-label { color: var(--text-dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-row.selected .cr-label { color: var(--mint); }
.cr-bar-holder { background: var(--bg-soft); border-radius: 20px; height: 12px; overflow: hidden; }
.cr-bar { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--snag), var(--gold)); }
.compare-row.selected .cr-bar { background: linear-gradient(90deg, #14b877, var(--mint)); }
.cr-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .compare-row { grid-template-columns: 120px 1fr 76px; font-size: 0.8rem; } }

/* ===== FAQ / content ===== */
.content-block { max-width: 760px; }
.content-block h2 { margin-top: 30px; }
.content-block h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.content-block p { color: var(--text-dim); margin-bottom: 12px; }
.content-block ul, .content-block ol { color: var(--text-dim); margin: 0 0 12px 22px; }
.content-block li { margin-bottom: 6px; }
details.faq-item {
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--card);
}
details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 15px 18px;
  list-style: none;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; float: right; color: var(--snag); font-weight: 800; }
details.faq-item[open] summary::after { content: "-"; }
details.faq-item .a { padding: 0 18px 15px; color: var(--text-dim); }

/* ===== Tool cards (homepage) ===== */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 26px; }
.tool-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.15s, transform 0.15s;
  display: block;
  color: var(--text);
}
.tool-card:hover { border-color: var(--snag); transform: translateY(-3px); text-decoration: none; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); }
.tool-card.mint:hover { border-color: var(--mint); }
.tool-card .icon { font-size: 2rem; }
.tool-card h3 { margin: 12px 0 6px; font-size: 1.2rem; }
.tool-card p { color: var(--text-dim); font-size: 0.92rem; }
.tool-card .go { margin-top: 14px; font-weight: 700; color: var(--snag); font-size: 0.9rem; }
.tool-card.mint .go { color: var(--mint); }

/* ===== Learn / articles ===== */
.tldr {
  background: rgba(61, 220, 151, 0.07);
  border: 1px solid rgba(61, 220, 151, 0.3);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
}
.tldr .t { font-weight: 800; color: var(--mint); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.tldr p, .tldr li { color: var(--text); font-size: 0.95rem; }
.tldr ul { margin: 0 0 0 20px; }
.byline { color: var(--text-dim); font-size: 0.85rem; margin: 8px 0 0; }
.byline strong { color: var(--text); }
.content-block table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 0.92rem; }
.content-block th { text-align: left; color: var(--text); font-weight: 700; border-bottom: 2px solid var(--card-edge); padding: 10px 12px; }
.content-block td { color: var(--text-dim); border-bottom: 1px solid var(--card-edge); padding: 9px 12px; }
.content-block tr:hover td { color: var(--text); }
.table-scroll { overflow-x: auto; }
.article-hero-img { border-radius: var(--radius); border: 1px solid var(--card-edge); margin: 10px 0 6px; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 26px; }
.learn-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.learn-card:hover { border-color: var(--snag); transform: translateY(-3px); text-decoration: none; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); }
.bg-card { transition: border-color 0.15s, transform 0.15s; }
.bg-card:hover { border-color: var(--snag); transform: translateY(-3px); }
.learn-card .lc-body { padding: 20px; }
.learn-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.learn-card p { color: var(--text-dim); font-size: 0.88rem; }
.learn-card .lc-tag { color: var(--snag); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Backgrounds gallery */
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 26px; }
.bg-card { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius); overflow: hidden; }
.bg-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.bg-card .bgc-body { padding: 16px 18px; }
.bg-card h3 { font-size: 1rem; }
.bg-card p { color: var(--text-dim); font-size: 0.85rem; margin: 4px 0 12px; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--card-edge);
  margin-top: 60px;
  padding: 34px 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: var(--text-dim); }

/* ===== Utility ===== */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

/* ===== Mobile nav (hamburger) ===== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--card-edge);
    flex-direction: column;
    gap: 0;
    padding: 6px 20px 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
  .main-nav a {
    padding: 13px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--card-edge);
    color: var(--text);
  }
  .main-nav a:last-child { border-bottom: none; }
  .main-nav a.active { color: var(--snag); }
  .site-header.nav-open .main-nav { display: flex; }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ===== Small-screen layout tuning ===== */
@media (max-width: 640px) {
  .yt-result { flex-direction: column; }
  .yt-result .yt-thumb { max-width: 100%; width: 100%; }
  .wrap { padding: 0 16px; }
  .hero { padding: 44px 0 28px; }
  .panel { padding: 20px 16px; }
  .section { padding: 26px 0; }
  .yt-mock { padding: 16px; }
  .tabs { gap: 6px; }
  .tab-btn { padding: 8px 14px; font-size: 0.82rem; }
  .btn { padding: 12px 18px; font-size: 0.95rem; }
  .input-row .btn { flex: 1 1 auto; }
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
}
