/* ============================================================
   GameHub — Main Stylesheet  (Light Theme · Orange Accent)
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --bg:           #f5f6fa;
  --bg2:          #ffffff;
  --bg3:          #eef0f5;
  --card:         #ffffff;
  --card-hover:   #fafbff;
  --text:         #1a1a2e;
  --text2:        #555770;
  --text3:        #9899a6;
  --primary:      #ff6200;
  --primary-h:    #e55800;
  --primary-light: rgba(255,98,0,.12);
  --primary-glow: rgba(255,98,0,.28);
  --red:          #ef4444;
  --green:        #16a34a;
  --gold:         #f59e0b;
  --border:       rgba(0,0,0,.07);
  --shadow-sm:    0 2px 8px rgba(0,0,0,.07);
  --shadow-md:    0 6px 20px rgba(0,0,0,.10);
  --shadow-lg:    0 12px 36px rgba(0,0,0,.14);
  --radius:       16px;
  --radius-sm:    10px;
  --nav-h:        60px;
  --sidebar-w:    224px;
  --ease:         cubic-bezier(.4,0,.2,1);
  --trans:        .18s var(--ease);
}

/* ===== RESET ===== */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
ul { list-style:none; }
button { cursor:pointer; border:none; background:none; font:inherit; color:inherit; }
input,select { font:inherit; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width:5px; height:4px; }
::-webkit-scrollbar-track { background:var(--bg3); }
::-webkit-scrollbar-thumb { background:#d0d3e0; border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--primary); }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
  flex-shrink: 0;
}
.menu-btn:hover { background: var(--bg3); }
.menu-btn span {
  display: block;
  width: 21px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--trans), opacity var(--trans);
}
.menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.4rem; }
.logo-text { color: var(--primary); }

/* Search */
.search-wrap { flex: 1; max-width: 460px; margin: 0 auto; }
.search-form {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 9px 16px;
  color: var(--text);
  font-size: .9rem;
}
.search-input::placeholder { color: var(--text3); }
.search-btn { padding: 8px 13px; color: var(--text3); transition: color var(--trans); }
.search-btn:hover { color: var(--primary); }
.search-btn svg { width: 18px; height: 18px; display: block; }

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.search-toggle {
  display: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  transition: background var(--trans);
}
.search-toggle:hover { background: var(--bg3); }
.search-toggle svg { width: 20px; height: 20px; display: block; }
.btn-signin {
  padding: 7px 18px;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  transition: background var(--trans), color var(--trans), transform var(--trans);
  white-space: nowrap;
}
.btn-signin:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== OVERLAY (mobile) ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,.40);
  backdrop-filter: blur(2px);
}
.overlay.active { display: block; }

/* ===== AD SLOTS ===== */
.ad-wrap { text-align: center; padding: 6px 16px; }
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px dashed #d0d3e0;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.ad-label {
  font-size: .65rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .1em;
  text-align: center;
  user-select: none;
  pointer-events: none;
}
.ad-leaderboard { width: 300px; height: 250px; max-width: 100%; margin: 0 auto; }
.ad-rect        { width: 300px; height: 250px; margin: 16px auto; }
.ad-incontent   { width: 300px; max-width: 100%; height: 250px; margin: 20px auto; }
.ad-banner      { width: 320px; height: 50px;  max-width: 100%; margin: 20px auto; }

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 22px;
  align-items: flex-start;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-h) + 8px);
  max-height: calc(100vh - var(--nav-h) - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 32px;
  scrollbar-width: thin;
}
.sidebar-inner { padding: 10px 0; }
.sidebar-heading {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  padding: 10px 14px 6px;
}

/* Category list */
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--trans), color var(--trans);
  font-size: .875rem;
  font-weight: 500;
  user-select: none;
}
.cat-item:hover { background: var(--bg3); }
.cat-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.cat-icon { font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; }
.cat-name { flex: 1; }
.cat-count {
  font-size: .7rem;
  color: var(--text3);
  background: var(--bg3);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.cat-item.active .cat-count { background: var(--primary-light); color: var(--primary); }

/* Hot list */
.hot-list { display: flex; flex-direction: column; gap: 2px; }
.hot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--trans);
}
.hot-item:hover { background: var(--bg3); }
.hot-item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.hot-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.hot-info { min-width: 0; }
.hot-title { font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.hot-plays { font-size: .72rem; color: var(--text3); margin-top: 1px; }

/* ===== MAIN CONTENT ===== */
.content { flex: 1; min-width: 0; padding: 18px 0 36px; }

/* ===== SECTIONS ===== */
.section { margin-bottom: 28px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.see-all {
  font-size: .82rem;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: opacity var(--trans);
}
.see-all::after { content: ' ›'; font-size: 1rem; }
.see-all:hover { opacity: .75; }

/* ===== FEATURED SCROLL ===== */
.featured-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.featured-scroll::-webkit-scrollbar { height: 3px; }
.featured-card {
  flex-shrink: 0;
  width: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans);
  position: relative;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.featured-thumb {
  width: 100%;
  height: 110px;
  overflow: hidden;
  position: relative;
}
.featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--ease);
}
.featured-card:hover .featured-thumb img { transform: scale(1.07); }
.featured-info {
  padding: 9px 10px 10px;
  background: var(--card);
}
.featured-title {
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  color: var(--text);
}
.featured-meta { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--text3); }
.feat-rating { color: var(--gold); font-weight: 700; }

