/* ===========================
   Base layout & typography
   =========================== */

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


body {
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: #ffffff;
  background-color: #34385a;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

html[dir="rtl"] body {
  direction: rtl;
}

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

a:hover {
  text-decoration: underline;
}

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

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem; /* top padding to separate header and content */
}

section + section {
  margin-top: 2.5rem;
}

#game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 1.5rem auto 0;
  background-color: #34385a;
}

#game-container iframe {
  display: block;
  margin: 0 auto;
}

.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  border-bottom: none;
}

.breadcrumbs {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 16px;
}

.breadcrumbs a {
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
}

.breadcrumbs a:hover {
  color: #ffffff;
  opacity: 0.8;
}

.breadcrumbs-separator {
  color: #ffffff;
  margin: 0 0.5rem;
  opacity: 0.6;
}

.breadcrumbs-current {
  color: #ffffff;
  display: inline-block;
  font-size: 16px;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0;
}

.breadcrumbs-current a {
  color: #ffffff;
  text-decoration: none;
}

.breadcrumbs-current a:hover {
  color: #ffffff;
  opacity: 0.8;
}

.new-game-link {
  color: #ffffff;
  text-decoration: underline;
  font-size: clamp(17px, 1.05vw, 1.05rem);
  transition: opacity 0.15s ease;
}

.new-game-link:hover {
  color: #ffffff;
  opacity: 0.8;
  text-decoration: underline;
}

.fullscreen-button {
  margin-left: 1rem;
  border: none;
  background: none;
  padding: 0;
  font-size: clamp(17px, 1.05vw, 1.05rem);
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  text-decoration: underline;
}

.fullscreen-button:hover {
  color: #ffffff;
  opacity: 0.8;
  text-decoration: underline;
}

.more-games {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  font-size: 17px;
  color: #ffffff;
}

.more-games a {
  color: #ffffff;
  text-decoration: underline;
}

.more-games a:hover {
  color: #ffffff;
  opacity: 0.8;
}

/* ===========================
   Header & navigation
   =========================== */

header {
  max-width: 100%;
  margin: 0;
  border-bottom: 1px solid #22353f;
  background-color: #34385a;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
  color: #ffffff;
}

.header-menu-toggle {
  margin-left: 1rem;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: #ffffff;
}

/* убираем старые полоски гамбургера */
.header-menu-toggle span {
  display: none;
}

.header-logo {
  display: block;
  color: #ffffff;
}

header img {
  height: 20px;
  width: auto;
  display: block;
  opacity: 0.9;
}

.site-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
  z-index: 40;
}

.site-drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.site-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(300px, 80vw);
  max-width: 100%;
  background-color: #34385a;
  color: #ffffff;
  transform: translateX(-100%);
  transition: transform 0.2s ease-out;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.site-drawer.is-open {
  transform: translateX(0);
}

.site-drawer__inner {
  /* Отступы как у шапки сайта: 1rem сверху/снизу, 1.5rem по бокам */
  padding: 16px 1.5rem 1.5rem;
  overflow-y: auto;
}

.site-drawer__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 1rem;
  padding-left: 0;
  padding-right: 0;
}

.site-drawer__title-wrapper {
  display: flex;
  align-items: baseline;
  margin: 1.25rem 0 0;
  padding: 0;
}

.site-drawer__title {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  margin: 0;
  padding: 0;
  color: rgba(249, 250, 251, 0.7);
  opacity: 0.8;
}

.site-drawer__title-prefix {
  opacity: 0.5;
  color: rgba(249, 250, 251, 0.7);
}

.site-drawer__logo {
  height: 20px;
  width: auto;
  display: block;
  opacity: 0.9;
}

.site-drawer__logo-link {
  display: inline-block;
}

.site-drawer__close {
  border: none;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1rem; /* такое же расстояние от логотипа, как menu в шапке */
}

.site-drawer__section {
  margin-top: 1.25rem;
}

.site-drawer__section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f9fafb;
  padding-left: 0;
  padding-right: 0;
}

.site-drawer__list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  text-align: left;
}

.site-drawer__list li + li {
  margin-top: 0.3rem;
}

.site-drawer__list a {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 16px;
  text-decoration: underline;
  color: #ffffff;
}

