:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --muted: #64748b;
  --line: #d9e1ea;
  --navy: #102033;
  --navy-2: #18334f;
  --green: #0f766e;
  --red: #c24135;
  --amber: #b7791f;
  --blue: #2563eb;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 4vw, 56px);
  margin-bottom: 14px;
}

h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

button,
select,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  font-weight: 850;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
}

.top-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
}

.top-nav a {
  color: #253244;
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 13px;
  font-weight: 750;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: #edf2f7;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 9px;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
}

.button.small {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.button.primary {
  background: var(--red);
  color: #fff;
}

.button.primary:hover {
  background: #a9372e;
}

.button.secondary {
  background: #edf2f7;
  color: var(--navy);
  border-color: #d5dee8;
}

.button.light {
  background: #ffffff;
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.button.full {
  width: 100%;
}

.site-main {
  min-height: 72vh;
}

.home-hero {
  padding: 34px 0;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(7, 13, 24, 0.66) 0%, rgba(9, 18, 31, 0.34) 46%, rgba(73, 30, 11, 0.08) 100%),
    linear-gradient(180deg, rgba(188, 64, 38, 0.12), rgba(8, 15, 27, 0.34)),
    url("../images/hero-worldcup-trophy-2026-vibrant.webp") right center / cover no-repeat;
  background-color: var(--navy);
}

.home-hero-grid,
.report-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-match-card,
.report-score-box {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(6, 13, 24, 0.8) 0%, rgba(8, 17, 30, 0.48) 52%, rgba(86, 33, 12, 0.08) 100%),
    url("../images/hero-worldcup-trophy-2026-vibrant.webp") right center / cover no-repeat;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2), inset 0 0 86px rgba(255, 190, 72, 0.1);
}

.home-hero h1,
.home-hero .lead,
.hero-copy .eyebrow {
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.58);
}

