* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Segoe UI,
    sans-serif;
  background: #171a22;
  color: #e0f7ff;
  overflow-x: hidden;
}

/* Animated background glow */
body::before {
  display: none;
}

body::after {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: 260px minmax(260px, 390px) 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 0 20px;
  background: #0d1018;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.site-header .brand img {
  width: 250px !important;
  height: auto !important;
  max-height: 58px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #a6adbc;
  font-size: 11px;
  white-space: nowrap;
}

.site-search {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 10px 0 16px;
  background: #21242d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.site-search span {
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.site-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
}

.site-search button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: #f2d36f;
  color: #12141a;
  font-weight: 800;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}

.site-nav a {
  color: #f5f6fb;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: #ffda73;
}

.member-area {
  display: flex;
  justify-content: flex-end;
}

.member-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 22px;
  border-radius: 999px;
  background: #f6f7fb;
  color: #141720;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  margin-top: 46px;
  padding: 30px 34px 22px;
  background: #0d1018;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-related {
  max-width: 1600px;
  margin: 0 auto;
}

.footer-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.footer-related-head h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
}

.footer-related-head a {
  color: #ffda73;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.footer-related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.footer-game-card {
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  background: #171b25;
  color: #fff;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.footer-game-card:hover {
  transform: translateY(-3px);
  background: #202533;
}

.footer-game-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  background: #090b10;
}

.footer-game-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-footer .footer-copy {
  max-width: 1600px;
  margin: 22px auto 0;
  color: #8f96a6;
  font-size: 13px;
}

/* ================= PAGE ================= */
.game-page {
  padding: 0 20px;
}

.layout-3col {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

.game-detail-layout {
  max-width: 1600px;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 0;
  padding: 30px 0 18px;
  align-items: stretch;
}

.game-detail-layout > .sidebar.rightbar {
  display: none;
}

.game-detail-panel {
  position: sticky;
  top: 92px;
  z-index: 2;
  align-self: start;
  min-height: 620px;
  padding: 40px;
  border-radius: 22px 0 0 22px;
  background:
    linear-gradient(180deg, rgba(51, 28, 42, 0.96), rgba(21, 24, 34, 0.96)),
    #171a22;
  color: #f6f7fb;
}

.game-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 22px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
}

.game-detail-panel h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.18;
  color: #fff;
}

.game-category-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.game-category-line a {
  color: #ffda73;
  font-size: 13px;
  text-decoration: none;
}

.game-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.game-meta-pills span {
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.game-side-copy strong {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 15px;
}

.game-side-copy p {
  max-height: 230px;
  overflow: hidden;
  color: #b8beca;
  font-size: 14px;
  line-height: 1.7;
}

.game-play-content {
  padding: 0;
}

.play-stage-panel {
  min-height: 620px;
  padding: 30px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(30, 32, 43, 0.94), rgba(24, 27, 37, 0.98)),
    #181b25;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 30px 70px rgba(0, 0, 0, 0.32);
}

.play-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.play-stage-panel .header-icons {
  gap: 14px;
}

.play-stage-panel .game-stats {
  gap: 14px;
}

.play-stage-panel .vote-btn,
.play-stage-panel .infor-btn,
.play-stage-panel .fullscreen-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-stage-panel .rating-text {
  color: #c9ced8;
}

.play-stage-panel .game-box {
  margin-top: 0;
  border-radius: 10px;
  background: #090b10;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.4);
}
.main.content {
  min-width: 0;
  margin-top: 1px;
}

.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ================= GAME PLAYER ================= */
.game-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px #1e293b,
    0 20px 40px rgba(0, 0, 0, 0.65);
  margin-top: 20px;
}

.game-box iframe,
.game-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Play Button */
.play-btn {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.9));
  border: none;
  cursor: pointer;
  transition: 0.25s;
}

.play-btn img {
  width: 86px;
  height: 86px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.8));
  transition: transform 0.25s;
}

