/* ====== Základ ====== */
:root {
  --red: #ee1515;
  --red-dark: #c40e0e;
  --yellow: #ffcb05;
  --blue: #2a75bb;
  --blue-dark: #1b4e7d;
  --ink: #1f2430;
  --ink-soft: #4a5163;
  --bg: #f7f8fb;
  --card-bg: #ffffff;
  --border: #e3e6ee;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(31, 36, 48, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.2; font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
p + p { margin-top: 0.8rem; }

.hidden { display: none !important; }

/* ====== Hlavička ====== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(31,36,48,0.05);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 62px; flex-wrap: wrap;
}

.logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 1.3rem; text-decoration: none; color: var(--ink); font-weight: 600;
}
.logo strong { color: var(--red); font-weight: 900; }

.pokeball {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(to bottom, var(--red) 0 45%, var(--ink) 45% 55%, #fff 55% 100%);
  border: 2px solid var(--ink);
  position: relative;
}
.pokeball::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink);
}

.nav-toggle {
  display: none; background: none; border: none; font-size: 1.6rem;
  cursor: pointer; color: var(--ink);
}

.nav-links {
  display: flex; gap: 6px; list-style: none; align-items: center;
}
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-weight: 700;
  padding: 8px 14px; border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--bg); color: var(--ink); }
.nav-links a.nav-cta { background: var(--red); color: #fff; }
.nav-links a.nav-cta:hover { background: var(--red-dark); }

/* ====== Hero ====== */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,203,5,0.25), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(238,21,21,0.15), transparent 40%),
    linear-gradient(160deg, var(--blue-dark), var(--blue));
  color: #fff;
  padding: 90px 0;
  text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
.hero .accent { color: var(--yellow); }
.hero-sub {
  max-width: 640px; margin: 1.2rem auto 2rem;
  font-size: 1.1rem; opacity: 0.92;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.btn-primary:hover { background: #ffd83d; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }

/* ====== Sekce ====== */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--border); }
.section-intro { max-width: 720px; color: var(--ink-soft); margin-bottom: 2rem; }

.two-col {
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 32px; align-items: start;
}

.fact-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  border-top: 4px solid var(--yellow);
}
.fact-card ul { list-style: none; }
.fact-card li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.fact-card li:last-child { border-bottom: none; }

/* ====== Timeline ====== */
.timeline { position: relative; margin-top: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 44px; top: 8px; bottom: 8px;
  width: 3px; background: var(--border); border-radius: 3px;
}
.tl-item { display: flex; gap: 26px; margin-bottom: 26px; position: relative; }
.tl-year {
  flex: 0 0 92px; text-align: center; font-weight: 900; color: #fff;
  background: var(--red); border-radius: 999px; padding: 6px 0;
  height: fit-content; box-shadow: var(--shadow); z-index: 1;
}
.tl-body {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; flex: 1;
}

/* ====== Hodnota ====== */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px; margin-bottom: 2.5rem;
}
.info-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.info-icon { font-size: 1.8rem; margin-bottom: 8px; }
.info-card p { color: var(--ink-soft); font-size: 0.95rem; }

