@import url("https://fonts.googleapis.com/css2?family=Yusei+Magic&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  --bg-1: #0b0d1b;
  --bg-2: #1f243f;
  --bg-3: #0f3b3c;
  --ink: #f4f2ea;
  --muted: #c7c3b2;
  --accent: #f3c94d;
  --accent-2: #5ce2c2;
  --card: rgba(16, 20, 40, 0.75);
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 16px 40px rgba(6, 8, 18, 0.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--ink);
  background-color: #04111f;
  background-image:
    linear-gradient(140deg, rgba(4, 17, 31, 0.72), rgba(12, 34, 58, 0.75) 55%, rgba(7, 44, 47, 0.7)),
    url("../assets/gs-db-lab-bg.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255,255,255,0.25), transparent 50%),
    radial-gradient(2px 2px at 78% 34%, rgba(255,255,255,0.25), transparent 50%),
    radial-gradient(3px 3px at 60% 70%, rgba(255,255,255,0.2), transparent 50%);
  opacity: 0.3;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  position: relative;
  z-index: 1;
}

.hero {
  display: block;
  margin-bottom: 4px;
}
.hero__content {
  padding-top: 2px;
  max-width: 100%;
}
.hero__eyebrow {
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
}
.hero h1 {
  font-family: "Yusei Magic", sans-serif;
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.2;
  color: var(--accent);
  text-shadow: 0 6px 24px rgba(243, 201, 77, 0.35);
}
.hero__home-link {
  color: inherit;
  text-decoration: none;
}
.hero__home-link:hover {
  text-decoration: underline;
}
.hero__lead {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}
.hero__note {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(243, 201, 77, 0.08);
  font-size: 13px;
  color: #ffe9a3;
}
.hero__search-area {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: start;
  gap: 22px;
  margin-top: 10px;
}
.hero__search-box,
.hero__buttons-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.hero__search-box {
  min-height: 110px;
}
.hero__buttons-box {
  padding-top: 10px;
}
.panel__title {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--accent-2);
  margin-bottom: 10px;
}
#searchInput {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10, 12, 24, 0.65);
  color: var(--ink);
  font-size: 14px;
}
#searchInput::placeholder { color: rgba(244,242,234,0.4); }

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 10px;
}
.type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.type-filter {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(18, 20, 34, 0.72);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.type-filter.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(243, 201, 77, 0.12);
}
.tab {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(18, 20, 34, 0.7);
  color: var(--ink);
  padding: 8px 0;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}
.tab:hover { transform: translateY(-1px); border-color: var(--accent-2); }
.tab.is-active {
  background: linear-gradient(120deg, rgba(92,226,194,0.25), rgba(243,201,77,0.15));
  border-color: var(--accent);
}
.status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.content {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 22px;
  align-items: start;
}
.list, .detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  min-height: 620px;
  backdrop-filter: blur(6px);
}
.list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: clamp(947px, calc((100vh - 170px) * 1.6905), 1521px);
}
.list__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--accent-2);
  flex: 0 0 auto;
}
.list__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.list__item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 120ms ease;
}
.list__item:hover { background: rgba(255,255,255,0.04); }
.list__item.is-active { background: rgba(92,226,194,0.12); }
.list__item .label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.list__item .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.detail__body {
  padding: 18px 18px 22px;
}
.detail__empty {
  color: var(--muted);
  padding: 18px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
}
.detail__title {
  font-size: 22px;
  margin: 0 0 6px;
  font-family: "Yusei Magic", sans-serif;
}
.pokemon-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.pokemon-hero__img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}
.pokemon-hero__empty {
  font-size: 12px;
  color: var(--muted);
}
.detail__meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.stats-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 8px;
  vertical-align: middle;
}
.stats-inline__item {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(8, 10, 20, 0.35);
  font-size: 12px;
  color: #e8e4d5;
}
.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  font-size: 12px;
  margin-right: 6px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stats-grid {
  gap: 8px;
  margin-bottom: 10px;
}
.stats-grid .card {
  padding: 7px 8px;
  border-radius: 8px;
}
.stats-grid .card div {
  font-size: 11px;
  line-height: 1.1;
}
.stats-grid .card strong {
  font-size: 15px;
  line-height: 1.2;
}
.stats-grid--real .card strong {
  font-size: 14px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(8, 10, 20, 0.5);
}
.section {
  margin-bottom: 14px;
}
.section__title {
  font-size: 13px;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  font-size: 12px;
}
.note {
  margin-top: 8px;
  font-size: 12px;
  color: #ffe9a3;
}
.real-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.real-stats__col .grid {
  margin-bottom: 0;
}
.real-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.real-inline__row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
}
.real-inline__label {
  font-size: 12px;
  color: #ffe9a3;
  min-width: 42px;
}
.real-inline__item {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(8, 10, 20, 0.35);
  font-size: 11px;
  color: #e8e4d5;
  white-space: nowrap;
}
.firepower-inline__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0 0;
  padding-left: 42px;
}
.firepower-inline__item {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid rgba(92, 226, 194, 0.22);
  background: rgba(92, 226, 194, 0.1);
  font-size: 11px;
  color: #dbf6ee;
  white-space: nowrap;
}
.hp70-wrap {
  overflow-x: auto;
}
.hp70-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(8, 10, 20, 0.36);
}
.hp70-table th,
.hp70-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: top;
  white-space: nowrap;
}
.hp70-table th {
  color: var(--accent-2);
  font-weight: 600;
  background: rgba(255,255,255,0.03);
}
.hp70-table tbody th {
  color: #ffe9a3;
  background: rgba(255,255,255,0.02);
}
.hp70-table tr:last-child td {
  border-bottom: none;
}
.learnset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.learnset .section { margin-bottom: 0; }
.move-list {
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}
.move-list div {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
}
.move-list div:last-child { border-bottom: none; }

.detail__footer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .content { grid-template-columns: 1fr; }
  .hero__search-area { grid-template-columns: 1fr; }
  .learnset { grid-template-columns: 1fr; }
  .real-stats { grid-template-columns: 1fr; }
  .stats-inline { display: flex; margin-left: 0; margin-top: 6px; }
  .real-inline__label { min-width: auto; }
  .firepower-inline__row { padding-left: 0; }
}