.play-btn:hover img {
  transform: scale(1.15);
}
/* overlay nằm TRONG game-box */
.orientation-overlay {
  position: absolute;
  inset: 0;
  z-index: 20; /* cao hơn play-btn */

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.65);
  pointer-events: auto; /* CHẶN click */
}

/* hộp thông báo */
.orientation-modal {
  max-width: 80%;
  padding: 14px 20px;
  border-radius: 12px;

  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  font-size: 14px;
  text-align: center;
  line-height: 1.5;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.orientation-modal.landscape::before {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.orientation-modal.portrait::before {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}
/* ================= HEADER BAR ================= */
.header-bar {
  margin-top: 5px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #020617;
  box-shadow: 0 0 0 1px #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 20;
}

.header-bar h1 {
  font-size: 22px;
  margin: 0;
  word-break: break-word;
}

/* ================= HEADER ICONS ================= */
.header-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.top-slider {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: -10px;
}

.slider-wrapper {
  display: flex;
  gap: 10px;
  animation: scrollSlider 30s linear infinite;
}

.slide-item {
  width: 100px;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-title {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  font-weight: bold;
  font-size: 9px;
  color: #ffffff;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.slide-item:hover .slide-title {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scrollSlider {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.game-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}
.badge-trending {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(45deg, #ff416c, #ff4b2b);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
.vote-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* LIKE / DISLIKE */
.vote-btn {
  min-width: 66px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0 10px;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.vote-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.vote-btn strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.like-btn.liked {
  background: rgba(255, 0, 80, 0.15);
  border-color: #ff4d6d;
}

.dislike-btn.disliked {
  background: rgba(56, 189, 248, 0.14);
  border-color: #38bdf8;
}

/* RATING */
.rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating .star {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.rating .star img {
  width: 100%;
  height: 100%;
  transition: 0.2s;
}

.rating .star.active img,
.rating .star:hover img {
  transform: scale(1.15);
  filter: saturate(2);
}

/* INFO + FULLSCREEN */
.infor-btn,
.fullscreen-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.infor-btn:hover,
.fullscreen-btn:hover {
  background: #1e293b;
  transform: scale(1.05);
}

.infor-btn img,
.fullscreen-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

/* ================= ADS ================= */
.ad-728 {
  width: 800px;
  height: 90px;
  margin: 18px auto;
  padding: 0; /* hoặc padding nhỏ nếu cần */
  border-radius: 14px;
  background: #020617;
  box-shadow: 0 0 0 1px #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ================= GAME INFO ================= */
.game-info {
  background: #020617;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 0 1px #1e293b;
}

.game-description {
  max-height: 520px;
  overflow: hidden;
  position: relative;
  line-height: 1.8;
}

.game-description::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 60px;
  width: 100%;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0), #020617);
}

/* Expanded */
.game-description.expanded {
  max-height: none;
}

.game-description.expanded::after {
  display: none;
}

/* Typography inside description */
.game-description p {
  margin: 0 0 14px;
}

.game-description strong {
  color: #f8fafc;
}

.game-description a {
  color: #38bdf8;
  text-decoration: underline;
  text-decoration: none;
}

.game-description ul,
.game-description ol {
  margin: 10px 0 14px 18px;
}

.game-description li {
  margin-bottom: 6px;
}
.show-more-btn {
  margin: 16px auto 0;
  padding: 8px 22px;
  border-radius: 10px;
  border: 1px solid #38bdf8;
  background: #020617;
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
}
/* ===== OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  z-index: 9999;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ===== MODAL BOX ===== */
.modal-box {
  width: 360px;
  padding: 35px 30px;
  border-radius: 18px;

  background: linear-gradient(
    145deg,
    rgba(25, 25, 35, 0.95),
    rgba(15, 15, 25, 0.95)
  );

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 0, 100, 0.15);

  text-align: center;
  color: #fff;

  transform: translateY(20px) scale(0.95);
  transition: all 0.35s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

/* ===== TITLE ===== */
.modal-box h3 {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.modal-box p {
  font-size: 14px;
  color: #bbb;
  margin-bottom: 25px;
}

/* ===== BUTTONS ===== */
.modal-actions {
  display: flex;
  gap: 12px;
}

/* LOGIN BUTTON */
.btn-primary {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;

  background: linear-gradient(135deg, #6b7ed3, #221375);
  color: white;

  transition: all 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 0, 80, 0.4);
}

/* CANCEL BUTTON */
.btn-secondary {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}
.user-area {
  margin-left: 20px;
  position: relative;
}

.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-name {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #462996;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  overflow: hidden;

  /* BỎ margin-top */
  margin-top: 0;

  /* Animation mượt hơn */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
}

.dropdown-menu a:hover {
  background: #2c115f;
}
.user-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.login-btn {
  padding: 8px 14px;
  background: #111;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
/* =========================
   ANIMATIONS
========================= */
@keyframes popupScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* ================= COMMENTS ================= */
.comments {
  margin-top: 24px;
  padding: 20px;
  background: #020617;
  border-radius: 16px;
  box-shadow: 0 0 0 1px #1e293b;
}

/* Title */
.comments h3 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
  color: #e5e7eb;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 10px;
}

/* Comment item */
.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

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

/* Username */
.comment-item strong {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #38bdf8;
}

/* Time */
.comment-item small {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin: 4px 0 6px;
}

/* Comment text */
.comment-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #e5e7eb;
}
.comment-form textarea {
  resize: none;
  height: 100px;
  max-height: 100px;
}
/* ================= PAGINATION ================= */
.pagination {
  margin: 20px 0 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination a {
  min-width: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #cbd5f5;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  transition: 0.2s;
}

.pagination a:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

.pagination a.active {
  background: #38bdf8;
  color: #020617;
  font-weight: 600;
}

/* ================= COMMENT FORM ================= */
.comment-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  font-size: 14px;
}

.comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: #64748b;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

/* Submit button */
.comment-form button {
  align-self: flex-start;
  padding: 8px 22px;
  border-radius: 10px;
  border: 1px solid #38bdf8;
  background: #020617;
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.comment-form button:hover {
  background: #38bdf8;
  color: #020617;
}

/* ================= RIGHT BAR ================= */
.rightbar {
  position: relative;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rightbar .ad-300 {
  width: 100%;
  height: 250px;
  border-radius: 14px;
  background: #020617;
  box-shadow: 0 0 0 1px #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;

  margin-top: 0; /* kéo sát lên */
  padding-top: 0; /* nếu có padding */
}
/* Similar Games */
.similar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.game-thumb {
  background: #020617;
  border-radius: 14px;
  padding: 8px;
  text-decoration: none;
  color: #fff;
  transition: 0.25s;
  box-shadow: 0 0 0 1px #1e293b;
  position: relative; /* thêm */
  overflow: hidden; /* thêm */
  z-index: 1;
}
.game-thumb::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(45deg, #3b82f6, #a855f7, #ec4899);
  z-index: -1;
  opacity: 0;
  transition: 0.3s;
}

.game-thumb:hover::before {
  opacity: 1;
}
.game-thumb:hover {
  transform: translateY(-3px);
}

/* Ảnh */
.game-thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Chữ ẩn ban đầu */
.game-thumb span {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;

  padding: 6px;
  font-size: 12px;
  text-align: center;
  border-radius: 8px;

  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);

  opacity: 0; /* ẩn */
  transform: translateY(10px); /* trượt xuống */
  transition: all 0.3s ease;
}

/* Hover mới hiện */
.game-thumb:hover span {
  opacity: 1;
  transform: translateY(0);
}
.game-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.25);
  border-top-color: #3a36be;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  margin-top: 12px;
  font-size: 14px;
  color: #325fb9;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ================= RESPONSIVE GAME PAGE ========== */
/* ================================================= */

/* ---------- LAPTOP / SMALL DESKTOP (<= 1200px) ---------- */
@media (max-width: 1200px) {
  .layout-3col {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .rightbar {
    display: none;
  }

  .ad-728 {
    width: 100%;
    max-width: 728px;
  }
}

/* ---------- TABLET (<= 1024px) ---------- */
@media (max-width: 1024px) {
  .layout-3col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .main-content {
    order: 1;
  }

  .rightbar {
    order: 3;
    display: flex;
  }

  .ad-728 {
    width: 100%;
    height: auto;
    min-height: 90px;
  }
}

/* ================================================= */
/* ================= MOBILE GAME UI ================= */
/* ================================================= */
@media (max-width: 768px) {
  /* ----- PAGE ----- */
  .game-page {
    padding: 0 10px;
  }

  .layout-3col {
    display: block;
  }

  /* ----- HIDE SIDEBARS ----- */
  .sidebar,
  .rightbar {
    display: none;
  }

  /* ----- GAME PLAYER ----- */
  .game-box {
    border-radius: 12px;
    margin-top: 12px;
    box-shadow: none;
    position: relative;
    width: 100%;
    max-width: 100%;
    touch-action: manipulation;
  }

  .play-btn img {
    width: 64px;
    height: 64px;
  }

  /* ----- HEADER BAR ----- */
  .header-bar {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .header-bar h1 {
    font-size: 18px;
    line-height: 1.3;
    width: 100%;
  }

  .header-icons {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .game-stats {
    gap: 6px;
  }

  /* ----- RATING & ICONS ----- */
  .rating .star {
    width: 20px;
    height: 20px;
  }

  .vote-btn {
    min-width: 58px;
    padding: 0 8px;
  }

  /* ----- ADS ----- */
  .ad-728 {
    width: 100%;
    height: auto;
    min-height: 70px;
    margin: 14px 0;
  }

  /* ----- GAME INFO ----- */
  .game-info {
    padding: 16px;
    border-radius: 12px;
  }

  .game-description {
    font-size: 14px;
    line-height: 1.5;
  }

  /* ----- COMMENTS ----- */
  .comments {
    padding: 16px;
    border-radius: 12px;
  }

  .comments h3 {
    font-size: 16px;
  }

  .comment-item p {
    font-size: 14px;
  }

  .comment-form button {
    width: 100%;
    text-align: center;
  }

  /* ----- PAGINATION ----- */
  .pagination {
    justify-content: center;
  }
}

/* ---------- SMALL MOBILE (<= 480px) ---------- */
@media (max-width: 480px) {
  .header-bar h1 {
    font-size: 16px;
  }

  .play-btn img {
    width: 56px;
    height: 56px;
  }

  .rating .star {
    width: 18px;
    height: 18px;
  }

  .game-description {
    font-size: 13px;
  }

  .comment-item strong {
    font-size: 13px;
  }

  .comment-item p {
    font-size: 13px;
  }
}

/* ===== Detail page override ===== */
.game-page .top-slider {
  display: none;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(150px, 1fr) auto;
  }

  .site-search,
  .site-nav {
    display: none;
  }

  .game-detail-layout {
    display: block;
    padding: 16px 0;
  }

  .game-detail-panel {
    position: static;
    min-height: 0;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 14px;
  }

  .game-poster {
    width: 120px;
  }

  .play-stage-panel {
    min-height: 0;
    padding: 18px;
    border-radius: 16px;
  }

  .footer-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0 12px;
  }

  .site-header .brand img {
    width: 230px !important;
    height: auto !important;
    max-height: 54px;
  }

  .member-pill {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }

  .play-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .play-stage-panel .header-icons,
  .play-stage-panel .game-stats,
  .vote-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .game-detail-panel h1 {
    font-size: 24px;
  }

  .site-footer {
    padding: 24px 12px 18px;
  }

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

  .footer-related-head h2 {
    font-size: 20px;
  }
}
