/* Base and resets */
:root {
  /* Theme: Glossy Black + Pokémon Yellow */
  --pv-bg: #000000; /* true black */
  --pv-text: #e5e7eb; /* light gray for readability */
  --pv-muted: #cbd5e1; /* muted gray */
  --pv-heading-font: "Playfair Display", serif;
  --pv-brand-font: "PV-PokemonSolid";
  /* --pv-brand-font: "PV-PokemonHollow"; */
  --pv-primary: #FFCB05; /* Pokémon Yellow */
  --pv-primary-dark: #c79b00; /* darker yellow for hover */
  --pv-danger: #dc2626; /* red */
  --pv-danger-dark: #b91c1c; /* darker red for hover */
  --pv-accent: #a78bfa; /* violet accent (unchanged) */
  --pv-focus: #FFD54A; /* yellow focus ring */
  --pv-border: #1f2937; /* deep slate border */
  --pv-surface: #0a0a0a; /* near-black surface */
  --pv-surface-2: #0f0f0f;
}

@font-face {
  font-family: "PV-PokemonSolid";
  src: url("fonts/PokemonSolidNormal-xyWR.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "PV-PokemonHollow";
  src: url("fonts/PokemonHollowNormal-pyPZ.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
html { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; }
body {
  margin: 0;
  /* Glossy black background: subtle radial sheen + vertical gradient */
  background-color: var(--pv-bg);
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 35%),
    linear-gradient(180deg, #0a0a0a 0%, #000000 40%, #0a0a0a 100%);
  color: var(--pv-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Skip link */
.pv-skiplink {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--pv-primary);
  color: #0c0c0c;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 0;
}
.pv-skiplink:focus { top: 0; outline: 3px solid var(--pv-focus); }

/* Header */
.pv-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--pv-surface);
  border-bottom: 1px solid var(--pv-border);
}
.pv-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr 48px;
  gap: 1rem;
  align-items: center;
}
.pv-brand { color: var(--pv-primary); text-decoration: none; font-weight: 700; font-family: var(--pv-brand-font), var(--pv-heading-font); font-size: 1.35rem; line-height: 1.1; }

@media (min-width: 768px) {
  .pv-brand { font-size: 1.6rem; }
}

/* Navigation */
.pv-navToggle {
  width: 48px; height: 40px;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  background: transparent; border: 1px solid var(--pv-border); border-radius: 8px; color: var(--pv-text);
}
.pv-navToggle { justify-self: end; }
.pv-navToggle:focus { outline: 3px solid var(--pv-focus); outline-offset: 2px; }
.pv-navToggle__bar { display: block; width: 24px; height: 2px; background: var(--pv-text); margin: 0 auto; }

.pv-nav { display: none; }
.pv-nav[aria-expanded="true"] { display: block; }
.pv-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; justify-content: end; }
.pv-nav__link { color: var(--pv-text); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: 6px; }
.pv-nav__link:focus, .pv-nav__link:hover { background: #1f2937; }

@media (max-width: 767.98px) {
  .pv-brand { grid-column: 1; grid-row: 1; }

  /* Ensure hamburger is always on the far right */
  .pv-navToggle { grid-column: 3; grid-row: 1; }

  .pv-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .pv-nav[aria-expanded="true"] {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pv-border);
  }

  .pv-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
  }

  .pv-nav__link {
    display: block;
    width: 100%;
  }
}

@media (min-width: 768px) {
  .pv-header__inner { grid-template-columns: auto 1fr; }
  .pv-navToggle { display: none; }
  .pv-nav { display: block !important; }
}

/* Hero */
.pv-hero {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.pv-hero__title { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; color: var(--pv-primary); }
.pv-hero__subtitle { color: #ffffff; margin: 0 0 1rem; }

/* Home hero layout */
.pv-hero--home {
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
}
.pv-hero__grid {
  position: relative;
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--pv-border);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(255, 203, 5, 0.14) 0%, rgba(255, 203, 5, 0) 42%),
    radial-gradient(ellipse at 85% 30%, rgba(167, 139, 250, 0.10) 0%, rgba(167, 139, 250, 0) 45%),
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 45%),
    var(--pv-surface);
  overflow: hidden;
}
.pv-hero__content { position: relative; z-index: 1; }
.pv-hero__fineprint {
  margin: 0.75rem 0 0;
  font-size: 0.925rem;
  color: var(--pv-muted);
}
.pv-hero__panel {
  position: relative;
  min-height: 220px;
}

.pv-heroGlow {
  position: absolute;
  inset: -18% -15% -25% -15%;
  opacity: 0.9;
  filter: blur(18px);
  transform: translateZ(0);
  pointer-events: none;
}

