/* PokeCoach — dark, competitive, clean. Red pokéball accent, no trademarked assets. */
:root {
  --bg: #0b1020;
  --bg2: #10162b;
  --card: #151c33;
  --card2: #1b2440;
  --line: #26304f;
  --text: #e8ecf6;
  --muted: #93a0bd;
  --accent: #ef4444;
  --accent2: #f97316;
  --good: #34d399;
  --bad: #f87171;
  --pro: #fbbf24;
  --radius: 14px;
  --maxw: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #1a2140 0%, var(--bg) 55%) fixed;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h2 { font-size: 1.7rem; }
a { color: inherit; text-decoration: none; }
code { background: #0e1428; padding: .1em .4em; border-radius: 5px; font-size: .85em; color: #cbd5ff; }
.muted { color: var(--muted); }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem clamp(1rem, 4vw, 2.4rem);
  background: rgba(11,16,32,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.2rem; font-weight: 600; }
.brand b { color: var(--accent); font-weight: 800; }
.ball {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(#ef4444 0 50%, #fff 50% 100%);
  border: 2px solid #0b1020; box-shadow: 0 0 0 2px #26304f, inset 0 0 0 5px transparent;
  position: relative;
}
.ball::after { content: ""; position: absolute; inset: 40% 0 auto 0; height: 2px; background: #0b1020; }
.nav-links { display: flex; gap: 1.2rem; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.auth { display: flex; align-items: center; gap: .6rem; }
.user-badge { font-size: .85rem; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── buttons ── */
.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border-radius: 10px; padding: .6rem 1.1rem; border: 1px solid transparent;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; border-color: var(--accent); color: #ffd7cf; }
.btn-outline:hover { background: rgba(239,68,68,.12); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }

/* ── hero ── */
.hero { padding: clamp(3rem, 9vw, 6rem) clamp(1rem, 4vw, 2.4rem) 2.5rem; }
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.pill {
  display: inline-block; font-size: .8rem; color: #ffd7cf;
  border: 1px solid var(--line); background: rgba(239,68,68,.08);
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -.02em; }
.lede { font-size: clamp(1rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 620px; margin: 1rem 0 1.8rem; }
.lede b { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-cta .btn { padding: .8rem 1.5rem; font-size: 1.05rem; }
.hero-note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }

/* ── features ── */
.features {
  max-width: var(--maxw); margin: 1rem auto 0; padding: 0 clamp(1rem, 4vw, 2.4rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem;
}
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.ficon { font-size: 1.8rem; margin-bottom: .6rem; }
.ficon.big { font-size: 3rem; }
.pro-tag { font-size: .62rem; font-weight: 800; text-transform: uppercase; color: #201700;
  background: var(--pro); padding: .12em .5em; border-radius: 6px; vertical-align: middle; margin-left: .3em; letter-spacing: .04em; }
.soon-tag { font-size: .62rem; font-weight: 700; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); padding: .1em .45em; border-radius: 6px; vertical-align: middle; margin-left: .3em; }

/* ── app ── */
.app { max-width: var(--maxw); margin: 3.5rem auto 0; padding: 0 clamp(1rem, 4vw, 2.4rem); }
.app-head h2 { font-size: 1.9rem; }
.fmtbar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.fmtbar label { font-size: .9rem; color: var(--muted); }
.fmt-meta { font-size: .82rem; color: var(--muted); }
select, input[type=text], textarea {
  font: inherit; background: var(--bg2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; padding: .55rem .7rem;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent2); outline-offset: 0; }
textarea { width: 100%; resize: vertical; }

.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.6rem 0 1rem; border-bottom: 1px solid var(--line); }
.tab {
  font: inherit; font-weight: 600; cursor: pointer; color: var(--muted);
  background: transparent; border: none; border-bottom: 2px solid transparent;
  padding: .6rem .9rem; border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--text); background: var(--card); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.panel { display: none; animation: fade .2s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-head h3 { margin: 0; font-size: 1.3rem; }

.form-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; }
.form-row label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; flex: 1; min-width: 180px; }
.form-row .vs { align-self: center; color: var(--muted); font-weight: 700; padding-bottom: .6rem; }
.hint { color: var(--muted); font-weight: 400; font-size: .8em; }

.out { margin-top: 1.2rem; }
.empty { color: var(--muted); padding: 2rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.err { color: var(--bad); background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.3); padding: .9rem 1rem; border-radius: 10px; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:hover { background: var(--card2); }
.bar { height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* team members */
.member { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: .7rem; }
.member h4 { margin: 0 0 .3rem; font-size: 1.05rem; }
.member .kv { color: var(--muted); font-size: .85rem; }
.tag { display: inline-block; font-size: .72rem; background: var(--card2); border: 1px solid var(--line); color: var(--muted); padding: .1em .5em; border-radius: 6px; margin: 0 .3em .3em 0; }
.paste { background: #0e1428; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82rem; white-space: pre-wrap; overflow-x: auto; }
.copy-row { display: flex; justify-content: space-between; align-items: center; margin: 1.2rem 0 .5rem; }

/* progress */
.progress { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; margin-top: 1rem; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* calc / sim result */
.result-big { font-size: 1.6rem; font-weight: 800; }
.result-big.good { color: var(--good); }
.result-big.bad { color: var(--bad); }
.log-line { padding: .35rem .2rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.log-line .t { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: .6rem; }

/* ask gate */
.gate { background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(239,68,68,.08));
  border: 1px solid rgba(251,191,36,.3); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1rem; }
.gate h4 { margin: 0 0 .4rem; }
.gate p { color: var(--muted); margin: 0 0 1rem; }
.ask-actions { display: flex; align-items: center; gap: .9rem; margin-top: .7rem; }
.ask-status { color: var(--muted); font-size: .88rem; }
.answer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; white-space: pre-wrap; }

/* soon card */
.soon-card { text-align: center; padding: 3rem 1.5rem; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.soon-card p { color: var(--muted); max-width: 480px; margin: .6rem auto 0; }

/* pricing */
.pricing { max-width: 860px; margin: 5rem auto 0; padding: 0 clamp(1rem, 4vw, 2.4rem); text-align: center; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 1.8rem; text-align: left; }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px -30px var(--accent); }
.ribbon { position: absolute; top: -12px; right: 18px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: .2em .7em; border-radius: 999px; }
.price { font-size: 2.4rem; font-weight: 800; margin: .3rem 0 1rem; }
.price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.price-card li { padding: .35rem 0 .35rem 1.6rem; position: relative; color: var(--muted); }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.price-card li b { color: var(--text); }
.price-card .btn { width: 100%; text-align: center; }
.price-note { margin-top: .8rem; font-size: .82rem; color: var(--muted); text-align: center; }

/* footer */
.foot { max-width: var(--maxw); margin: 5rem auto 3rem; padding: 2rem clamp(1rem, 4vw, 2.4rem) 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.foot b { color: var(--accent); }

/* toast */
.toast { position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--line); color: var(--text); padding: .7rem 1.2rem; border-radius: 10px; font-size: .9rem; z-index: 100; box-shadow: 0 10px 40px -10px #000; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .form-row label { min-width: 100%; }
}
