* {
  box-sizing: border-box;
}

:root {
  --bg: #03150c;
  --bg-dark: #020806;
  --green: #0f7a3e;
  --green-light: #20d46b;
  --green-neon: #38ff8b;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(32, 212, 107, 0.25), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(56, 255, 139, 0.12), transparent 34%),
    linear-gradient(180deg, #04180d 0%, #020806 100%);
  color: var(--white);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* EMERGENCY FIX: чтобы любые огромные картинки не ломали сайт */
header img,
.hero img,
.logo img,
.brand img,
.site-logo,
.club-logo,
.main-logo,
.header-logo,
.top-logo {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
}

body > img,
body > a > img {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
}

/* Общий контейнер */
.container,
.section,
.page-section,
.hero,
.content,
.main-content,
.wrapper {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

/* Верх сайта */
header,
.site-header {
  position: relative;
  background:
    linear-gradient(135deg, rgba(2, 8, 6, 0.95), rgba(3, 21, 12, 0.9)),
    radial-gradient(circle at 50% 0%, rgba(56, 255, 139, 0.18), transparent 35%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

header::before,
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.6;
  pointer-events: none;
}

.topbar,
.navbar,
.header-inner,
.header-top {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 0;
}

.logo,
.brand,
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo img,
.brand img,
.site-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(56, 255, 139, 0.45));
}

.logo span,
.brand-name,
.site-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Навигация */
nav,
.main-nav,
.nav-links {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
}

nav a,
.main-nav a,
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  font-weight: 800;
  transition: 0.2s ease;
}

nav a:hover,
.main-nav a:hover,
.nav-links a:hover,
nav a.active,
.main-nav a.active,
.nav-links a.active {
  background: rgba(56, 255, 139, 0.16);
  color: var(--white);
}

/* Языки */
.lang-switch,
.language-switcher {
  display: flex;
  gap: 6px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0;
}

.lang-switch button,
.language-switcher button,
.lang-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 900;
  cursor: pointer;
}

/* Главный экран */
.hero,
.hero-section,
.home-hero {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  padding: 64px 0 90px;
}

.hero-text,
.hero-content,
.hero-info {
  max-width: 720px;
}

.hero h1,
.hero-title,
h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.hero p,
.hero-description,
.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.62;
}

.hero-image,
.hero-logo,
.main-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 35%, rgba(56, 255, 139, 0.22), transparent 36%),
    rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-image img,
.hero-logo img,
.main-visual img {
  width: min(360px, 80%);
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(56, 255, 139, 0.42));
}

/* Если логотип случайно стоит прямо в header без контейнера */
header > img,
.site-header > img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 20px auto;
}

/* Кнопки */
.btn,
.button,
.cta,
.hero-actions a,
.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  margin: 6px 8px 6px 0;
  border-radius: 999px;
  font-weight: 900;
  color: #00140a;
  background: linear-gradient(135deg, var(--green-neon), #b9ffd5);
  box-shadow: 0 0 26px rgba(56, 255, 139, 0.25);
  transition: 0.2s ease;
}

.btn:hover,
.button:hover,
.cta:hover,
.hero-actions a:hover,
.actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(56, 255, 139, 0.38);
}

/* Секции */
main {
  position: relative;
  z-index: 2;
}

section,
.section,
.page-section {
  padding: 76px 0;
}

section h2,
.section h2,
.page-section h2,
h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

section p,
.section p,
.page-section p {
  color: var(--muted);
  line-height: 1.6;
}

/* Карточки */
.card,
.news-card,
.player-card,
.match-card,
.club-card,
.stadium-card,
.store-card,
.product-card,
.media-card,
.next-match-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.22);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card,
.news-card,
.club-card,
.next-match-card {
  padding: 22px;
}

/* Сетки */
.grid,
.cards-grid,
.news-grid,
.players-grid,
.matches-grid,
.stadium-grid,
.store-grid,
.products-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Фото в карточках */
.news-card img,
.player-card img,
.match-card img,
.club-card img,
.stadium-card img,
.store-card img,
.product-card img,
.media-card img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

/* Команда / игроки */
.player-card img {
  height: 320px;
  object-fit: cover;
}

.player-card h3,
.news-card h3,
.stadium-card h3,
.product-card h3,
.store-card h3 {
  margin: 16px 18px 8px;
  font-size: 22px;
}

.player-card p,
.news-card p,
.stadium-card p,
.product-card p,
.store-card p {
  margin: 0 18px 18px;
}

/* Матчи */
.match-card {
  padding: 18px;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.team,
.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.team img,
.match-team img,
.club-cell img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.score,
.match-score {
  min-width: 68px;
  text-align: center;
  color: var(--green-neon);
  font-size: 22px;
  font-weight: 900;
}

/* Таблица */
.table-wrap,
.league-table-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

table,
.league-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--green-neon);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: rgba(255, 255, 255, 0.9);
}

tr:last-child td {
  border-bottom: 0;
}

.club-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

/* Вкладки */
.tabs,
.match-tabs {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-btn,
.tab-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-radius: 999px;
  padding: 11px 17px;
  font-weight: 900;
  cursor: pointer;
}

.tab-btn.active,
.tab-button.active,
.tab-btn:hover,
.tab-button:hover {
  background: var(--green-neon);
  color: #00140a;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Стадион */
.stadium-card img,
.stadium-image,
.stadium-photo {
  height: 280px;
  object-fit: cover;
}

/* Магазин */
.product-card img,
.store-card img {
  height: 260px;
  object-fit: cover;
}

/* Футер */
footer,
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-dark);
  color: var(--muted);
  text-align: center;
  padding: 34px 16px;
}

footer img,
.site-footer img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin: 0 auto 14px;
}

/* Исправление старых дублей навигации */
.mobile-menu,
.hidden {
  display: none;
}

/* Адаптация */
@media (max-width: 980px) {
  .hero,
  .hero-section,
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 44px 0 70px;
  }

  .grid,
  .cards-grid,
  .news-grid,
  .players-grid,
  .matches-grid,
  .stadium-grid,
  .store-grid,
  .products-grid,
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  nav,
  .main-nav,
  .nav-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .topbar,
  .navbar,
  .header-inner,
  .header-top,
  .container,
  .section,
  .page-section,
  .hero,
  .content,
  .main-content,
  .wrapper {
    width: min(100% - 24px, 1180px);
  }

  .grid,
  .cards-grid,
  .news-grid,
  .players-grid,
  .matches-grid,
  .stadium-grid,
  .store-grid,
  .products-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero-title,
  h1 {
    font-size: 42px;
  }

  .hero p,
  .hero-description,
  .lead {
    font-size: 16px;
  }

  .hero-image,
  .hero-logo,
  .main-visual {
    min-height: 260px;
  }

  .hero-image img,
  .hero-logo img,
  .main-visual img {
    max-height: 230px;
  }

  nav a,
  .main-nav a,
  .nav-links a {
    font-size: 14px;
    padding: 8px 11px;
  }

  .match-teams {
    grid-template-columns: 1fr;
  }

  .score,
  .match-score {
    text-align: left;
  }
}