/* WebTech360 Game Tools — dark, mobile-first design system */
:root {
  --bg: #0f1020;
  --bg-soft: #181a2e;
  --card: #1e2138;
  --line: #2c2f4a;
  --text: #e9eaf3;
  --muted: #9aa0c0;
  --accent: #6c5ce7;
  --accent-2: #00d2a8;
  --radius: 14px;
  --maxw: 980px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.65 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 70% -10%, #221d4a 0%, var(--bg) 55%) fixed;
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: .4em 0 .5em; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: rgba(15,16,32,.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.nav a { color: var(--muted); margin-left: 18px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0; color: var(--muted); font-size: .9rem; }
.muted { color: var(--muted); }

/* Hero + homepage */
.hero { padding: 40px 0 18px; }
.hero h1 { margin-top: 0; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 620px; }
.game-heading { margin: 34px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 16px 18px; color: var(--text);
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.card h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.tag { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: #2a2d4d; color: #c9cdf0; }
.tag-calculator { background: #2b2350; color: #c7b8ff; }
.tag-checker { background: #133b35; color: #7ff0d3; }
.tag-tester { background: #3a2a13; color: #ffd79a; }

/* Tool page */
.breadcrumb { color: var(--muted); font-size: .9rem; margin-top: 16px; }
.breadcrumb a { color: var(--muted); }
.tool-mount { margin: 10px 0 8px; }
.tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tool-card h2 { margin: 0 0 2px; font-size: 1.1rem; }
.tool-card .hint { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.fields { display: grid; gap: 12px; }
.fields label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--muted); }
.fields input, .fields select {
  width: 100%; padding: 10px 12px; font-size: 1rem; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
}
.fields input:focus, .fields select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.result { margin-top: 16px; min-height: 1px; }
.result-label { color: var(--muted); font-size: .85rem; }
.result-primary { font-size: 1.35rem; margin-top: 4px; padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: 10px; }
.result-primary strong { color: var(--accent-2); }
.stat { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.note { color: var(--muted); }

/* Long-form + FAQ */
.prose { margin-top: 26px; max-width: 720px; }
.prose p { color: #d4d7ea; }
.faq { margin-top: 30px; max-width: 720px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 8px 0 2px; }
.back { margin: 30px 0; }

/* Blox Fruits trade rows + W/F/L verdict */
.trade-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; margin-bottom: 8px; }
.trade-row select, .trade-row input { padding: 9px 10px; font-size: .95rem; color: var(--text); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; }
.v-win { border-left-color: #2ecc71 !important; }
.v-win strong { color: #2ecc71; }
.v-fair { border-left-color: #f1c40f !important; }
.v-fair strong { color: #f1c40f; }
.v-lose { border-left-color: #e74c3c !important; }
.v-lose strong { color: #e74c3c; }

/* multi-column field grid + mutation checkboxes */
.fields-2col { grid-template-columns: repeat(2, 1fr); }
.mutations { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 4px 0 6px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--text); }
.chk input { width: auto; }

/* Homepage filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 22px; }
.pill { font: inherit; font-size: .88rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: all .12s ease; }
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-n { opacity: .7; font-size: .8em; margin-left: 2px; }

/* Card top row (category + game badge) */
.card { display: flex; flex-direction: column; }
.card[hidden] { display: none; }  /* needed: .card's display would otherwise override [hidden] */
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.game-badge { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Result toolbar: save image + history */
.result-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.rt-btn { font: inherit; font-size: .9rem; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; cursor: pointer; }
.rt-btn:hover { border-color: var(--accent); }
.rt-ghost { color: var(--muted); }
.rt-history { flex-basis: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.rt-item { display: flex; gap: 12px; padding: 9px 14px; font-size: .88rem; border-bottom: 1px solid var(--line); }
.rt-item:last-child { border-bottom: 0; }
.rt-time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-empty { color: var(--muted); }

/* Cookie consent */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; background: #16182b; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.45); z-index: 50; }
.consent p { margin: 0; flex: 1 1 320px; font-size: .9rem; color: var(--muted); }
.consent-btns { display: flex; gap: 8px; }

/* Footer nav */
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.footer-nav a { color: var(--text); font-size: .92rem; }

/* Prose headings/lists (static pages + tool bodies) */
.prose h2 { font-size: 1.25rem; margin: 26px 0 8px; }
.prose h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 5px 0; color: #d4d7ea; }
.prose strong { color: #fff; }
.prose .formula { background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin: 12px 0; font-size: .95rem; }

@media (max-width: 560px) {
  .nav a { margin-left: 12px; font-size: .9rem; }
  .hero { padding: 26px 0 10px; }
  .consent { left: 8px; right: 8px; bottom: 8px; }
}
