:root {
  color-scheme: dark;
  --bg: #101216;
  --card: #f6f7f9;
  --image-bg: #eceef2;
  --line: #303849;
  --text: #f2f5f8;
  --card-text: #080a10;
  --muted: #a9b3c2;
  --card-muted: #33394a;
  --blue: #f2b84b;
  --green: #46c2a0;
  --red: #ef6f6c;
  --accent: #f5b63f;
  --panel: #191d24;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(70, 194, 160, 0.14), transparent 36%),
    linear-gradient(240deg, rgba(242, 184, 75, 0.12), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  border-bottom: 1px solid rgba(245, 182, 63, 0.18);
  background: rgba(16, 18, 22, 0.94);
  backdrop-filter: blur(10px);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100vw - 40px));
  min-height: 60px;
  margin: 0 auto;
}

.brand-link,
.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.brand-link {
  flex: 0 0 auto;
  font-size: 1.18rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.nav-links .nav-play {
  min-width: 78px;
  padding: 9px 16px;
  background: var(--accent);
  color: #1a1305;
  text-align: center;
  box-shadow: 0 10px 24px rgba(245, 182, 63, 0.22);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.brand-link:hover,
.brand-link:focus-visible {
  color: var(--text);
}

.nav-links .nav-play:hover,
.nav-links .nav-play:focus-visible {
  background: #ffd36f;
  color: #1a1305;
}

.nav-links .nav-active:not(.nav-play) {
  background: rgba(245, 182, 63, 0.14);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(245, 182, 63, 0.3);
}

.nav-links .nav-play.nav-active {
  background: #ffd36f;
  box-shadow:
    0 10px 24px rgba(245, 182, 63, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.app-shell {
  width: min(1280px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  margin-bottom: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.scorebar {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 8px;
  min-width: min(270px, 100%);
}

.scorebar div {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 29, 36, 0.9);
  box-shadow: var(--shadow);
}

.scorebar span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.scorebar strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.45rem;
}

.hidden {
  display: none;
}

.board {
  display: grid;
  grid-template-columns: minmax(340px, 410px) minmax(150px, 190px) minmax(340px, 410px);
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2vw, 28px);
}

.fighter {
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto;
  min-height: clamp(540px, 72vh, 650px);
  min-width: 0;
  padding: 30px 28px 24px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--card-text);
  text-align: center;
}

.choice-card {
  cursor: pointer;
  outline: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.choice-card:hover,
.choice-card:focus-visible {
  transform: translateY(-4px) scale(1.015);
  border-color: var(--accent);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.28),
    0 0 0 4px rgba(245, 182, 63, 0.16);
  animation: card-breathe 1.65s ease-in-out infinite;
}

.choice-card.disabled {
  cursor: default;
  pointer-events: none;
  filter: saturate(0.85);
}

@keyframes card-breathe {
  0%,
  100% {
    box-shadow:
      0 18px 38px rgba(0, 0, 0, 0.28),
      0 0 0 4px rgba(245, 182, 63, 0.14);
  }

  50% {
    box-shadow:
      0 22px 46px rgba(0, 0, 0, 0.34),
      0 0 0 7px rgba(245, 182, 63, 0.22);
  }
}

.fighter-info {
  min-height: 84px;
}

h2 {
  min-height: 1.25em;
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.fighter-title {
  min-height: 1.25em;
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.note {
  min-height: 2.4em;
  margin: 0;
  color: var(--card-muted);
  font-size: 0.92rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.image-frame {
  display: grid;
  place-items: center;
  align-self: center;
  width: 100%;
  height: clamp(280px, 42vh, 360px);
  border-radius: 8px;
  background: var(--image-bg);
  overflow: hidden;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.image-fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-weight: 800;
}

.image-frame.no-image img {
  display: none;
}

.image-frame.no-image .image-fallback {
  display: grid;
}

.count {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 78px;
  margin-top: 16px;
}

.count strong {
  color: var(--green);
  font-size: clamp(2.45rem, 4.2vw, 3.6rem);
  line-height: 0.95;
}

.count span {
  color: var(--card-muted);
}

.hidden-count strong {
  color: #45439b;
}

.feedback-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.versus-panel {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.versus-panel p {
  margin: 0;
  color: var(--blue);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 1000;
}

.versus-panel strong {
  color: var(--red);
  font-size: clamp(3rem, 6vw, 3.8rem);
  line-height: 1;
}

.feedback {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 9, 12, 0.66);
  backdrop-filter: blur(6px);
}

.feedback.hidden {
  display: none;
}

.feedback-panel {
  width: min(520px, 100%);
  border: 2px solid var(--line);
  border-radius: 10px;
  background: rgba(25, 29, 36, 0.98);
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--text);
  text-align: center;
}

.feedback.good .feedback-panel {
  border-color: rgba(8, 112, 0, 0.8);
}

.feedback.bad .feedback-panel {
  border-color: rgba(163, 0, 0, 0.78);
}

.feedback-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 900;
}

.feedback.good .feedback-kicker,
.feedback.good .feedback-title {
  color: var(--green);
}

.feedback.bad .feedback-kicker,
.feedback.bad .feedback-title {
  color: var(--red);
}

.feedback-title {
  min-height: 0;
  margin: 0 0 12px;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
}

.feedback p {
  overflow-wrap: anywhere;
}

.feedback-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.feedback-stats span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.feedback-stats strong {
  color: var(--text);
  font-size: 1.55rem;
}

.feedback-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feedback-actions button:first-child {
  background: var(--accent);
  color: #1a1305;
}

.feedback-actions button:last-child {
  background: #27283a;
  color: white;
}

.seo-content,
.content-shell {
  width: min(920px, 100%);
  margin: 48px auto 0;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.seo-content article,
.seo-panel,
.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 29, 36, 0.9);
  box-shadow: var(--shadow);
  padding: 20px;
}

.seo-content h2,
.content-card h1,
.content-card h2 {
  margin: 0 0 12px;
}

.seo-content h3,
.content-card h3 {
  margin: 18px 0 8px;
}

.seo-content p,
.seo-content li,
.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.65;
}

.seo-content a,
.content-card a {
  color: var(--accent);
}

.content-cta {
  margin-top: 24px;
}

.content-card .content-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1305;
  font-weight: 900;
  text-decoration: none;
}

