/* ============ Reset & base ============ */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fb;
  color: #1c1c1e;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: #003afa; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ============ Layout ============ */
.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============ Header ============ */
.Header {
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.Header .layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.Logo img {
  max-height: 50px;
  width: auto;
}

.menu-header {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.menu-header > li { position: relative; }

.menu-header > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #2b2d42;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.menu-header > li > a:hover,
.menu-header > li > a.active {
  background: #003afa;
  color: #fff;
  text-decoration: none;
}

.menu-header > li > a .triangle {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.menu-header ul.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  list-style: none;
  margin: 8px 0 0;
  padding: 8px;
  display: none;
  z-index: 110;
}

.menu-header > li:hover ul.submenu { display: block; }

.menu-header ul.submenu li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: #2b2d42;
  font-size: 14px;
  font-weight: 500;
}

.menu-header ul.submenu li a:hover {
  background: #f0f4ff;
  color: #003afa;
  text-decoration: none;
}

.right-relative {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.SearchInput {
  width: 200px;
  padding: 8px 36px 8px 12px;
  border: 1px solid #e1e4ea;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  background: #f7f9fc;
}

.SearchInput:focus { border-color: #003afa; background: #fff; }

.icon-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  color: #6b7280;
  display: flex;
}

#menu-mobile {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 24px;
  padding: 6px;
  color: #2b2d42;
}

/* ============ Game area ============ */
.GamePlay { margin-top: 20px; }

.GameSectionPlay {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.frame-box-game {
  position: relative;
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 800 / 600;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.game-preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.game-preview-bgi {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(10px);
  transform: scale(1.1);
}

.game-preview__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
}

.game-preview__logo img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(255,255,255,0.6);
}

.game-preview__title {
  font-size: 26px;
  color: #fff;
  font-weight: 700;
  margin: 18px auto;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.35) 50%, transparent 100%);
  width: 100%;
  text-align: center;
  padding: 14px 0;
}

.play-btn__ctrl {
  background: #ff3814;
  font-weight: 700;
  color: #fff;
  font-size: 22px;
  padding: 12px 36px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255,255,255,0.55);
  transition: transform 0.1s, box-shadow 0.15s;
}

.play-btn__ctrl:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(255,255,255,0.8);
}

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

/* Player footer */
.player-footer {
  background: #fff;
  border-radius: 12px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.player-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 16px;
  gap: 12px;
}

.player-footer__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-footer__left img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.player-footer__left h1 {
  margin: 0;
  font-size: 18px;
  color: #1c1c1e;
}

.player-footer__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.g-footer__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f3f5fa;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2b2d42;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.g-footer__button:hover { background: #003afa; color: #fff; }
.g-footer__button.voted { color: #ff7f00; }
.g-footer__button.voted:hover { background: #ff7f00; color: #fff; }

.g-footer__button svg { width: 18px; height: 18px; fill: currentColor; }

/* ============ Sidebar (recommended games) ============ */
.flex-right { display: flex; flex-direction: column; gap: 16px; }

.game_hot_side {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #1c1c1e;
}

.grid-feature {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.game-item {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f7fb;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}

.game-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  text-decoration: none;
}

.list-game img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #e1e4ea;
}

.game-title {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #1c1c1e;
  text-align: center;
}

.text-overflow {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Content (description) ============ */
.content-game {
  background: #fff;
  border-radius: 12px;
  margin-top: 18px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.info-game__text { display: flex; flex-direction: column; gap: 12px; }

.info-game__text .box-image {
  float: right;
  margin: 0 0 12px 16px;
  width: 150px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
}

.info-game__text .box-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-game h1,
.content-game h2,
.content-game h3 {
  color: #1c1c1e;
  margin-top: 18px;
  margin-bottom: 8px;
}

.content-game h2 { font-size: 22px; }
.content-game h3 { font-size: 18px; }
.content-game p { margin: 10px 0; color: #333; }

.categories, .tag {
  display: inline-block;
  margin: 4px 4px 0 0;
}

.scale-button {
  display: inline-block;
  background: #f3f5fa;
  color: #2b2d42;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}

.scale-button:hover {
  background: #003afa;
  color: #fff;
  text-decoration: none;
}

.tag .scale-button { background: #fff4e6; color: #b35900; }
.tag .scale-button:hover { background: #ff7f00; color: #fff; }

.clearfix::after { content: ""; display: table; clear: both; }

/* ============ Footer ============ */
.site-footer {
  background: #1c1c1e;
  color: #c7c9d3;
  padding: 28px 0;
  margin-top: 40px;
}

.site-footer .layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ============ Mobile menu ============ */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0,0,0,0.14);
  z-index: 200;
  padding: 18px;
  transition: right 0.25s ease;
  overflow-y: auto;
}

.mobile-menu.open { right: 0; }

.mobile-close {
  display: flex;
  justify-content: flex-end;
  font-size: 24px;
  cursor: pointer;
  margin-bottom: 12px;
  color: #2b2d42;
}

.mobile-menu-bar { display: flex; flex-direction: column; gap: 2px; }

.mobile-menu-item {
  padding: 10px 12px;
  border-radius: 6px;
  color: #2b2d42;
  font-weight: 600;
  font-size: 14px;
}

.mobile-menu-item:hover { background: #f3f5fa; text-decoration: none; }

/* ============ Fullscreen mode ============ */
.frame-box-game.fullscreen-mode {
  position: fixed;
  inset: 0;
  z-index: 9999;
  border-radius: 0;
  aspect-ratio: auto;
  width: 100vw;
  height: 100vh;
  max-width: none;
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .GameSectionPlay { grid-template-columns: 1fr; }
  .menu-header, .search-menu { display: none; }
  #menu-mobile { display: block; }
}

@media (max-width: 600px) {
  .Header .layout { height: 60px; }
  .Logo img { max-height: 40px; }
  .game-preview__logo img { width: 100px; height: 100px; }
  .game-preview__title { font-size: 20px; }
  .play-btn__ctrl { font-size: 18px; padding: 10px 26px; }
  .player-footer__left h1 { font-size: 16px; }
  .g-footer__button { padding: 6px 10px; font-size: 12px; }
  .grid-feature { grid-template-columns: repeat(2, 1fr); }
  .info-game__text .box-image { float: none; margin: 0 auto 12px; }
  .content-game { padding: 16px; }
}