/* ===== CATEGORY PILLS (mobile) ===== */
.pills-wrap { display: none; margin-bottom: 18px; }
.pills-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pills-scroll::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0;
  padding: 7px 16px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans), color var(--trans);
  white-space: nowrap;
  user-select: none;
  color: var(--text2);
  box-shadow: var(--shadow-sm);
}
.pill:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.pill.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px var(--primary-glow); }

/* ===== GAMES GRID ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* ===== GAME CARD (overlay style) ===== */
a.game-card,
a.featured-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.game-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans);
  animation: fadeUp .3s var(--ease) both;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Thumbnail */
.game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}
.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--ease);
}
.game-card:hover .game-thumb img { transform: scale(1.06); }

/* Info overlay at bottom of image */
.game-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 9px;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.45) 60%, transparent 100%);
  color: #fff;
}
.game-title {
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin-bottom: 3px;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .7rem;
  color: rgba(255,255,255,.85);
}
.game-rating { color: #ffd166; font-weight: 700; }
.game-plays { color: rgba(255,255,255,.8); }
.game-plays::before { content: '🔥 '; }

/* Hover play overlay */
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,98,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--trans);
}
.game-card:hover .game-overlay { opacity: 1; }
.play-btn {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(.75);
  transition: transform var(--trans);
  box-shadow: 0 4px 16px rgba(255,98,0,.5);
}
.game-card:hover .play-btn { transform: scale(1); }
.play-btn svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }

/* Badges */
.game-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.4;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.badge-hot { background: var(--primary); color: #fff; box-shadow: 0 2px 8px var(--primary-glow); }
.badge-new { background: var(--green); color: #fff; }

/* ===== SORT ===== */
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-select {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .8rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
  box-shadow: var(--shadow-sm);
}
.sort-select:focus { border-color: var(--primary); }

/* ===== LOAD MORE ===== */
.load-more-wrap { text-align: center; margin-top: 24px; }
.btn-load-more {
  padding: 11px 38px;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 24px;
  color: var(--primary);
  font-size: .9rem;
  font-weight: 700;
  transition: background var(--trans), color var(--trans), transform var(--trans), box-shadow var(--trans);
}
.btn-load-more:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-load-more:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ===== NO RESULTS ===== */
.no-results {
  grid-column: 1 / -1;
  padding: 52px 24px;
  text-align: center;
  color: var(--text3);
}
.no-results .nr-icon { font-size: 3rem; margin-bottom: 12px; }
.no-results h3 { font-size: 1.1rem; color: var(--text2); margin-bottom: 6px; }
.no-results p { font-size: .88rem; }

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 16px;
  color: rgba(255,255,255,.8);
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer .logo-text { color: var(--primary); -webkit-text-fill-color: var(--primary); }
.footer-brand { max-width: 230px; flex-shrink: 0; }
.footer-tagline { font-size: .84rem; color: rgba(255,255,255,.45); margin-top: 10px; line-height: 1.7; }
.footer-nav { flex: 1; display: flex; gap: 32px; flex-wrap: wrap; min-width: 0; }
.footer-col h3 {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.55);
  margin-bottom: 12px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: .84rem; color: rgba(255,255,255,.45); transition: color var(--trans); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 16px 24px;
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.3);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .28s, transform .28s;
  pointer-events: none;
  z-index: 80;
  box-shadow: 0 4px 14px var(--primary-glow);
  font-weight: 700;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, #e8eaf0 50%, var(--bg3) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 1100px) {
  :root { --sidebar-w: 190px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
  :root { --nav-h: 54px; --sidebar-w: 270px; }

  .menu-btn { display: flex; }
  .search-wrap { display: none; }
  .search-wrap.mobile-open {
    display: flex;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    padding: 8px 12px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    z-index: 101;
    box-shadow: var(--shadow-md);
    animation: fadeUp .18s var(--ease) both;
  }
  .search-toggle { display: flex; }
  .btn-signin { display: none; }

  .ad-wrap { display: none; }

  .main-layout { padding: 0 10px; gap: 0; }

  .sidebar {
    position: fixed;
    top: var(--nav-h);
    left: calc(-1 * var(--sidebar-w) - 4px);
    height: calc(100vh - var(--nav-h));
    background: var(--bg2);
    z-index: 95;
    border-right: 1px solid var(--border);
    transition: left .28s var(--ease);
    max-height: none;
    padding-bottom: 48px;
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
  }
  .sidebar.open { left: 0; }

  .pills-wrap { display: block; }

  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .featured-card { width: 150px; }
  .featured-thumb { height: 92px; }

  .footer-inner { flex-direction: column; gap: 20px; padding: 28px 16px 24px; }
  .footer-nav { gap: 20px; }
  .footer-col { min-width: 120px; }

  .back-to-top { bottom: 16px; right: 14px; }
}

/* ===== WIDE SCREENS ===== */
@media (min-width: 1280px) {
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(162px, 1fr)); }
}
@media (min-width: 1440px) {
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
}

