:root {
  --bg: #0f1116;
  --bg-card: #171a21;
  --border: #2c313d;
  --text: #e7e9ee;
  --muted: #9aa1ae;
  --accent: #ff6d10;
  --accent-2: #ff8a3d;
  --accent-glow: rgba(255, 109, 16, .35);
  --good: #22c55e;
  --bad: #ef4444;
  --blue: #7cb7ff;
  --radius: 10px;
  --radius-hud: 4px;
  --max: 1080px;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  position: relative;
}
/* ambient tactical grid + top glow, fixed behind all pages */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 900px 480px at 50% -8%, rgba(255, 109, 16, .12), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 48px);
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.td2-wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- header / nav ---- */
.td2-header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 17, 22, 0.92);
  backdrop-filter: blur(6px);
}
.td2-nav {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 0; flex-wrap: wrap;
}
.td2-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.td2-brand .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  animation: td2-dot-pulse 2.6s ease-in-out infinite;
}
@keyframes td2-dot-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--accent); }
  50% { box-shadow: 0 0 15px 2px var(--accent); }
}
.td2-nav-links { display: flex; gap: 18px; flex-wrap: wrap; margin-left: 8px; }
.td2-nav-links a {
  color: var(--muted); font-size: 15px; padding-bottom: 3px;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.td2-nav-links a.active, .td2-nav-links a:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--accent); }
.td2-nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.td2-lang { display: flex; gap: 4px; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.td2-lang-btn {
  background: none; border: none; color: var(--muted); font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.td2-lang-btn.active { background: var(--accent); color: #1a0d04; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius); font-weight: 600; font-size: 15px;
  border: 1px solid var(--border); cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #1a0d04;
  position: relative; overflow: hidden;
}
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2), 0 6px 20px -6px var(--accent-glow); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-card); border-color: var(--muted); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: rgba(239,68,68,.1); }

/* ---- layout bits ---- */
.td2-hero { padding: 72px 0 48px; text-align: center; position: relative; overflow: hidden; }
.td2-hero h1 { font-size: 40px; line-height: 1.2; margin: 0 0 16px; letter-spacing: -0.01em; }
.td2-hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 28px; }
.td2-hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.td2-hero .note { color: var(--muted); font-size: 13px; }

/* cursor-reactive targeting glow behind the hero copy */
.td2-hero-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 32%), var(--accent-glow), transparent 68%);
  opacity: .8; transition: opacity .3s;
}
/* one-shot ISAC-style scan sweep on load */
.td2-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px 1px var(--accent-glow);
  animation: td2-scan-sweep 1.8s cubic-bezier(.3,.7,.3,1) 1 both;
}
@keyframes td2-scan-sweep {
  0% { top: 0; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
/* orchestrated single-moment reveal of the hero copy, timed just behind the scan line */
.td2-hero h1, .td2-hero p, .td2-hero .cta-row, .td2-hero .note {
  animation: td2-rise .7s cubic-bezier(.2,.7,.2,1) both;
}
.td2-hero h1 { animation-delay: .15s; }
.td2-hero p { animation-delay: .32s; }
.td2-hero .cta-row { animation-delay: .46s; }
.td2-hero .note { animation-delay: .58s; }
@keyframes td2-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .td2-scan { display: none; }
  .td2-brand .dot { animation: none; }
  .td2-hero h1, .td2-hero p, .td2-hero .cta-row, .td2-hero .note { animation: none; opacity: 1; transform: none; }
  .td2-hero-glow { transition: none; }
}

.section { padding: 48px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: 26px; margin: 0 0 28px; }
.section-lede { color: var(--muted); font-size: 16px; max-width: 680px; margin: -16px 0 28px; }

/* ---- HUD corner-bracket frame: a restrained targeting-reticle treatment for focal boxes ---- */
.hud-frame { position: relative; border-radius: var(--radius-hud) !important; }
.hud-frame::before, .hud-frame::after {
  content: ""; position: absolute; width: 13px; height: 13px;
  border: 2px solid var(--accent); opacity: .45;
  transition: opacity .2s, width .2s, height .2s;
}
.hud-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hud-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.hud-frame:hover::before, .hud-frame:hover::after,
.hud-frame:focus-within::before, .hud-frame:focus-within::after { opacity: 1; width: 17px; height: 17px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: border-color .2s, transform .2s;
}
.card.hud-frame:hover { transform: translateY(-2px); border-color: #3a4053; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; font-size: 18px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-hud);
  background: rgba(255, 109, 16, .07);
}

/* ---- download cards ---- */
.dl-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dl-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s;
}
.dl-card .ver { color: var(--muted); font-size: 13px; font-family: var(--mono); }

/* ---- news ---- */
.news-item {
  background: var(--bg-card); border: 1px solid var(--border); border-left: 2px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px;
  transition: border-left-color .2s, border-color .2s;
}
.news-item:hover { border-left-color: var(--accent); }
.news-item .meta { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.news-item h3 { margin: 0 0 8px; font-size: 18px; }
.news-item p { margin: 0 0 10px; color: #c9ced8; }
.news-item a { font-size: 13.5px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-right: 8px; font-family: var(--mono); }
.badge-event { background: rgba(124,183,255,.15); color: var(--blue); }
.badge-update { background: rgba(255,109,16,.15); color: var(--accent-2); }
.badge-season { background: rgba(34,197,94,.15); color: var(--good); }

/* ---- premium ---- */
.price-card {
  background: var(--bg-card); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 28px; text-align: center; max-width: 420px; margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(255,109,16,.1), 0 20px 50px -24px var(--accent-glow);
}
.price-card .state { color: var(--muted); font-size: 14px; margin: 10px 0 20px; }

/* ---- account ---- */
.acc-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; max-width: 520px; margin: 0 auto;
}
.acc-tier { font-family: var(--mono); letter-spacing: .02em; }
.acc-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.acc-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--border); object-fit: cover; }
.acc-name { font-weight: 700; font-size: 17px; }
.acc-tier { font-size: 13px; padding: 3px 10px; border-radius: 999px; display: inline-block; margin-top: 4px; }
.acc-tier.free { background: var(--border); color: var(--muted); }
.acc-tier.premium { background: rgba(255,109,16,.18); color: var(--accent-2); }
.acc-field { display: flex; gap: 8px; margin: 18px 0; }
.acc-field input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 10px 12px; font-size: 14px;
}
.acc-msg { font-size: 13.5px; margin-top: 10px; }
.acc-msg.ok { color: var(--good); }
.acc-msg.err { color: var(--bad); }
.acc-divider { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border);
  border-top-color: var(--accent); animation: spin 0.8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- footer ---- */
.td2-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; color: var(--muted); font-size: 13px; }
.td2-footer .links { display: flex; gap: 18px; margin-bottom: 10px; flex-wrap: wrap; }
.td2-footer .links a { color: var(--muted); }

@media (max-width: 640px) {
  .td2-hero h1 { font-size: 30px; }
  .td2-hero p { font-size: 16px; }
}
