/* Additional selection rules */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

p,
h1,
h2,
h3,
span,
a {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Hero layout adjustments */
.hero h1 {
  font-size: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 0;
  margin-bottom: 0.35rem;
}

h2,
.section h2 {
  font-size: clamp(1rem, 2.5vw, 1.75rem);
}

.hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  padding: clamp(0.8rem, 2vw, 1.6rem) 0;
  padding-top: clamp(1rem, 2.4vw, 1.8rem);
}

/* Tighten vertical rhythm */
.section {
  padding: clamp(0.25rem, 1vw, 0.6rem) 0;
}

.section h2 {
  margin: 0 0 0.3rem;
}

.section-header {
  margin-bottom: 0.3rem;
}

.about-game .hero-content {
  align-items: center;
  gap: 1.35rem;
}

.about-game .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.about-game .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(99, 209, 136, 0.18);
}

.hero-media {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.hero-play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.hero-side-related {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(99, 209, 136, 0.2);
  border-radius: 16px;
  padding: 0.75rem 0.75rem 0.85rem;
  box-shadow: 0 12px 26px rgba(18, 40, 76, 0.12);
}

.hero-side-related h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text);
}

.hero-side-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.hero-side-related li {
  margin: 0;
}

.side-related-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem;
  border: 1px solid rgba(99, 209, 136, 0.15);
  border-radius: 12px;
  background: rgba(99, 209, 136, 0.08);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.side-related-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: cover;
}

.side-related-card span {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.4;
}

.side-related-card:hover,
.side-related-card:focus-visible {
  border-color: rgba(99, 209, 136, 0.35);
  background: rgba(99, 209, 136, 0.14);
  transform: translateY(-1px);
}

.hero-related-sidebar-list {
  grid-template-columns: repeat(2, minmax(90px, 1fr));
}

.hero-related-sidebar .related-game-card span {
  font-size: 0.8rem;
}

.how-to-game {
  margin-top: 1.5rem;
}

.how-to-game .iframe-shell.how-to-iframe {
  margin: 0 auto;
  max-width: 900px;
  padding-top: 50%;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .hero-related-sidebar-list {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .how-to-game .iframe-shell.how-to-iframe {
    max-width: 100%;
  }
}

/* Comments */
#comments {
  width: var(--max-width);
  margin: 0 auto;
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.comments-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  background: rgba(99, 209, 136, 0.12);
  border: 1px solid rgba(99, 209, 136, 0.25);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.comments-list {
  margin-top: 1rem;
  background: var(--surface-strong);
  border-radius: 16px;
  border: 1px solid rgba(99, 209, 136, 0.18);
  box-shadow: 0 10px 28px rgba(18, 40, 76, 0.12);
  overflow: hidden;
}

#comments-list p {
  margin: 0;
  padding: 1.25rem;
  color: var(--text-soft);
}

.comment-item {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(99, 209, 136, 0.12);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.comment-meta strong {
  color: var(--text);
  font-size: 1rem;
}

.comment-time {
  font-size: 0.8rem;
  color: rgba(28, 34, 51, 0.6);
}

.comment-content {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

.load-more-comments {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  background: rgba(99, 209, 136, 0.14);
  border: 1px solid rgba(99, 209, 136, 0.35);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.load-more-comments:hover,
.load-more-comments:focus-visible {
  background: rgba(99, 209, 136, 0.2);
}

.comment-form-wrap {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(99, 209, 136, 0.2);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(18, 40, 76, 0.12);
  padding: 1.25rem;
}

.comment-form-wrap h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

#comment-form {
  display: grid;
  gap: 0.75rem;
}

#comment-form input,
#comment-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(99, 209, 136, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

#comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  text-align: left;
}

.comment-checkbox input {
  width: auto;
  margin-top: 0.15rem;
}

.comment-checkbox span {
  line-height: 1.4;
}

#comment-form button[type="submit"] {
  width: fit-content;
  min-width: 180px;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(120deg, #63d188, #3ca86a);
  border: none;
  color: #020409;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(99, 209, 136, 0.35);
}

#comment-form button[type="submit"]:hover,
#comment-form button[type="submit"]:focus-visible {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .comments-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comments-toolbar {
    width: 100%;
  }
}