.value-example {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.chart { margin-top: 1.2rem; display: grid; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { flex: 0 0 46px; font-weight: 800; color: var(--ink-soft); font-size: 0.9rem; }
.bar {
  height: 30px; border-radius: 6px; min-width: 60px; width: var(--w);
  background: linear-gradient(90deg, var(--blue), var(--red));
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 10px; color: #fff; font-size: 0.82rem; font-weight: 800;
  white-space: nowrap;
}
.chart-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1rem; }

/* ====== Spojnicový graf ====== */
.line-chart { width: 100%; height: auto; margin-top: 1rem; }
.line-chart .grid line { stroke: var(--border); stroke-width: 1; }
.line-chart .grid text { fill: var(--ink-soft); font-size: 11px; text-anchor: end; font-family: inherit; }
.line-chart .line-stroke { fill: none; stroke: var(--red); stroke-width: 3; stroke-linejoin: round; }
.line-chart .line-fill { fill: rgba(238, 21, 21, 0.09); stroke: none; }
.line-chart .dots circle { fill: #fff; stroke: var(--red); stroke-width: 3; }
.line-chart .x-labels text { fill: var(--ink-soft); font-size: 11px; text-anchor: middle; font-weight: 700; font-family: inherit; }
.line-chart .peak-label { fill: var(--red); font-size: 11px; text-anchor: middle; font-weight: 800; font-family: inherit; }

/* ====== Průvodce sběratele ====== */
.guide-block { margin-top: 2.5rem; }
.guide-block > h3 { font-size: 1.35rem; margin-bottom: 1rem; }
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px; margin-top: 1rem;
}
.guide-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.guide-card h4 { margin-bottom: 6px; font-size: 1rem; }
.guide-card p { color: var(--ink-soft); font-size: 0.93rem; }
.fake-block .guide-card { background: #fff5f5; border-color: #f3d2d2; }
.school-block .guide-card { background: #f0f6ff; border-color: #cfe0f5; }
.check-list { list-style: none; margin-top: 0.5rem; }
.check-list li {
  padding: 10px 0 10px 32px; position: relative;
  border-bottom: 1px dashed var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "✔"; position: absolute; left: 4px; color: var(--blue);
  font-weight: 900;
}

/* ====== Symboly vzácnosti ====== */
.rarity-legend { list-style: none; margin: 6px 0 10px; }
.rarity-legend li { padding: 3px 0; color: var(--ink-soft); font-size: 0.95rem; }
.rarity-sym {
  display: inline-block; width: 1.5em; text-align: center;
  font-style: normal; color: var(--ink); font-size: 1.05em;
}

/* ====== Odkazy na obchody ====== */
.shop-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 0.8rem; }
.shop-links a {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  background: var(--bg); border: 2px solid var(--blue);
  color: var(--blue-dark); font-weight: 800; font-size: 0.9rem;
  text-decoration: none; transition: background 0.15s, transform 0.12s;
}
.shop-links a:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }

/* ====== Ikony obalů ====== */
.obal-cell { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.obal-icon { width: 40px; height: 52px; flex: none; }
.oi-card { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.6; }
.oi-sleeve { fill: rgba(42, 117, 187, 0.12); stroke: var(--blue); stroke-width: 1.4; }
.oi-saver { fill: rgba(42, 117, 187, 0.10); stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; }
.oi-toploader { fill: none; stroke: var(--blue); stroke-width: 3.2; }
.oi-magnet { fill: rgba(31, 36, 48, 0.05); stroke: var(--ink); stroke-width: 3.6; }
.oi-dot { fill: var(--ink); }
.oi-binder { fill: rgba(42, 117, 187, 0.14); stroke: var(--blue-dark); stroke-width: 2.4; }
.oi-zip { fill: none; stroke: var(--yellow); stroke-width: 1.4; stroke-dasharray: 3 2.5; }
.oi-spine { stroke: var(--blue-dark); stroke-width: 1.6; }
.oi-mini { fill: #fff; stroke: var(--blue-dark); stroke-width: 1.2; }
.oi-label { fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.oi-labelline { stroke: var(--red); stroke-width: 2; stroke-linecap: round; }
.oi-grade { fill: var(--red); }

/* ====== Blogový článek ====== */
.article-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  margin-top: 2rem; max-width: 820px;
}
.article-box h3 { font-size: 1.35rem; }
.article-box h4 { margin: 1.2rem 0 0.4rem; font-size: 1.05rem; }
.article-box p { color: var(--ink-soft); }
.article-lead { font-size: 1.05rem; font-weight: 700; color: var(--ink) !important; }

/* ====== Desatero ====== */
.commandments {
  list-style: none; counter-reset: cmd; margin-top: 1rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 22px;
}
.commandments li {
  counter-increment: cmd; position: relative;
  padding: 10px 12px 10px 52px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; font-size: 0.94rem;
}
.commandments li::before {
  content: counter(cmd); position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--yellow); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; border: 2px solid var(--ink);
}

/* ====== Slovníček ====== */
.glossary-group { margin-top: 2.2rem; }
.glossary-group > h3 { font-size: 1.25rem; margin-bottom: 0.9rem; }
.glossary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.term-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  border-left: 4px solid var(--yellow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.term-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-left-color: var(--red); }
.term-card dt { font-weight: 900; margin-bottom: 4px; }
.term-card dd { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

/* ====== Tabulka sad ====== */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
.sets-table {
  width: 100%; border-collapse: collapse; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); font-size: 0.93rem; min-width: 640px;
}
.sets-table th {
  background: var(--blue-dark); color: #fff; text-align: left;
  padding: 12px 14px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.sets-table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.sets-table tbody tr:nth-child(even) { background: var(--bg); }
.avail {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 800; margin-right: 6px; white-space: nowrap;
}
.avail-no { background: #fdeaea; color: #a41111; }
.avail-part { background: #fff3d6; color: #8a6100; }
.avail-yes { background: #e3f6e8; color: #157235; }

.tips-box {
  background: #fffbe8; border: 1px solid #f2e3a0;
  border-radius: var(--radius); padding: 26px;
}
.tips-box ol { padding-left: 1.3rem; }
.tips-box li { margin: 8px 0; }

/* ====== Vyhledávač ====== */
.section-dark {
  background: linear-gradient(160deg, #171b26, #232a3d);
  color: #eef0f6;
}
.section-dark .section-intro { color: #b8bfd3; }

.search-form {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.search-form input, .search-form select {
  padding: 13px 18px; border-radius: 999px; border: 2px solid transparent;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  background: #fff; color: var(--ink); outline: none;
}
.search-form input { flex: 1 1 260px; }
.search-form input:focus, .search-form select:focus { border-color: var(--yellow); }

.quick-picks { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 0.9rem; color: #b8bfd3; }
.chip {
  background: rgba(255,255,255,0.1); color: #eef0f6; border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 0.85rem; transition: background 0.15s;
}
.chip:hover { background: rgba(255,255,255,0.22); }

.search-status { margin: 22px 0 6px; font-weight: 700; min-height: 1.4em; }
.search-status.error { color: #ff8d8d; }

.results-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px; margin-top: 14px;
}

.result-card {
  background: #fff; color: var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  cursor: pointer; transition: transform 0.15s;
  display: flex; flex-direction: column;
}
.result-card:hover { transform: translateY(-4px); }
.result-card img { width: 100%; display: block; aspect-ratio: 63/88; object-fit: contain; background: #f0f1f5; }
.result-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.result-name { font-weight: 900; font-size: 1rem; }
.result-set { font-size: 0.8rem; color: var(--ink-soft); }
.result-price { margin-top: auto; padding-top: 8px; font-weight: 900; color: var(--blue-dark); font-size: 1.05rem; }
.result-price small { display: block; font-weight: 600; color: var(--ink-soft); font-size: 0.75rem; }

.load-more-wrap { text-align: center; margin-top: 28px; }
.section-dark .btn-ghost { color: #eef0f6; }

.disclaimer { margin-top: 30px; font-size: 0.82rem; color: #8f97ad; }

/* ====== Modal ====== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,12,18,0.75); }
.modal-content {
  position: relative; background: #fff; color: var(--ink);
  border-radius: var(--radius); max-width: 760px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; font-size: 1rem; font-weight: 700;
}
.modal-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.modal-grid img { width: 100%; border-radius: 10px; }
.price-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.92rem; }
.price-table th, .price-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.price-table th { background: var(--bg); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.modal-meta { font-size: 0.9rem; color: var(--ink-soft); margin-top: 6px; }

/* ====== Patička ====== */
.site-footer {
  background: #12151e; color: #8f97ad; padding: 26px 0;
  font-size: 0.85rem; text-align: center;
}

/* ====== Hravé detaily ====== */

/* zvýrazňovač pod nadpisy sekcí */
.section h2 {
  display: inline-block; position: relative; z-index: 0;
}
.section h2::after {
  content: ""; position: absolute; z-index: -1;
  left: -6px; right: -6px; bottom: 4px; height: 0.45em;
  background: var(--yellow); opacity: 0.55;
  border-radius: 4px; transform: rotate(-1deg);
}
.section-dark h2::after { opacity: 0.35; }

/* poletující pokébaly v hero */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 18%, rgba(255,255,255,0.9) 18% 30%, transparent 30%),
    linear-gradient(to bottom, rgba(238,21,21,0.85) 0 45%, rgba(20,22,30,0.9) 45% 55%, rgba(255,255,255,0.9) 55% 100%);
  opacity: 0.18; pointer-events: none;
}
.hero::before {
  width: 190px; height: 190px; top: -40px; left: 4%;
  animation: float 7s ease-in-out infinite;
}
.hero::after {
  width: 120px; height: 120px; bottom: -25px; right: 6%;
  animation: float 9s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(18px) rotate(10deg); }
}

/* logo se roztočí */
.logo .pokeball { transition: transform 0.4s; }
.logo:hover .pokeball { transform: rotate(360deg); }

/* karty poskočí a natočí se */
.info-card, .guide-card {
  transition: transform 0.18s, box-shadow 0.18s;
}
.info-card:hover, .guide-card:hover {
  transform: translateY(-5px) rotate(-0.7deg);
  box-shadow: 0 10px 26px rgba(31, 36, 48, 0.14);
}
.result-card:hover { transform: translateY(-5px) rotate(0.8deg); box-shadow: 0 12px 28px rgba(0,0,0,0.45); }

/* roky na timeline */
.tl-item:hover .tl-year { animation: wiggle 0.4s ease-in-out; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

/* barevné chipy podle typů Pokémonů */
.chip { transition: transform 0.15s, background 0.15s; }
.chip:hover { transform: translateY(-3px) scale(1.06); }
.chip:nth-child(2) { border-color: #ff9c54; }  /* oheň */
.chip:nth-child(3) { border-color: #f9cf30; }  /* elektřina */
.chip:nth-child(4) { border-color: #a284a2; }  /* temnota */
.chip:nth-child(5) { border-color: #60a5fa; }  /* drak */
.chip:nth-child(6) { border-color: #b567ce; }  /* duch */

/* tlačítka pruží */
.btn:active { transform: scale(0.96); }

/* jemný tečkovaný podklad světlých sekcí */
.section-alt {
  background-image: radial-gradient(rgba(42, 117, 187, 0.07) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
  .tl-item:hover .tl-year { animation: none; }
  .info-card, .guide-card, .result-card, .chip, .btn, .logo .pokeball { transition: none; }
  html { scroll-behavior: auto; }
}

/* ====== Responsivita ====== */
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-grid img { max-width: 260px; margin: 0 auto; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    width: 100%; padding-bottom: 12px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; text-align: center; }

  .timeline::before { left: 20px; }
  .tl-item { flex-direction: column; gap: 8px; padding-left: 44px; }
  .tl-year { position: absolute; left: 0; flex: none; width: 70px; font-size: 0.85rem; }
  .tl-item { min-height: 40px; }
}
