@charset "utf-8";
/* ChillGames.ru — единый стиль сайта. Генерируется в /style.css скриптом build_site.py. */

:root {
  --accent: #c00;
  --accent-dark: #800;
  --accent-bright: #f00;
  --text-muted: #999;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  background: #000 url(/images/bg.png);
}

a {
  text-decoration: none;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Header */

.header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 10px;
}

.logo {
  color: var(--text-muted);
  flex: 0 1 360px;
}

.logo img {
  display: block;
  margin-bottom: 5px;
  max-width: 100%;
  height: auto;
}

.main-menu {
  flex: 0 1 600px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 4px;
}

.main-menu a {
  color: #ccc;
  font-size: 12px;
  background: var(--accent-dark);
  border-radius: 3px;
  padding: 2px 4px;
}

.main-menu a:hover,
.main-menu a.active {
  background: var(--accent-bright);
  color: #fff;
}

/* Content */

.content {
  display: block;
  background: #fff url(/images/left_bg.png) top left no-repeat;
  border-radius: 0 10px 10px 10px;
  margin-top: 30px;
  padding: 20px;
  overflow: hidden;
}

.content img {
  max-width: 100%;
  height: auto;
}

h1 {
  margin: 0 0 20px;
  font-size: 18px;
  text-align: center;
  color: #666;
}

h2 {
  text-align: center;
  margin: 20px 0;
  font-size: 14px;
  font-weight: bold;
}

/* Game grid */

.game-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.game-list .game {
  width: 170px;
  height: 135px;
  box-shadow: 0 0 5px #333;
  overflow: hidden;
  border-radius: 5px;
  position: relative;
}

.game-list .game img {
  display: block;
  width: 170px;
}

.game-list .game span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: url(/images/transparent.png);
  padding: 3px 3px 3px 7px;
  color: #fff;
  height: 22px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  text-shadow: 1px 1px #000;
}

.listing-game-list {
  display: grid;
  grid-template-columns: repeat(5, 170px);
  justify-content: center;
  gap: 20px;
}

.listing-game-list::before {
  content: "";
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  pointer-events: none;
}

.listing-game-list .game {
  margin: 0;
}

/* Game page */

.game-description {
  float: right;
  width: calc(100% - 410px);
  max-width: 530px;
  min-height: 340px;
  text-align: justify;
  margin: 0 0 20px 40px;
}

.game-description h1 {
  text-align: left;
}

.game-description img {
  float: right;
  margin-left: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.game-field {
  clear: both;
  margin-bottom: 20px;
  background: #000;
  border: 5px solid var(--text-muted);
  text-align: center;
}

.ruffle-player {
  background: #050505;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ruffle-player ruffle-player {
  width: 100%;
  height: 100%;
}

.game-meta {
  margin-bottom: 20px;
}

/* Pagination */

.pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 20px 0;
}

.pages .numbers {
  display: block;
  width: 26px;
  padding-top: 4px;
  height: 24px;
  color: #717171;
  text-shadow: 0 1px #fff;
  border: 1px solid #c3c3c3;
  background: linear-gradient(#f9f9f9, #ddd);
  border-radius: 4px;
  box-shadow: 0 1px 2px #ddd;
  text-align: center;
  font-weight: bold;
}

.pages .numbers:hover {
  background: linear-gradient(#fff, #fafafa);
}

.pages .numbers.active {
  border-color: #900;
  color: #fff;
  text-shadow: 0 1px #000;
  background: var(--accent);
  box-shadow: inset 0 0 9px #900;
}

.pages .prev,
.pages .next {
  display: block;
  height: 24px;
  width: 24px;
  background: url(/images/btn-prev-next.png) 0 0 no-repeat;
}

.pages .next {
  background-position: -24px 0;
}

/* Info text */

.info-text {
  margin-top: 40px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 30px;
}

.footer-menu {
  flex: 1 1 540px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 5px;
  align-content: start;
}

.footer-menu a {
  color: var(--accent);
  font-size: 12px;
}

.footer-menu a:hover {
  color: #fff;
}

.copyright {
  flex: 1 1 300px;
  color: var(--text-muted);
  margin-top: 20px;
}

.copyright a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Mobile */

@media (max-width: 1020px) {
  .header {
    flex-direction: column;
  }

  .logo,
  .main-menu {
    flex-basis: auto;
  }

  .main-menu {
    justify-content: flex-start;
  }

  .footer {
    padding: 20px 0;
  }

  .game-field {
    width: 100%;
  }

  .ruffle-player {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  .listing-game-list {
    grid-template-columns: repeat(4, 170px);
  }
}

@media (max-width: 840px) {
  .content {
    background-image: none;
    border-radius: 10px;
  }

  .game-description {
    float: none;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0 0 20px;
  }

  .listing-game-list {
    grid-template-columns: repeat(auto-fit, 170px);
  }

  .listing-game-list::before {
    display: none;
  }
}
