:root {
  --color-primary: #1b2838;
  --color-primary-dark: #0f1419;
  --color-primary-light: #66c0f4;
  --color-sale: #ff5e62;
  --bg-image: url("/img/background.png");
  --bg-body: #0c1014;
  --bg-card: #2a3442;
  --bg-card-hover: #273247;
  --bg-header: rgba(27, 40, 56, 0.9);
  --bg-secondary: #2d3748;
  --bg-scroll: #2b7aa8;
  --bg-scroll-hw: #1a4762;
  --text-primary: #ffffff;
  --text-secondary: #acb2b9;
  --text-muted: #8b95a1;

  --border-color: #3a475b;
  --steam-shadow: 0 8px 32px rgba(27, 40, 56, 0.5);
}

:root.light {
  --bg-image: url("/img/backgroundlight.png");
  --bg-body: #e9ecef;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fa;
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-secondary: #f1f3f4;

  --text-primary: #1a1a1a;
  --text-secondary: #5f6368;
  --text-muted: #9aa0a6;

  --border-color: #e0e4e8;
  --steam-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

html::-webkit-scrollbar {
    width: 10px;
    background: var(--bg-body);
}

html::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 10px;
    margin: 2px;
}

html::-webkit-scrollbar-thumb {
    background: var(--bg-scroll);
    border-radius: 10px;
    border: 2px solid var(--bg-card);
}

html::-webkit-scrollbar-thumb:hover {
    background: var(--bg-scroll-hw);
    border-color: var(--bg-card-hover);
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", -apple-system, sans-serif;
  background: var(--bg-image), var(--bg-body);
  background-attachment: fixed;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% auto;
  color: var(--text-primary);
  line-height: 1.6;
  padding: 0;
  min-height: 100vh;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 20px 0;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--color-primary-light);
  gap: 20px;
  text-align: center;
  flex-direction: row-reverse;
  flex-wrap: wrap;
}

.header-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  height: 160px;
  filter: drop-shadow(0 3px 10px rgba(102, 192, 244, 0.4));
}

.header-title {
  font-size: 2.8em;
  font-weight: 900;
  background: linear-gradient(
    135deg,
    var(--color-primary-light),
    var(--text-primary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.header-subtitle {
  color: var(--text-secondary);
  font-size: 1.1em;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.header-subtitle i {
  color: var(--color-primary-light);
  font-size: 1.1em;
}

.header-otherlink {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background: #0088cc;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: fit-content;
}

.tg-btn:hover {
  background: #006ba0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.5);
}

.tg-btn i {
  font-size: 20px;
}

.games-list {
  margin-bottom: 60px;
}

.game-all {
  display: flex;
  gap: 25px;
  align-items: center;
}

.game-item {
  background: var(--bg-card);
  border-left: 6px solid var(--color-primary);
  margin-bottom: 35px;
  border-radius: 0 20px 20px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--steam-shadow);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 25px;
  padding: 25px;
  flex-direction: column;
}

.game-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--color-primary-light),
    var(--color-primary)
  );
}

.game-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(27, 40, 56, 0.6);
  border-color: var(--color-primary-light);
}

.game-image {
  flex: 0 0 460px;
  height: 215px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--steam-shadow);
  border: 3px solid var(--border-color);
  transition: all 0.4s ease;
}

.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-item:hover .game-image img {
  transform: scale(1.05);
}

.game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 5px 0 0 0;
  min-width: 0;
}

.game-name {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.game-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.genre-tag {
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all 0.3s ease;
}

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

.region-flag {
  padding: 6px 12px 4px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  min-width: 36px;
  text-align: center;
}

.region-flag:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.region-flag.ru {
  background: linear-gradient(
    -45deg,
    #ffffff 0%,
    #0051ba 33%,
    #d52b1e 66%,
    #ffffff 100%
  );
}

.region-flag.kz {
  background: linear-gradient(-45deg, #0099b5 0%, #ffd600 50%, #0099b5 100%);
}

.region-flag.de {
  background: linear-gradient(
    135deg,
    #034c9b 0%,
    #ffd600 20%,
    #034c9b 40%,
    #ffcc00 60%,
    #034c9b 100%
  );
}

.region-flag.us {
  background: linear-gradient(
    -45deg,
    #b22222 0%,
    #ffffff 25%,
    #3c3b6e 50%,
    #ffffff 75%,
    #b22222 100%
  );
}

.game-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.price-item {
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  flex: 1;
  min-width: 130px;
  max-width: 180px;
}

.price-item:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 40, 56, 0.3);
}

.region-flag {
  font-size: 20px;
  display: block;
  margin-bottom: 3px;
}