.seo-panel {
  margin-top: 14px;
}

.content-shell {
  padding-bottom: 36px;
  padding-top: 10px;
}

.content-card {
  max-width: 860px;
  margin: 0 auto;
}

.site-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 12px 0 32px;
}

.findly-badge,
.footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.findly-badge img,
.footer-badge img {
  display: block;
  max-width: 100%;
  height: auto;
}

.footer-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(245, 182, 63, 0.28);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.footer-text-link:hover,
.footer-text-link:focus-visible {
  border-color: rgba(245, 182, 63, 0.48);
  color: #ffd36f;
}

.content-card h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.content-meta {
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.content-card ul,
.content-card ol,
.seo-content ol {
  padding-left: 1.35rem;
}

@media (max-width: 900px) {
  .primary-nav {
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 8px 0;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 4px 0 8px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  .scorebar {
    min-width: 0;
  }

  .board {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .fighter {
    min-height: 0;
    padding: 22px 18px 18px;
  }

  .image-frame {
    height: clamp(220px, 54vw, 340px);
  }

  .versus-panel {
    gap: 8px;
    padding: 2px 0;
  }
}

@media (max-width: 540px) {
  .primary-nav {
    width: min(100vw - 24px, 1180px);
    gap: 10px;
  }

  .brand-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .nav-links a {
    padding: 7px 9px;
    font-size: 0.88rem;
  }

  .nav-links .nav-play {
    min-width: 68px;
    padding: 8px 14px;
  }

  .app-shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 12px;
  }

  .scorebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scorebar div {
    min-height: 62px;
    padding: 10px;
  }

  .scorebar strong {
    font-size: 1.25rem;
  }

  .board {
    gap: 10px;
  }

  .fighter {
    padding: 18px 14px 16px;
  }

  .fighter-info {
    min-height: 64px;
  }

  .fighter-title {
    margin-bottom: 8px;
    font-size: 1.25rem;
  }

  .note {
    min-height: 1.4em;
    font-size: 0.86rem;
  }

  .image-frame {
    height: clamp(190px, 52vw, 280px);
  }

  .count {
    min-height: 58px;
    margin-top: 12px;
  }

  .count strong {
    font-size: 2.5rem;
  }

  .versus-panel {
    gap: 4px;
  }

  .versus-panel strong {
    font-size: 2.35rem;
  }

  .feedback-actions,
  .feedback-stats,
  .seo-grid {
    grid-template-columns: 1fr;
  }
}