.pv-heroCard {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  border: 1px solid var(--pv-border);
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(8px);
  padding: 1rem;
}
.pv-heroCard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.pv-heroCard__title { font-weight: 800; color: #ffffff; }
.pv-heroCard__body { display: grid; gap: 0.6rem; }
.pv-heroCard__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.75rem;
  align-items: baseline;
}
.pv-heroCard__label { color: var(--pv-muted); font-size: 0.9rem; }
.pv-heroCard__value { color: #ffffff; font-weight: 650; }
.pv-heroCard__divider { height: 1px; background: var(--pv-border); margin: 0.25rem 0; }

.pv-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: rgba(255, 203, 5, 0.16);
  border: 1px solid rgba(255, 203, 5, 0.32);
  color: var(--pv-primary);
}

@media (min-width: 900px) {
  .pv-hero__grid { grid-template-columns: 1.15fr 0.85fr; padding: 1.6rem; }
  .pv-hero__panel { min-height: 260px; }
}

/* Heading font */
h1, h2, h3, h4, h5, h6,
.pv-hero__title,
.pv-section__title {
  font-family: var(--pv-heading-font);
}

/* Buttons */
.pv-button { display: inline-block; text-decoration: none; border: 1px solid var(--pv-border); border-radius: 8px; padding: 0.6rem 1rem; }
.pv-button--primary { background: var(--pv-primary); color: #0b0b0b; border-color: transparent; }
.pv-button--primary:hover { background: var(--pv-primary-dark); }
.pv-button--primary:focus { outline: 3px solid var(--pv-focus); outline-offset: 2px; }
.pv-button--secondary { background: transparent; color: var(--pv-text); }

/* Clear Results button (danger) */
#pv-clear-results,
#pv-favorites-clear,
#pv-sealed-clear,
#pv-sealed-favorites-clear {
  background: var(--pv-danger);
  border-color: transparent;
  color: #ffffff;
}
#pv-clear-results:hover,
#pv-favorites-clear:hover,
#pv-sealed-clear:hover,
#pv-sealed-favorites-clear:hover {
  background: var(--pv-danger-dark);
  color: #ffffff;
}