.site-drawer__list a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.site-drawer__code {
  font-size: 0.8rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.site-drawer__label {
  flex: 1;
}

.site-drawer__list--languages li {
  margin-top: 0.2rem;
  display: none;
}

.site-drawer__list--languages li.site-drawer__lang--current {
  display: block;
}

.site-drawer__list--languages.is-open li {
  display: block;
}

.site-drawer__lang--current .site-drawer__label {
  font-weight: inherit;
}


.lang-switcher__button {
  margin-left: auto;
  border: 1px solid;
  background-color: #f9fafb;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 1rem;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-switcher__button:hover {
  background-color: #f3f4f6;
}

/* ===========================
   Headings & text
   =========================== */

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: #ffffff;
}

h1 {
  font-size: clamp(2rem, 2.4vw, 2.4rem);
  font-weight: 600;
  text-align: center;
}

.page-main-title {
  font-size: clamp(1.8rem, 2.1vw, 2.1rem);
  font-weight: 600;
  text-align: left;
  margin: 0 0 1.25rem;
}

.page-main-title--service {
  text-align: left;
}


.page-content {
  max-width: 800px;
  margin: 0;
  padding: 0;
}

.page-content article {
  line-height: 1.7;
  color: #ffffff;
}

.page-content article a {
  color: #ffffff;
  text-decoration: underline;
}

.page-content article a:hover {
  color: #ffffff;
  opacity: 0.8;
}

.page-content h2,
.page-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.page-content p {
  margin-bottom: 1.25rem;
}

.page-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
  max-width: none;
  text-align: left;
}

.page-content ul li {
  margin-bottom: 0.5rem;
  display: list-item;
}

.page-content ul li + li {
  margin-top: 0;
}

h2 {
  font-size: clamp(1.5rem, 2vw, 1.9rem);
}

p {
  margin: 0.35rem 0 0.9rem;
  color: #ffffff;
}

/* ===========================
   Lists (games list)
   =========================== */

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
  text-align: left;
}

li + li {
  margin-top: 0.75rem;
}

main ul a {
  display: inline-block;
  color: #ffffff;
  text-decoration: underline;
  font-size: 20px;
  transition: color 0.15s ease;
}

main ul a:hover {
  color: #f58e07;
  text-decoration: underline;
}

/* ===========================
   Footer (if present)
   =========================== */

footer {
  border-top: none;
  padding: 2rem 1.5rem;
  max-width: 100%;
  margin: 0;
  font-size: 17px;
  color: #ffffff;
}

.footer-nav {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.footer-nav a {
  color: #ffffff;
  text-decoration: underline;
  font-size: 16px;
}

.footer-nav a:hover {
  color: #ffffff;
  opacity: 0.8;
}

.footer-lang-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  border-top: none;
  width: 100%;
  max-width: none;
  text-align: center;
  display: none;
}

.footer-lang-list.is-open {
  display: block;
}

.footer-lang-list li {
  display: inline-block;
  margin: 0 0.3rem 0.4rem;
}

.footer-lang-list a {
  font-size: 16px;
  color: #ffffff;
  padding: 0.125rem 0.25rem;
  display: inline-block;
  text-decoration: none;
}

.footer-lang-list a:hover {
  color: #ffffff;
  opacity: 0.8;
}

.footer-lang__item--current a {
  font-weight: 600;
}

/* ===========================
   Language modal
   =========================== */

.lang-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

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

.lang-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35); /* slate-900 @ 35% */
}

.lang-modal__dialog {
  position: relative;
  max-width: 380px;
  margin: 12vh auto;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  padding: 0.75rem 1.25rem 1.1rem;
}

.lang-modal__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.lang-modal__header h2 {
  font-size: 1.1rem;
  margin: 0;
}

.lang-modal__close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: #6b7280;
}

.lang-modal__close:hover {
  color: #111827;
}

.lang-modal__body {
  max-height: 60vh;
  overflow: auto;
  padding-top: 0.25rem;
}

.lang-modal__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lang-modal__list li + li {
  margin-top: 0.15rem;
}

.lang-modal__list a {
  display: block;
  padding: 0.15rem 0;
  border-radius: 0;
  font-size: 16px; /* same size as footer text */
  color: #6b7280; /* same color as footer links */
}

.lang-modal__list a:hover {
  background-color: transparent;
  color: #6b7280; /* no hover color change */
}


