:root {
  --bg: #0b0e1a;
  --bg-2: #12162a;
  --panel: #181c34;
  --panel-2: #1f2444;
  --ink: #e8ecff;
  --ink-dim: #9aa3c7;
  --accent: #7cf0ff;
  --accent-2: #ff7cf0;
  --warn: #ffd166;
  --ok: #7cffb2;
  --line: #2a3058;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124,240,255,0.10), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(255,124,240,0.10), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11,14,26,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}
.brand-text { font-size: 1.05rem; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-dim); font-size: 0.95rem; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }

section { margin-bottom: 48px; }
h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}
h3 { font-size: 1.1rem; margin: 0 0 6px; }
.section-intro { color: var(--ink-dim); max-width: 720px; margin: 0 0 20px; }

.arena {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.arena-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .arena-grid { grid-template-columns: 1fr; }
  .vs-col { flex-direction: row; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.panel h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

.field { display: block; margin-bottom: 12px; }
.field span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
select {
  width: 100%;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.pet-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  min-height: 140px;
}
.pet-card-empty { color: var(--ink-dim); font-style: italic; }
.pet-name { font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; }
.pet-gen { font-size: 0.85rem; color: var(--ink-dim); margin: 0 0 10px; }
.pet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.stat-label { font-size: 0.75rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 1px; }
.stat-val { font-size: 1.05rem; font-weight: 600; }

.preset-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.preset-label { font-size: 0.85rem; color: var(--ink-dim); margin-right: 4px; }
.chip {
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: #0b0e1a; border-color: var(--accent); }

.vs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.vs-badge {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 2px;
}
.battle-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0e1a;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(124,240,255,0.25);
}
.battle-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255,124,240,0.3); }
.battle-btn:active { transform: translateY(0); }
.ghost-btn {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--accent); }

.verdict {
  margin-top: 24px;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.verdict-card {
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.verdict-title {
  font-size: 1.3rem;
  font-weight: 700;
}
.verdict-badge {
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0e1a;
  font-weight: 600;
}
.verdict-badge.lose { background: var(--warn); }
.verdict-badge.tie { background: var(--ink-dim); color: #0b0e1a; }
.verdict-body { margin: 0 0 16px; color: var(--ink); }
.verdict-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.opponent-meta { margin-bottom: 12px; }
.opponent-tag {
  font-size: 0.85rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gen-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.gen-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.gen-year { font-size: 0.85rem; color: var(--ink-dim); margin: 0 0 10px; }
.gen-pets { list-style: none; padding: 0; margin: 0; }
.gen-pets li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.gen-pets li:last-child { border-bottom: none; }
.rarity-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.rarity-common { background: #8a93b8; }
.rarity-uncommon { background: #7cf0ff; }
.rarity-rare { background: #ff7cf0; }
.rarity-secret { background: #ffd166; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.how-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.how-block p { color: var(--ink-dim); margin: 0; font-size: 0.95rem; }

.notes-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.notes-block ul { margin: 0; padding-left: 20px; }
.notes-block li { margin-bottom: 8px; color: var(--ink-dim); }
.notes-block li strong { color: var(--ink); }

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.history-list {
  display: grid;
  gap: 10px;
}
.history-empty {
  color: var(--ink-dim);
  font-style: italic;
  padding: 20px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.history-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
}
.history-match { font-weight: 600; }
.history-result {
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.history-result.win { background: rgba(124,255,178,0.15); color: var(--ok); }
.history-result.lose { background: rgba(255,209,102,0.15); color: var(--warn); }
.history-result.tie { background: rgba(154,163,199,0.15); color: var(--ink-dim); }
.history-time { font-size: 0.8rem; color: var(--ink-dim); }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px 20px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-dim); }
.footer-nav a:hover { color: var(--ink); }
.footer-meta { font-size: 0.8rem; margin-top: 4px; }

@media print {
  .site-header, .site-footer, .vs-col, .preset-row, .verdict-actions, .history, .site-nav { display: none; }
  body { background: white; color: black; }
  .panel, .verdict-card { border: 1px solid #ccc; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
