*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #1f2340;
  background: #f4f6fb;
}

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

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

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 20px;
  top: 20px;
  z-index: 1000;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
}

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

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid rgba(31, 35, 64, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 78px;
}

.site-logo {
  flex-shrink: 0;
}

.site-logo img {
  width: 140px;
  height: auto;
}

.site-nav {
  margin-left: auto;
}

.nav-list,
.mobile-nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  list-style: none;
}

.nav-link {
  font-size: 15px;
  font-weight: 700;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: #3554ff;
}

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

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: #ff5757;
}

.btn-outline {
  color: #ffffff;
  background: #39d85d;
}

.btn-secondary {
  color: #ffffff;
  background: #3554ff;
}

.btn-full {
  width: 100%;
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: #1f2340;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.is-active span:nth-child(2) {
  opacity: 0;
}

.burger.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(31, 35, 64, 0.08);
}

.mobile-menu__inner {
  padding: 20px 16px 24px;
}

.mobile-menu__actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

/* hero */
.hero {
  padding: 28px 0 18px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, #2938d5 0%, #4a3aff 100%);
  border-radius: 28px;
  padding: 28px;
  overflow: hidden;
}

.hero-content {
  color: #ffffff;
}

.hero-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  margin: 0 0 14px;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
}

.hero-text {
  margin: 0 0 22px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.6;
}

.hero-btn {
  min-width: 190px;
}

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

.hero-card {
  min-height: 120px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.hero-card--lg {
  grid-column: span 2;
  min-height: 170px;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* games section */
.games-section {
  padding: 26px 0 20px;
}

.games-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

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

.games-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.games-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.games-category {
  position: relative;
  font-size: 14px;
  font-weight: 700;
  color: #5d6386;
  transition: color 0.25s ease;
}

.games-category:hover,
.games-category.is-active {
  color: #3554ff;
}

.games-category.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: #3554ff;
}

.games-search {
  width: 280px;
  flex-shrink: 0;
}

.games-search input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(31, 35, 64, 0.1);
  border-radius: 999px;
  background: #ffffff;
  padding: 0 18px;
  outline: none;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  min-width: 0;
}

.game-card__link {
  display: block;
}

.game-card__image {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #dfe5fb;
}

.game-card__image img {
  width: 100%;
  aspect-ratio: 1.62 / 1;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  opacity: 0;
  background: linear-gradient(to top, rgba(22, 28, 60, 0.82), rgba(22, 28, 60, 0.12));
  transition: opacity 0.3s ease;
}

.game-card__badge {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.game-card__play {
  align-self: center;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 150px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: #39d85d;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  transform: translateY(12px);
  transition: transform 0.3s ease;
}

.game-card:hover .game-card__overlay {
  opacity: 1;
}

.game-card:hover .game-card__play {
  transform: translateY(0);
}

.game-card:hover .game-card__image img {
  transform: scale(1.06);
}

.game-card__title {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: #2e355c;
}

/* promo banner */
.promo-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
  margin-top: 32px;
  padding: 26px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(22, 28, 60, 0.08);
}

.promo-banner__title {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  color: #1f2340;
}

.promo-banner__content p {
  margin: 0 0 20px;
  color: #5f678f;
  line-height: 1.6;
}

.promo-banner__image img {
  max-height: 220px;
  margin-left: auto;
}

/* sidebar */
.games-sidebar {
  display: grid;
  gap: 18px;
}

.sidebar-card {
  padding: 22px;
  background: #17328f;
  color: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(22, 28, 60, 0.12);
}

.sidebar-card--accent {
  background: linear-gradient(180deg, #1541bd 0%, #1f5eff 100%);
}

.sidebar-card__title {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.sidebar-card p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
}

.sidebar-card img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  margin: 16px 0 18px;
}