/* Layout refresh */
:root {
  --nav-height: 76px;
  --sidebar-collapsed-width: 64px;
  --sidebar-width: 260px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 180;
  background: var(--surface-strong, #ffffff);
  border-bottom: 1px solid rgba(99, 209, 136, 0.16);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(18, 40, 76, 0.12);
}

.page-shell {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.top-nav .nav-container {
  width: min(1440px, 96vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr 180px;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
}

.nav-search {
  width: 100%;
}

.nav-search-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(99, 209, 136, 0.2);
  border-radius: 999px;
  padding: 0.4rem 0.45rem 0.4rem 0.95rem;
  box-shadow: 0 12px 30px rgba(18, 40, 76, 0.12);
}

.nav-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  outline: none;
}

.nav-search input::placeholder {
  color: var(--text-soft);
}

.nav-search button {
  border: none;
  background: linear-gradient(120deg, #63d188, #3ca86a);
  color: #020409;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(99, 209, 136, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.nav-search button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(99, 209, 136, 0.42);
}

.nav-spacer {
  width: 100%;
  height: 100%;
}

.page-layout {
  display: block;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  padding: 1.25rem 1.5rem 2rem;
}

.page-shell footer {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.side-nav {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface-strong, #ffffff);
  border: 1px solid rgba(99, 209, 136, 0.2);
  border-radius: 18px;
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 14px 30px rgba(18, 40, 76, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease;
  gap: 0.4rem;
}

.side-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 209, 136, 0.35) transparent;
  height: calc(100vh - var(--nav-height) - 2rem);
}

.side-nav-inner::-webkit-scrollbar {
  width: 6px;
}

.side-nav-inner::-webkit-scrollbar-thumb {
  background: rgba(99, 209, 136, 0.35);
  border-radius: 999px;
}

.side-nav-inner::-webkit-scrollbar-track {
  background: transparent;
}

.side-nav-heading {
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  padding: 0 0.1rem;
  font-size: 0.95rem;
}

.side-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-toggle {
  border: 1px solid rgba(99, 209, 136, 0.2);
  background: rgba(99, 209, 136, 0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-weight: 700;
  min-width: 42px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: rgba(99, 209, 136, 0.2);
  transform: translateY(-1px);
}

.nav-block {
  border: 1px solid rgba(99, 209, 136, 0.18);
  border-radius: 14px;
  padding: 0.6rem 0.75rem 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 0.35rem;
  width: 100%;
}

.anchor-block {
  padding: 0.6rem 0.75rem 0.8rem;
}

.anchor-list {
  grid-template-columns: 1fr;
  gap: 0.35rem;
  margin-top: 0;
  width: 100%;
}

.anchor-list a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(99, 209, 136, 0.08);
  border: 1px solid rgba(99, 209, 136, 0.12);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  width: 100%;
}

.anchor-list a:hover,
.anchor-list a:focus-visible {
  background: rgba(99, 209, 136, 0.16);
  border-color: rgba(99, 209, 136, 0.25);
}

.link-block {
  gap: 0.35rem;
}

.side-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.side-link-list a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  color: #6f7a85;
  text-decoration: none;
  border: 1px solid rgba(99, 209, 136, 0.12);
  background: rgba(99, 209, 136, 0.08);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  width: 100%;
}

.side-link-list a:hover,
.side-link-list a:focus-visible {
  background: rgba(99, 209, 136, 0.18);
  border-color: rgba(99, 209, 136, 0.28);
}

.nav-block + .nav-block {
  margin-top: 0.65rem;
}

.nav-block-title {
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  padding-left: 0.1rem;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.3rem;
}

.nav-list.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.4rem;
  row-gap: 0.3rem;
}

.nav-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.7rem;
  border-radius: 12px;
  background: rgba(99, 209, 136, 0.08);
  border: 1px solid rgba(99, 209, 136, 0.15);
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
  width: 100%;
  font-size: 0.92rem;
  line-height: 1.3;
}

.nav-list span:hover {
  background: rgba(99, 209, 136, 0.15);
}

.nav-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 209, 136, 0.25),
    transparent
  );
  margin: 0.35rem 0;
}

.side-nav nav ul,
main {
  min-width: 0;
}

.related-section .related-games-grid.related-expanded {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.sidebar-collapsed .side-nav {
  transform: translateX(calc(-1 * (var(--sidebar-width) - var(--sidebar-collapsed-width))));
}

.sidebar-collapsed .page-layout {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

.sidebar-collapsed .page-shell footer {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

@media (max-width: 1100px) {
  .page-layout {
    margin-left: 0;
    width: 100%;
    padding: 1rem 1rem 2rem;
  }

  .page-shell footer {
    margin-left: 0;
    width: 100%;
  }

  .side-nav {
    position: static;
    width: auto;
    height: auto;
    margin-bottom: 0.75rem;
  }

  .side-nav-inner {
    height: auto;
    padding-right: 0;
  }

  .top-nav .nav-container {
    grid-template-columns: 1fr;
    row-gap: 0.5rem;
  }

  .nav-spacer {
    display: none;
  }

  .sidebar-collapsed .side-nav {
    transform: none;
  }
}

@media (max-width: 720px) {
  :root {
    --nav-height: 70px;
  }

  .top-nav .nav-container {
    padding: 0.75rem 1rem;
  }

  .nav-search-field {
    padding: 0.45rem 0.55rem 0.45rem 0.85rem;
  }

  .nav-search button {
    padding: 0.5rem 0.9rem;
  }

  .page-layout {
    padding: 0.85rem 0.85rem 1.75rem;
  }
}
