body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 64px;
}

main {
  flex: 1;
}

.navbar {
  background-color: #e6f3ff !important;
  border-color: #cde4ff;
}

.home-hero {
  background: linear-gradient(135deg, #e7f2ff 0%, #f8fbff 60%, #ffffff 100%);
  border: 1px solid #d7e5ff;
  box-shadow: 0 18px 60px rgba(13, 110, 253, 0.08);
  overflow: hidden;
}

.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(13, 110, 253, 0.08), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(13, 202, 240, 0.12), transparent 40%);
  pointer-events: none;
}

.gen9-hero {
  background: radial-gradient(circle at 20% 20%, #e7f2ff 0, #f7fbff 45%, #ffffff 80%);
  border: 1px solid #d7e5ff;
  box-shadow: 0 18px 60px rgba(13, 110, 253, 0.08);
  position: relative;
  overflow: hidden;
}

.gen9-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(13, 202, 240, 0.08));
  pointer-events: none;
}

.hero-badge {
  background: linear-gradient(90deg, #0d6efd, #0dcaf0);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.35);
}

.hero-chip {
  background: #f0f6ff;
  color: #0d6efd;
  border-radius: 14px;
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  border: 1px solid #dbe8ff;
}

.hero-visual {
  min-width: 240px;
  position: relative;
  isolation: isolate;
}

.hero-visual .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.6;
}

.hero-visual .orb-1 {
  width: 160px;
  height: 160px;
  background: #c9dfff;
  top: -30px;
  right: 10px;
}

.hero-visual .orb-2 {
  width: 120px;
  height: 120px;
  background: #baf1ff;
  bottom: -20px;
  left: 40px;
}

.floating-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e8eef7;
}

.gen9-tiles .card {
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gen9-tiles .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(13, 110, 253, 0.12);
}

.icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e9f2ff, #f8fdff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid #d9e8ff;
}

.menu-card {
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(13, 110, 253, 0.12);
}

.menu-card .card-header {
  background: linear-gradient(135deg, #e7f2ff, #f8fbff);
  border-bottom: 1px solid #d7e5ff;
  font-weight: 700;
}

.menu-card .card-body {
  padding: 1.25rem 1.25rem 1.1rem;
  gap: 0.75rem;
}

.menu-card .icon-circle {
  width: 42px;
  height: 42px;
  font-size: 1.05rem;
}

.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: none;
  background-color: #f2f2f2;
  background-image: none;
  border: none;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  -webkit-transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
  transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 400px;
  min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 12px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  -webkit-align-items: center;
  align-items: center;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  -webkit-flex-grow: 1;
  flex-grow: 1;
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  -webkit-transition: opacity 0.218s;
  transition: opacity 0.218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #ffffff61;
}

.gsi-material-button:disabled .gsi-material-button-state {
  background-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
  opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #001d35;
  opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
  -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #001d35;
  opacity: 8%;
}