.leaderboard {
  margin: 16px 0 18px;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

/* content */
.content-placeholder {
  padding: 40px 0 60px;
}

.content-placeholder .container {
  padding: 28px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(22, 28, 60, 0.08);
}

.content-placeholder h1 {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.2;
}

.content-placeholder p {
  margin: 0;
  max-width: 900px;
  color: #5f678f;
  line-height: 1.7;
}

/* footer */
.site-footer {
  background: #18388f;
  color: #ffffff;
  margin-top: 20px;
}

.footer-top {
  padding: 28px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-payments {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-bottom: 22px;
}

.footer-payments img {
  max-height: 28px;
  object-fit: contain;
}

.footer-apps {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.footer-apps img {
  max-height: 44px;
}

.footer-bottom {
  padding: 28px 0 34px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 70px;
}

.footer-column {
  display: grid;
  gap: 14px;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.92);
  transition: opacity 0.25s ease;
}

.footer-column a:hover {
  opacity: 0.75;
}

/* responsive */
@media (max-width: 1199px) {
  .hero-title {
    font-size: 34px;
  }

  .games-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

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

@media (max-width: 991px) {
  .site-nav,
  .header-actions {
    display: none;
  }

  .burger {
    display: flex;
    margin-left: auto;
  }

  .mobile-menu.is-open {
    display: block;
  }

  .mobile-nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .games-layout {
    grid-template-columns: 1fr;
  }

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

  .promo-banner {
    grid-template-columns: 1fr;
  }

  .promo-banner__image img {
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .container {
    width: min(100% - 24px, 1240px);
  }

  .header-inner {
    min-height: 70px;
  }

  .site-logo img {
    width: 124px;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-inner {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-text {
    font-size: 15px;
  }

  .hero-media {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hero-card--lg {
    min-height: 140px;
  }

  .games-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .games-search {
    width: 100%;
  }

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

  .games-sidebar {
    grid-template-columns: 1fr;
  }

  .promo-banner {
    padding: 20px;
  }

  .promo-banner__title {
    font-size: 24px;
  }

  .content-placeholder {
    padding: 28px 0 40px;
  }

  .content-placeholder .container {
    padding: 22px;
  }

  .content-placeholder h1 {
    font-size: 26px;
  }

  .footer-links {
    justify-content: flex-start;
    flex-direction: column;
    gap: 22px;
  }
}

@media (max-width: 479px) {
  .btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 13px;
  }

  .hero-title {
    font-size: 24px;
  }

  .games-categories {
    gap: 10px 14px;
  }

  .games-category {
    font-size: 13px;
  }

  .game-card__play {
    min-width: 118px;
    min-height: 42px;
    font-size: 14px;
  }

  .sidebar-card {
    padding: 18px;
    border-radius: 20px;
  }

  .sidebar-card__title {
    font-size: 20px;
  }
}

.content-placeholder {
  padding: 40px 0 60px;
}

.content-placeholder .container {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(22, 28, 60, 0.08);
  padding: 32px;
  overflow: hidden;
}

/* общий текст */
.content-placeholder .container h1,
.content-placeholder .container h2,
.content-placeholder .container h3,
.content-placeholder .container p,
.content-placeholder .container ul,
.content-placeholder .container ol,
.content-placeholder .container table,
.content-placeholder .container blockquote,
.content-placeholder .container img {
  margin-top: 0;
}

.content-placeholder .container h1 {
  margin-bottom: 20px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  color: #1f2340;
}

.content-placeholder .container h2 {
  margin-bottom: 16px;
  margin-top: 34px;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 800;
  color: #24305e;
}

.content-placeholder .container h3 {
  margin-bottom: 14px;
  margin-top: 28px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: #2f3c70;
}

.content-placeholder .container p {
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.8;
  color: #4f597d;
}

.content-placeholder .container strong {
  font-weight: 700;
  color: #1f2340;
}

.content-placeholder .container em {
  font-style: italic;
  color: #3554ff;
}

.content-placeholder .container ul,
.content-placeholder .container ol {
  margin-bottom: 22px;
  padding-left: 22px;
  color: #4f597d;
}

.content-placeholder .container li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.7;
}

.content-placeholder .container ul li::marker,
.content-placeholder .container ol li::marker {
  color: #3554ff;
  font-weight: 700;
}

.content-placeholder .container blockquote {
  margin: 26px 0;
  padding: 20px 22px;
  border-left: 4px solid #3554ff;
  background: #f5f8ff;
  border-radius: 16px;
  font-size: 17px;
  line-height: 1.7;
  color: #2f3c70;
}

/* картинки */
.content-placeholder .container img {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 26px 0 6px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 36px rgba(22, 28, 60, 0.12);
}

/* таблица */
.content-placeholder .container table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(22, 28, 60, 0.08);
  white-space: nowrap;
}

.content-placeholder .container thead {
  background: #3554ff;
  color: #ffffff;
}

.content-placeholder .container tbody {
  background: #ffffff;
}

.content-placeholder .container tr {
  border-bottom: 1px solid rgba(31, 35, 64, 0.08);
}

.content-placeholder .container th,
.content-placeholder .container td {
  padding: 14px 16px;
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
}

.content-placeholder .container th {
    width: 1%;
  font-weight: 700;
}

.content-placeholder .container td {
  color: #4f597d;
}

/* чтобы таблица на мобилке скроллилась нормально */
.content-placeholder .container table::-webkit-scrollbar {
  height: 8px;
}

.content-placeholder .container table::-webkit-scrollbar-thumb {
  background: rgba(53, 84, 255, 0.35);
  border-radius: 999px;
}

.content-placeholder .container table::-webkit-scrollbar-track {
  background: rgba(31, 35, 64, 0.06);
  border-radius: 999px;
}

/* адаптив */
@media (max-width: 767px) {
  .content-placeholder {
    padding: 28px 0 40px;
  }

  .content-placeholder .container {
    padding: 22px;
    border-radius: 18px;
  }

  .content-placeholder .container h1 {
    font-size: 28px;
  }

  .content-placeholder .container h2 {
    font-size: 23px;
    margin-top: 28px;
  }

  .content-placeholder .container h3 {
    font-size: 20px;
    margin-top: 24px;
  }

  .content-placeholder .container p,
  .content-placeholder .container li,
  .content-placeholder .container th,
  .content-placeholder .container td,
  .content-placeholder .container blockquote {
    font-size: 15px;
  }

  .content-placeholder .container img {
    border-radius: 16px;
  }
}

@media (max-width: 479px) {
  .content-placeholder .container {
    padding: 18px;
  }

  .content-placeholder .container h1 {
    font-size: 24px;
  }

  .content-placeholder .container h2 {
    font-size: 21px;
  }

  .content-placeholder .container h3 {
    font-size: 18px;
  }

  .content-placeholder .container p,
  .content-placeholder .container li {
    line-height: 1.75;
  }

  .content-placeholder .container th,
  .content-placeholder .container td {
    padding: 12px 14px;
    font-size: 14px;
  }
}