.price-final {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-primary);
  display: block;
  margin-bottom: 1px;
}

.price-discount {
  color: var(--color-sale);
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(255, 94, 98, 0.4);
}

.game-footer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.steam-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-light)
  );
  color: #fafafa;
  box-shadow: var(--steam-shadow);
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid var(--color-primary-light);
  transition: all 0.3s ease;
}

.steam-link:hover {
  background: linear-gradient(135deg, var(--color-primary-light), #66c0f4);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(102, 192, 244, 0.4);
}

.steam-link i {
  margin: 0 10px;
  font-size: 20px;
}

.game-time {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 15px;
  font-style: italic;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  gap: 12px;
}

.game-number {
  color: var(--color-primary-light);
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(102, 192, 244, 0.1);
  border: 1px solid rgba(102, 192, 244, 0.3);
  transition: all 0.3s ease;
}

.game-number:hover {
  background: var(--color-primary-light);
  color: var(--bg-card);
  transform: scale(1.05);
}

.empty-state {
  text-align: center;
  padding: 120px 80px;
  color: var(--color-primary-light);
  border: 3px dashed var(--border-color);
  border-radius: 28px;
  font-size: 28px;
  background: var(--bg-card);
  margin: 100px 0;
  box-shadow: var(--steam-shadow);
}

.footer {
  text-align: center;
  padding: 25px 20px;
  margin-top: 60px;
  background: transparent;
  border-top: 1px solid var(--border-color);
  opacity: 0.9;
}

.last-update {
  color: var(--color-primary-light);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-stats {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.footer-credits {
  color: var(--text-secondary);
  font-size: 13px;
  opacity: 0.8;
}

.footer-credits a {
  color: var(--color-primary-light);
  text-decoration: none;
  font-weight: 600;
}

.footer-credits a:hover {
  text-decoration: underline;
}

.scroll-panel {
  position: fixed;
  bottom: 40px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1000;
}

.rotate-btn,
.scroll-btn,
.theme-btn {
  width: 65px;
  height: 65px;
  border-radius: 20px;
  font-size: 26px;
  color: white;
  cursor: pointer;
  background: var(--color-primary);
  border: none;
  box-shadow: var(--steam-shadow);
  transition: all 0.4s ease;
}

.rotate-btn:hover,
.scroll-btn:hover,
.theme-btn:hover {
  background: var(--color-primary-light);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(102, 192, 244, 0.4);
}

.theme-btn {
  position: relative;
  overflow: hidden;
}

.fa-sun,
.fa-moon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
}

html.light .fa-sun {
  opacity: 1;
}

html.light .fa-moon {
  opacity: 0;
}

html:not(.light) .fa-moon {
  opacity: 1;
}

html:not(.light) .fa-sun {
  opacity: 0;
}

@media (max-width: 1300px) {
  body {
    background-size: 2010px auto;
  }

  .game-image {
    flex: 0 0 380px;
    height: 178px;
  }
}

@media (max-width: 768px) {
  body {
    background-size: 1900px auto;
  }

  .container {
    padding: 15px;
  }

  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding: 15px 0;
  }

  .header-logo-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .header-logo {
    height: 130px;
  }

  .header-title {
    font-size: 2.2em;
  }

  .header-subtitle {
    font-size: 1em;
  }

  .game-all {
    flex-direction: column;
  }

  .game-item {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .game-image {
    flex: none;
    height: 200px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .game-content {
    padding: 0;
  }

  .game-name {
    text-align: center;
    font-size: 24px;
  }

  .game-prices {
    justify-content: center;
    gap: 10px;
  }

  .game-genres {
    justify-content: center;
  }

  .price-item {
    padding: 10px 14px;
    min-width: 120px;
  }

  .price-final {
    font-size: 16px;
  }

  .price-discount {
    font-size: 12px;
  }

  .game-number {
    font-size: 15px;
    padding: 3px 6px;
  }

  .footer {
    padding: 20px 15px;
  }

  .last-update {
    font-size: 15px;
    flex-direction: column;
    gap: 5px;
  }

  .header-otherlink {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }

  .tg-btn {
    padding: 10px 20px;
    font-size: 15px;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  body {
    background-size: 1600px auto;
  }

  .header-title {
    font-size: 1.9em;
  }

  .header-logo {
    height: 100px;
  }

  .game-name {
    font-size: 20px;
  }

  .price-item {
    min-width: 110px;
    padding: 8px 12px;
  }

  .price-final {
    font-size: 15px;
  }

  .game-image {
    height: 180px;
  }

  .scroll-panel {
    bottom: 20px;
    right: 15px;
    gap: 10px;
  }

  .rotate-btn,
  .scroll-btn,
  .theme-btn {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }
}