.trainer-hero {
  background: linear-gradient(135deg, #f7fbff, #ffffff);
  border: 1px solid #e6ecf5;
}

.trainer-avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.trainer-meta p {
  margin-bottom: 0.15rem;
}

.article-list .list-group-item {
  border-color: #e6ecf5;
}

.article-list a {
  overflow-wrap: anywhere;
}

.article-card {
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.gen9-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #dbe2ef;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-around;
  padding: 8px 10px;
  z-index: 1050;
  backdrop-filter: blur(6px);
}

.gen9-footer-link {
  text-decoration: none;
  color: #0d6efd;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.gen9-footer-link i {
  font-size: 1.25rem;
}

.party-card {
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.party-card .card-header {
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  border-bottom: 1px solid #dbe8ff;
}

.party-avatar {
  width: 30px;
  height: 30px;
  object-fit: cover;
}

.party-icon {
  width: 40%;
}

.fallback-icon {
  min-width: 28px;
  aspect-ratio: 1 / 1;
  background: #f8f9fa;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  color: #6c757d;
  font-size: 0.95rem;
}

.party-hero {
  background: linear-gradient(135deg, #f4f9ff, #ffffff);
  border: 1px solid #e6ecf5;
}

.party-search .card-header {
  background: linear-gradient(135deg, #e7f2ff, #f8fbff);
  border-bottom: 1px solid #dbe8ff;
  font-weight: 700;
}

.party-summary {
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.status-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.85rem;
}

.status-table th,
.status-table td {
  width: 16.6%;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .status-table {
    font-size: 0.8rem;
  }
}

.explanation-box {
  font-size: 0.9rem;
  line-height: 1.5;
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.9rem 1rem;
}

.party-pokemon-header {
  background: linear-gradient(135deg, #0d6efd, #0aa7e3);
  border-bottom: 1px solid #0b66c3;
}

.pokemon-review-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}

.pokedex-card {
  border: 1px solid #e6ecf5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pokedex-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(13, 110, 253, 0.12);
}

.pokedex-thumb {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  border-radius: 14px;
  padding: 6px;
}

.pokedex-detail-hero {
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.pokedex-hero-thumb {
  background: #ffffff;
  border: 1px solid #e6ecf5;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.06);
}

.pokedex-hero-thumb img {
  width: 80%;
  max-width: 240px;
  height: auto;
}

.pokedex-type-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.pokedex-meta .badge {
  font-weight: 600;
}

.pokedex-section {
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.pokedex-ability-list .list-group-item {
  border: none;
  border-bottom: 1px solid #eef2f7;
}

.pokedex-ability-list .list-group-item:last-child {
  border-bottom: none;
}

.pokedex-action {
  border: 1px solid #e6ecf5;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pokedex-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(13, 110, 253, 0.12);
}

.pokedex-action-thumb {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  border-radius: 14px;
  padding: 6px;
}

.pokedex-move-icon {
  max-width: 60px;
}

.badge-unreviewed {
  background-color: #ffe9ef;
  color: #b02a37;
  border: 1px solid #f5c2c7;
}

.slot-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.slot-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.candidate-btn {
  white-space: normal;
  word-break: break-word;
  padding: 4px 10px;
}

.candidate-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-wrap .candidate-btn {
  min-width: 120px;
}

.card-tight {
  padding: 0.75rem;
}

.info-block {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #f9fafb;
}

.info-title {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.new-slot-img {
  width: 64px;
  height: 64px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.new-slot-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.slot-img,
.pokedex-hero-thumb img,
.party-icon,
.pokedex-type-icon {
  max-width: 100%;
}

.section-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.stat-input {
  width: 100%;
  max-width: 110px;
}

/* EV/IV mobile list */
.ev-iv-mobile .ev-iv-row {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ev-iv-mobile .ev-iv-row + .ev-iv-row {
  margin-top: 0.5rem;
}

.ev-iv-mobile .ev-iv-stat {
  min-width: 36px;
}

.ev-iv-mobile .ev-iv-field label {
  display: block;
}

.ev-iv-mobile input[type='number'],
.ev-iv-mobile select {
  width: 100%;
}

/* Top Pokemon cards */
.top-pokemon-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.top-pokemon-line {
  align-items: center;
}

.top-pokemon-detail {
  align-items: center;
}

.top-pokemon-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e7f1ff, #f7fbff);
  border: 1px solid #d5e3ff;
  color: #0d6efd;
  font-weight: 700;
  font-size: 0.95rem;
}

.top-pokemon-name {
  line-height: 1.2;
}

.top-pokemon-grid .card-body {
  padding: 0.85rem;
}

.top-pokemon-thumb {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e6ecf5;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.top-pokemon-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: brightness(0.92) saturate(0.95);
}

@media (max-width: 575.98px) {
  .top-pokemon-grid {
    row-gap: 0.75rem;
  }

  .top-pokemon-grid .card-body {
    padding: 0.65rem 0.75rem;
  }

  .top-pokemon-body {
    gap: 0.25rem;
  }

  .top-pokemon-thumb {
    padding: 8px;
  }

  .top-pokemon-img {
    width: 60px;
    height: 60px;
  }

  .top-pokemon-rank {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 0.85rem;
  }

  .top-pokemon-name {
    font-size: 0.95rem;
  }

  .top-pokemon-grid .fw-bold {
    font-size: 0.95rem;
  }

  .top-pokemon-grid .text-muted {
    font-size: 0.8rem;
  }
}

/* Trainer detail */
.trainer-title-card {
  background: linear-gradient(135deg, #f4f8ff, #ffffff);
  border: 1px solid #e3ebf7;
}

.trainer-title-icon {
  width: 54px;
  height: 54px;
  background: #fff;
  border: 1px solid #dce6f6;
  box-shadow: 0 10px 30px rgba(13, 110, 253, 0.12);
}

.trainer-title-icon svg {
  width: 28px;
  height: 28px;
}

.trainer-title-icon-small svg {
  width: 18px;
  height: 18px;
}
