/* ==========================================================
   Design tokens
   Direction: arcade marquee — deep indigo cabinet, dual neon
   accent (cyan + magenta), ticket-stub game cards.
   ========================================================== */
:root {
  --bg:          #14122B;
  --bg-alt:      #0F0D22;
  --surface:     #1E1B3A;
  --surface-hi:  #262148;
  --border:      rgba(255,255,255,0.08);
  --text:        #F2F0FA;
  --text-dim:    #A9A3C9;
  --cyan:        #4CE0D2;
  --magenta:     #FF3D81;
  --amber:       #FFC857;

  --font-display: 'Bungee', system-ui, sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--cyan); }

::selection { background: var(--magenta); color: #fff; }

/* ==========================================================
   Shell layout: icon sidebar (site-wide) + slim top bar
   ========================================================== */
.gp-shell {
  display: flex;
  min-height: 100vh;
}

.gp-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

/* ---- Sidebar ---- */
.gp-sidebar {
  width: 76px;
  flex: 0 0 auto;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 60;
  scrollbar-width: none;
}
.gp-sidebar::-webkit-scrollbar { display: none; }

.gp-sidebar-brand {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: var(--bg);
  margin-bottom: 1rem;
  flex: 0 0 auto;
}
.gp-sidebar-brand svg { width: 22px; height: 22px; }

.gp-sidebar-icons {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  align-items: center;
}

.gp-sidebar-icon {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.25rem;
  border-radius: 8px;
  color: var(--text-dim);
}
.gp-sidebar-icon svg { width: 20px; height: 20px; }
.gp-sidebar-icon span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.gp-sidebar-icon:hover { background: var(--surface); color: var(--text); }
.gp-sidebar-icon.active { background: var(--surface-hi); color: var(--cyan); }

.gp-sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 55;
}
.gp-sidebar-backdrop.show { display: block; }

/* ---- Top bar ---- */
.gp-shell-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.gp-topbar {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.gp-topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
}

.gp-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.gp-hamburger svg { width: 18px; height: 18px; }

.gp-search {
  position: relative;
  max-width: 520px;
}
.gp-search svg {
  position: absolute;
  left: 0.9rem; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}
.gp-search input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  width: 100%;
}
.gp-search input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(76,224,210,0.15);
}

.gp-main { flex: 1 1 auto; }
.gp-main-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

/* ---- Hero ---- */
.gp-hero-compact {
  background:
    radial-gradient(circle at 15% 20%, rgba(76,224,210,0.14), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(255,61,129,0.14), transparent 40%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
}
.gp-hero-compact h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.gp-hero-compact p { color: var(--text-dim); max-width: 48ch; margin: 0; }

/* ---- Empty state ---- */
.gp-empty-state {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}
.gp-empty-state svg { width: 28px; height: 28px; color: var(--amber); flex: 0 0 auto; }
.gp-empty-state a { color: var(--cyan); text-decoration: underline; }

/* ---- Shelves (horizontal scrolling rows) ---- */
.gp-shelf { margin-bottom: 2rem; }

.gp-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.gp-shelf-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
}
.gp-shelf-more {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.gp-shelf-more:hover { color: var(--cyan); }

.gp-shelf-scroll-wrap { position: relative; }

.gp-shelf-track {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}
.gp-shelf-track::-webkit-scrollbar { display: none; }

.gp-shelf-card {
  flex: 0 0 auto;
  width: 190px;
}

.gp-shelf-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gp-shelf-arrow svg { width: 16px; height: 16px; }
.gp-shelf-arrow.left { left: -14px; }
.gp-shelf-arrow.right { right: -14px; }
.gp-shelf-scroll-wrap:hover .gp-shelf-arrow { opacity: 1; }
@media (max-width: 767px) {
  .gp-shelf-arrow { display: none; }
}

/* ---- Card badge tags (Top / New) ---- */
.badge-tag {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--amber);
  color: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.badge-tag svg { width: 11px; height: 11px; }
.badge-tag.badge-new { background: var(--cyan); }

/* ---- Game card: ticket-stub signature ---- */
.gp-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: block;
}
.gp-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  color: var(--text);
}
.gp-card .thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-hi);
}
.gp-card .thumb-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.25s ease;
}
.gp-card:hover .thumb-wrap img { transform: scale(1.06); }

/* perforation strip between thumbnail and info, ticket-stub look */
.gp-card .perf {
  height: 14px;
  background-image: radial-gradient(circle at 7px 7px, var(--bg) 7px, transparent 7.5px);
  background-size: 14px 14px;
  background-position: -7px center;
  background-repeat: repeat-x;
  margin-top: -1px;
}

.gp-card .badge-cat {
  position: absolute;
  top: 8px; left: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  background: rgba(15,13,34,0.85);
  color: var(--amber);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.gp-card .info { padding: 0.75rem 0.9rem 0.9rem; }
.gp-card .title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gp-card .meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---- Game player page ---- */
.gp-player-frame {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.gp-player-frame iframe { display: block; width: 100%; border: 0; }

.gp-playbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---- Ad slot ---- */
.gp-ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-height: 100px;
}

/* ---- Footer ---- */
.gp-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 1rem;
}
.gp-footer .gp-main-inner { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.gp-footer a:hover { color: var(--cyan); }

/* ---- Section headers ---- */
.gp-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gp-section-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); display: inline-block; }

/* ---- Pagination ---- */
.gp-pagination a, .gp-pagination span {
  font-family: var(--font-mono);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-right: 0.3rem;
  color: var(--text-dim);
  display: inline-block;
}
.gp-pagination a:hover { border-color: var(--cyan); color: var(--text); }
.gp-pagination .current { background: var(--cyan); color: var(--bg); font-weight: 700; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gp-card, .gp-card .thumb-wrap img { transition: none; }
}

/* ---- Responsive: collapse sidebar to an off-canvas drawer on mobile ---- */
@media (max-width: 991px) {
  .gp-hamburger { display: flex; }

  .gp-sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    align-items: stretch;
    padding: 1rem 0.75rem;
  }
  .gp-sidebar.open { transform: translateX(0); }

  .gp-sidebar-icons { align-items: stretch; }
  .gp-sidebar-icon {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
  }
  .gp-sidebar-icon span { font-size: 0.75rem; text-transform: none; }

  .gp-shelf-card { width: 150px; }
}

@media (max-width: 575px) {
  .gp-topbar-inner { gap: 0.6rem; padding: 0.6rem 0.9rem; }
  .gp-logo { display: none; }
  .gp-main-inner { padding: 1rem 0.9rem 2rem; }
}