.hero-match-card {
  background: #fff;
  color: var(--text);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.lead {
  max-width: 760px;
  color: #334155;
  font-size: 18px;
}

.home-hero .lead {
  color: #dbe7f3;
}

.page-hero,
.report-hero {
  padding: 34px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.report-hero {
  color: #fff;
  background:
    linear-gradient(115deg, rgba(16, 32, 51, 0.98), rgba(15, 118, 110, 0.82)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 88px);
}

.report-hero .lead {
  color: #e7eef7;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  padding: 24px 0 36px;
}

.main-column {
  min-width: 0;
}

.sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 82px;
}

.panel,
.card,
.side-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.card {
  padding: 16px;
}

.side-block {
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head.compact {
  align-items: center;
  margin-bottom: 10px;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head span,
.muted,
.mini-note {
  color: var(--muted);
  font-size: 13px;
}

.notice-bar,
.model-notice,
.data-error {
  border: 1px solid #f1c98f;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c3f00;
  padding: 10px 12px;
  font-weight: 700;
}

.notice-bar.dark {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff7ed;
}

.data-error {
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0;
}

.card-grid {
  display: grid;
  gap: 14px;
}

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

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-topline,
.meta-strip,
.metric-grid,
.team-strip,
.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.card-topline {
  justify-content: space-between;
  margin-bottom: 10px;
}

.sample-chip,
.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.sample-chip {
  background: #eef2f7;
  color: #344055;
}

.risk-badge {
  color: #fff;
}

.risk-low {
  background: var(--green);
}

.risk-medium {
  background: var(--amber);
}

.risk-high {
  background: var(--red);
}

.probability-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.probability-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 13px;
}

.bar {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: #e6edf3;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: var(--blue);
}

.probability-row.home .bar span {
  background: var(--green);
}

.probability-row.draw .bar span {
  background: var(--amber);
}

.probability-row.away .bar span {
  background: var(--red);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.metric-grid.wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-pill {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}

.stat-pill span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.stat-pill strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.match-card p,
.team-card p,
.group-card p,
.news-card p,
.odds-card p {
  color: #465668;
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-row,
.board-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: var(--surface-2);
}

.rank-row:hover,
.board-row:hover {
  text-decoration: none;
  border-color: #b8c6d6;
}

.rank-row > span,
.board-index {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 850;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.board-row h3,
.board-row p {
  margin-bottom: 0;
}

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

.odds-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.odds-row {
  display: grid;
  grid-template-columns: 30px 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #e8eef5;
}

.odds-row strong {
  color: var(--green);
}

.odds-row em {
  color: var(--muted);
  font-style: normal;
  text-decoration: line-through;
}

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

.report-score-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.report-score-box span,
.report-score-box em {
  color: #dbe7f3;
  font-style: normal;
}

.report-score-box strong {
  display: block;
  margin: 8px 0;
  font-size: 58px;
}

.detail-section p,
.article-panel p {
  color: #334155;
  font-size: 16px;
}

.cta-panel {
  background: #102033;
  color: #fff;
}

.cta-panel p {
  color: #d7e2ee;
}

.rating-line {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 5px;
  font-weight: 800;
}

.team-strip a {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--navy);
  background: #fff;
  font-weight: 800;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
}

.clean-list li + li {
  margin-top: 7px;
}

.latest-news-block {
  box-shadow: none;
}

.side-news-list {
  display: grid;
  gap: 10px;
}

.side-news-item {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.side-news-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.side-news-item a {
  display: block;
  color: var(--text);
}

.side-news-item a:hover {
  color: var(--blue);
  text-decoration: none;
}

.side-news-item strong {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.side-news-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.side-news-meta span {
  font-weight: 750;
}

.qr-small {
  width: min(100%, 190px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  object-fit: contain;
}

.telegram-mark {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 8px;
  background: #e8f2ff;
  color: #1d4ed8;
  font-size: 46px;
  font-weight: 900;
}

.telegram-mark.small {
  width: 92px;
  height: 92px;
  font-size: 28px;
}

.contact-methods {
  display: grid;
  gap: 14px;
}

.contact-methods > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.contact-methods strong {
  display: block;
  margin-bottom: 8px;
}

.contact-methods img {
  display: block;
  width: min(100%, 320px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  object-fit: contain;
}

.narrow-layout {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 38px;
}

.top-space {
  padding-top: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 24px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: start;
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 8px;
}

.footer-contact {
  color: var(--muted);
  font-size: 13px;
}

.conversion-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 100;
}

.conversion-modal.is-open {
  display: block;
}

.conversion-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.conversion-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(460px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 22px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
}

.popup-contact-block {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
  text-align: center;
}

.popup-contact-block img {
  width: min(100%, 260px);
  height: auto;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  object-fit: contain;
}

.mobile-bottom-cta {
  display: none;
}

@media (max-width: 980px) {
  .site-header-inner {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .top-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .header-actions {
    margin-left: auto;
  }

  .home-hero-grid,
  .report-hero-grid,
  .page-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .card-grid.three,
  .metric-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  h1 {
    font-size: 32px;
  }

  .container,
  .narrow-layout {
    width: min(100% - 24px, 1180px);
  }

  .header-actions .button {
    display: none;
  }

  .card-grid.two,
  .card-grid.three,
  .odds-grid,
  .news-list,
  .metric-grid,
  .metric-grid.wide,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .rank-row,
  .board-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .rank-row em,
  .board-row .button {
    grid-column: 2;
    text-align: left;
  }

  .home-hero,
  .page-hero,
  .report-hero {
    padding: 24px 0;
  }

  .hero-copy,
  .hero-match-card,
  .panel,
  .card,
  .side-block {
    padding: 14px;
  }

  .report-score-box strong {
    font-size: 46px;
  }

  .mobile-bottom-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 48;
    display: block;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .mobile-bottom-cta button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-weight: 850;
  }

  body {
    padding-bottom: 66px;
  }

  .conversion-panel {
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(100% - 24px, 460px);
    max-height: calc(100vh - 92px);
    padding: 18px;
  }
}