/* Sections */
.pv-section { max-width: 1100px; margin: 2rem auto; padding: 0 1rem; }
.pv-main { flex: 1 0 auto; }
.pv-section__title { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 0.75rem; color: var(--pv-primary); }
.pv-section__text { color: #ffffff; }
.pv-section__header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

/* Inline links (used on home policy sections) */
.pv-inlineLink { color: var(--pv-primary); text-decoration: none; }
.pv-inlineLink:hover, .pv-inlineLink:focus { text-decoration: underline; }

/* Features */
.pv-features__list { list-style: none; padding-left: 0; margin: 0; }

/* Home quick links / tiles */
.pv-quick { margin-top: 1.25rem; }
.pv-tileGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.pv-tile {
  display: block;
  text-decoration: none;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--pv-border);
  background: var(--pv-surface-2);
  color: var(--pv-text);
}
.pv-tile:hover, .pv-tile:focus-visible {
  background: #121212;
  border-color: rgba(255, 203, 5, 0.35);
}
.pv-tile__title { font-weight: 900; font-size: 1.05rem; color: #ffffff; margin-bottom: 0.25rem; }
.pv-tile__text { margin: 0; color: var(--pv-muted); }

@media (min-width: 768px) {
  .pv-tileGrid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

/* Home feature grid */
.pv-featureGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.pv-feature {
  border-radius: 14px;
  border: 1px solid var(--pv-border);
  background: var(--pv-surface);
  padding: 1rem;
}
.pv-feature__title { margin: 0 0 0.35rem; color: #ffffff; font-weight: 850; }
.pv-feature__text { margin: 0; color: var(--pv-muted); }

@media (min-width: 900px) {
  .pv-featureGrid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

/* Home steps */
.pv-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.pv-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--pv-border);
  background: var(--pv-surface-2);
}
.pv-step__num {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #0b0b0b;
  background: var(--pv-primary);
}
.pv-step__text { color: #ffffff; }

@media (min-width: 900px) {
  .pv-steps { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

/* Cards */
.pv-card { background: #0a0a0a; border: 1px solid var(--pv-border); border-radius: 12px; overflow: hidden; }
.pv-card__img { width: 100%; height: auto; display: block; }
.pv-card__img--sealed { width: auto; max-width: 170px; margin: 0.75rem auto 0; }
.pv-card__body { padding: 0.75rem; }
.pv-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.pv-card__title { font-weight: 700; margin: 0 0 0.25rem; }
.pv-card__text { color: var(--pv-muted); margin: 0; }

/* Favorites star */
.pv-fav-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--pv-primary);
  font-size: 1.35rem;
  line-height: 1;
}
.pv-fav-btn:hover { color: var(--pv-primary-dark); }
.pv-fav-btn:focus-visible { outline: 3px solid var(--pv-focus); outline-offset: 2px; }

/* Scroll-to-top button */
.pv-scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--pv-primary);
  color: #0b0b0b;
  border-color: transparent;
}

/* Loading skeleton */
.pv-skeleton { background: linear-gradient(90deg, #0a0a0a 25%, #121212 37%, #0a0a0a 63%); background-size: 400% 100%; animation: pv-shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes pv-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Form */
.pv-form { max-width: 640px; }
.pv-form__field { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.pv-form input, .pv-form textarea { width: 100%; padding: 0.6rem 0.75rem; border-radius: 8px; border: 1px solid var(--pv-primary); background: #ffffff; color: #0b0b0b; }
.pv-form select { width: 100%; padding: 0.6rem 0.75rem; border-radius: 8px; border: 1px solid var(--pv-primary); background: #ffffff; color: #0b0b0b; }
.pv-form input:focus, .pv-form textarea:focus { outline: 3px solid var(--pv-focus); outline-offset: 2px; }
.pv-form select:focus { outline: 3px solid var(--pv-focus); outline-offset: 2px; }
/* Placeholders for white inputs */
.pv-form input::placeholder, .pv-form textarea::placeholder { color: #6b7280; }
/* Search field: keep white background + yellow border at all times */
label[for="pv-search-query"],
label[for="pv-search-number"] { color: var(--pv-primary); }
#pv-search-query { background: #ffffff; color: #0b0b0b; border-color: var(--pv-primary); }
#pv-search-query::placeholder { color: #6b7280; }

/* -------------------------------------------------------------------------- */
/* Bootstrap-compatible utilities (minimal)                                    */
/* -------------------------------------------------------------------------- */

/* Layout container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid: mimic Bootstrap's .row/.col-* using CSS grid */
.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
}
.row > * { min-width: 0; }
/* If an element inside a .row doesn't declare a col-* span, treat it like col-12. */
.row > :not([class*="col-"]) { grid-column: 1 / -1; }
/* Hidden inputs should never take up grid cells. */
.row input[type="hidden"] { display: none; }
.g-3 { gap: 1rem; }

/* When using `.pv-form` with the grid-based `.row`, let `gap` control spacing. */
.pv-form.row .pv-form__field { margin-bottom: 0; }

/* Base column spans */
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

@media (min-width: 576px) {
  .col-sm-12 { grid-column: span 12; }
  .col-sm-6 { grid-column: span 6; }
  .col-sm-4 { grid-column: span 4; }
  .col-sm-3 { grid-column: span 3; }
}

@media (min-width: 768px) {
  .col-md-12 { grid-column: span 12; }
  .col-md-8 { grid-column: span 8; }
  .col-md-6 { grid-column: span 6; }
  .col-md-4 { grid-column: span 4; }
  .col-md-3 { grid-column: span 3; }
}

@media (min-width: 992px) {
  .col-lg-12 { grid-column: span 12; }
  .col-lg-6 { grid-column: span 6; }
  .col-lg-4 { grid-column: span 4; }
  .col-lg-3 { grid-column: span 3; }
}

/* Spacing utilities used in markup */
.ms-2 { margin-left: 0.5rem !important; }
.me-2 { margin-right: 0.5rem !important; }

/* Text utilities */
.small { font-size: 0.875rem; }
.text-muted { color: var(--pv-muted) !important; }

/* Buttons (leave pv-button as primary; provide sane defaults for plain .btn) */
.btn { font: inherit; cursor: pointer; }
.btn:not(.pv-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  background: transparent;
  color: var(--pv-text);
}
.btn:not(.pv-button):hover { background: #1f2937; }

/* Form helpers used by JS and markup */
.form-label { display: inline-block; margin-bottom: 0.25rem; color: var(--pv-primary); }
.form-control, .form-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--pv-primary);
  background: #ffffff;
  color: #0b0b0b;
  font: inherit;
}
.form-control:focus, .form-select:focus { outline: 3px solid var(--pv-focus); outline-offset: 2px; }
.form-control::placeholder { color: #6b7280; }
.form-select:disabled { opacity: 0.7; }

/* Footer */
.pv-footer { border-top: 1px solid var(--pv-border); background: var(--pv-surface); flex-shrink: 0; }
.pv-footer__inner { max-width: 1100px; margin: 0 auto; padding: 1rem; display: flex; flex-direction: column; flex-wrap: wrap; gap: 0.25rem; align-items: center; justify-content: center; text-align: center; }
.pv-footer__text { margin: 0; font-size: 0.875rem; line-height: 1.4; }
.pv-footer__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.75rem; }
.pv-footer__links { justify-content: center; }
.pv-footer__links a { color: var(--pv-text); text-decoration: none; font-size: 0.875rem; line-height: 1.4; }

/* Accessibility helpers */
:focus-visible { outline: 3px solid var(--pv-focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}