/* ============================================================
   GAME DETAIL PAGE
   ============================================================ */

.hidden { display: none !important; }

/* Breadcrumb */
.breadcrumb-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 16px 4px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text3);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text2); transition: color var(--trans); }
.breadcrumb a:hover { color: var(--primary); }
.bc-sep { opacity: .4; }
.bc-cat { color: var(--text2); }
.bc-current { color: var(--text); font-weight: 600; }

/* Outer wrapper */
.game-page-outer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

/* Landing layout */
.game-landing {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.game-detail-main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Cover block */
.game-cover-wrap {
  width: 360px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--bg3);
  box-shadow: var(--shadow-md);
}
.game-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--ease);
}
.game-cover-wrap:hover .game-cover-img { transform: scale(1.04); }

.cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.48);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--trans);
  color: white;
  font-size: .9rem;
  font-weight: 600;
}
.game-cover-wrap:hover .cover-overlay { opacity: 1; }
.cover-play-icon {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px var(--primary-glow);
  transition: transform var(--trans);
}
.cover-play-icon svg { width: 26px; height: 26px; margin-left: 3px; }
.game-cover-wrap:hover .cover-play-icon { transform: scale(1.1); }

/* Game info panel */
.game-detail-info { flex: 1; min-width: 0; padding-top: 4px; }
.detail-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-cat-badge {
  padding: 4px 14px;
  background: var(--primary-light);
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
}
.detail-badge-hot,
.detail-badge-new {
  display: none;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 800;
  color: white;
}
.detail-badge-hot { background: var(--primary); }
.detail-badge-new { background: var(--green); }

.detail-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text);
  letter-spacing: -.02em;
}
.detail-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: .88rem;
  flex-wrap: wrap;
}
.detail-rating { color: var(--gold); font-weight: 700; font-size: .95rem; }
.detail-plays  { color: var(--text3); }

.detail-desc {
  font-size: .9rem;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 22px;
  max-width: 520px;
}

.btn-play-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 38px;
  background: var(--primary);
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  box-shadow: 0 4px 20px var(--primary-glow);
  border: none;
  cursor: pointer;
}
.btn-play-now svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-play-now:hover {
  background: var(--primary-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--primary-glow);
}

/* Tip sidebar */
.game-sidebar { flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.sidebar-tip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  max-width: 300px;
  box-shadow: var(--shadow-sm);
}
.tip-label { font-size: .78rem; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.tip-text  { font-size: .82rem; color: var(--text3); line-height: 1.6; }

/* Playing state */
.game-playing { margin-bottom: 28px; }

.game-frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 9px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.frame-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.frame-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}
.frame-game-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frame-actions { display: flex; gap: 8px; flex-shrink: 0; }
.frame-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans), color var(--trans);
}
.frame-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }
.frame-btn-close:hover { background: var(--red); border-color: var(--red); }

.frame-container {
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  background: #000;
  line-height: 0;
}
#gameFrame {
  width: 100%;
  height: calc(100vh - var(--nav-h) - 52px);
  min-height: 480px;
  max-height: 900px;
  border: none;
  display: block;
}

/* More games */
.more-games-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* ===== GAME PAGE RESPONSIVE ===== */
@media (max-width: 1100px) {
  .game-cover-wrap { width: 300px; }
  .detail-title { font-size: 1.5rem; }
}
@media (max-width: 900px) {
  .game-landing { flex-direction: column; }
  .game-sidebar { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .sidebar-tip { max-width: none; flex: 1; }
}
@media (max-width: 768px) {
  .game-detail-main { flex-direction: column; gap: 16px; }
  .game-cover-wrap  { width: 100%; max-width: 480px; margin: 0 auto; }
  .cover-overlay { opacity: 1; background: rgba(0,0,0,.35); }
  .detail-title { font-size: 1.35rem; }
  .btn-play-now { width: 100%; justify-content: center; }
  #gameFrame { height: 56vw; min-height: 260px; max-height: none; }
}
@media (max-width: 600px) {
  .game-sidebar { display: block; width: 100%; }
  .sidebar-tip { width: 100%; }
}
