:root {
  --bg: #0c0f14;
  --bg-soft: #10151d;
  --panel: #151b24;
  --panel-2: #1a2230;
  --text: #f2f5fa;
  --muted: #9aa6b2;
  --accent: #58c5ff;
  --accent-2: #64e6a5;
  --hot: #ff5e57;
  --new: #4ad58a;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --header-height: 175px;
  --sidebar-width: 74px;
  --radius: 18px;
  --rail-card-width: 200px;
  --rail-padding: 16px;
  --rail-gap: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Work Sans", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background: radial-gradient(circle at 15% 20%, rgba(88, 197, 255, 0.18), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(100, 230, 165, 0.16), transparent 35%),
    linear-gradient(180deg, #0a0d12 0%, #0f141c 60%, #0c0f14 100%);
  color-scheme: dark;
}

body[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #f0f2f6;
  --panel: #ffffff;
  --panel-2: #eef1f6;
  --text: #1b2430;
  --muted: #5c6c80;
  --border: rgba(15, 23, 35, 0.12);
  --shadow: 0 18px 40px rgba(15, 23, 35, 0.14);
  background: radial-gradient(circle at 20% 10%, rgba(88, 197, 255, 0.18), transparent 38%),
    radial-gradient(circle at 90% 0%, rgba(100, 230, 165, 0.18), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, #edf1f6 60%, #f6f7fb 100%);
  color-scheme: light;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

input,
select,
textarea {
  background: transparent;
  border: none;
  outline: none;
}

textarea {
  resize: vertical;
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 20px;
  background: var(--accent);
  color: #0b0f14;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  z-index: 2000;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding: 0 24px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(8, 11, 16, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  z-index: 1200;
}

body[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.92);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.menu-toggle {
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.logo img {
  width: auto;
  height: 175px;
  border-radius: 24px;
}

.hot-tags {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hot-tags::-webkit-scrollbar {
  height: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(88, 197, 255, 0.4);
  background: rgba(88, 197, 255, 0.08);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tag.hot {
  border-color: rgba(255, 94, 87, 0.6);
  background: rgba(255, 94, 87, 0.15);
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px;
}

.search input {
  width: 260px;
  padding: 10px 72px 10px 34px;
  color: var(--text);
}

.search input::placeholder {
  color: var(--muted);
}

.search-icon {
  position: absolute;
  left: 14px;
  display: grid;
  place-items: center;
}

.search-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
}

.search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--accent);
  color: #0b0f14;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
}

.theme-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.theme-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.icon-sun {
  display: none;
}

body[data-theme="light"] .icon-sun {
  display: block;
}

body[data-theme="light"] .icon-moon {
  display: none;
}

body[data-theme="dark"] .icon-moon {
  display: block;
}

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  padding: 14px 10px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.category-list a {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-list a img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.category-list a:hover {
  border-color: rgba(88, 197, 255, 0.5);
  transform: translateY(-2px);
}

.category-list .label {
  position: absolute;
  left: 58px;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  opacity: 0;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.75rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow);
}

.category-list a:hover .label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.page {
  margin-top: var(--header-height);
  margin-left: var(--sidebar-width);
  padding: 28px 28px 80px;
}

.layout {
  display: grid;
  grid-template-columns: calc(var(--rail-card-width) + var(--rail-padding) * 2) minmax(0, 1fr) calc(var(--rail-card-width) * 2 + var(--rail-gap) + var(--rail-padding) * 2);
  gap: 24px;
  align-items: start;
  grid-template-areas: "left center right";
}

.center-column {
  grid-area: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.left-rail,
.right-rail {
  align-self: start;
  overflow: visible;
  background: rgba(21, 27, 36, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--rail-padding);
  box-shadow: var(--shadow);
}

.left-rail .game-card:hover,
.right-rail .game-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.left-rail {
  grid-area: left;
}

.right-rail {
  grid-area: right;
}

body[data-theme="light"] .left-rail,
body[data-theme="light"] .right-rail {
  background: rgba(255, 255, 255, 0.85);
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rail-header h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.rail-header a {
  font-size: 0.8rem;
  color: var(--accent);
}

.rail-stack {
  display: grid;
  gap: 12px;
}

.rail-card {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 140px;
}

.rail-stack .rail-card {
  aspect-ratio: 3 / 2;
  min-height: 150px;
}

.right-grid .rail-card {
  aspect-ratio: 3 / 2;
  min-height: 130px;
}

.rail-card .title {
  font-size: 0.85rem;
}

.center-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.player-shell {
  background: var(--panel);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 15, 20, 0.6);
}

body[data-theme="light"] .player-top {
  background: rgba(245, 247, 251, 0.9);
}

.player-top div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-top button {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
}

.live-pill {
  background: rgba(255, 94, 87, 0.18);
  color: var(--hot);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.player-brand {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #090c11;
}

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

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.title-row h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  font-family: "Space Grotesk", sans-serif;
}

.quick-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

.rating {
  background: rgba(100, 230, 165, 0.15);
  color: var(--accent-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.cta-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.primary {
  background: var(--accent);
  color: #0b0f14;
}

.ghost {
  background: transparent;
  border-color: var(--border);
}

.strip-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.strip-row::-webkit-scrollbar,
.recommend-grid::-webkit-scrollbar {
  height: 6px;
}

.strip-row::-webkit-scrollbar-thumb,
.recommend-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.game-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid transparent;
  min-height: 120px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.75) 100%);
}

.game-card .title {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-weight: 600;
  z-index: 1;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 197, 255, 0.6);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.game-card.wide {
  min-width: 220px;
  aspect-ratio: 16 / 9;
}

.right-grid {
  display: grid;
  grid-template-columns: repeat(2, var(--rail-card-width));
  gap: var(--rail-gap);
  justify-content: center;
}


.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  z-index: 1;
}

.badge.hot {
  background: rgba(255, 94, 87, 0.9);
  color: #fff;
}

.badge.new {
  background: rgba(74, 213, 138, 0.9);
  color: #0b0f14;
}

.game-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.description-card,
.reviews-card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: var(--shadow);
}

.description-card h2,
.reviews-card h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title .pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(88, 197, 255, 0.12);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.description-card p {
  color: var(--muted);
  line-height: 1.6;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.feature-list span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(100, 230, 165, 0.12);
  font-size: 0.8rem;
}

.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.reviews-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.sort select {
  background: var(--panel-2);
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid var(--border);
}

.review {
  padding: 14px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid transparent;
  margin-bottom: 12px;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(88, 197, 255, 0.2);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.review-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.review p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.review-actions {
  display: flex;
  gap: 10px;
}

.review-actions button {
  border: 1px solid var(--border);
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
}

.comment-form {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.comment-form textarea,
.comment-form input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(12, 15, 20, 0.3);
}

body[data-theme="light"] .comment-form textarea,
body[data-theme="light"] .comment-form input {
  background: rgba(255, 255, 255, 0.7);
}

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

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.recommendations {
  margin-top: 36px;
  width: 100%;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.section-header a {
  color: var(--accent);
}

.recommend-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.cta-center {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.site-footer {
  margin-left: var(--sidebar-width);
  padding: 26px 28px 40px;
  border-top: 1px solid var(--border);
  background: rgba(10, 12, 16, 0.95);
}

body[data-theme="light"] .site-footer {
  background: rgba(246, 247, 251, 0.95);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo img {
  width: auto;
  height: 175px;
  border-radius: 24px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.6s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

.delay-5 {
  animation-delay: 0.5s;
}

.delay-6 {
  animation-delay: 0.6s;
}

.delay-7 {
  animation-delay: 0.7s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "center"
      "left"
      "right";
  }

  .left-rail,
  .right-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .right-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 960px) {
  .site-header {
    flex-wrap: wrap;
    height: var(--header-height);
    padding: 12px 16px 12px 16px;
    gap: 12px;
  }

  .page {
    margin-top: var(--header-height);
  }

  .sidebar {
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
  }

  .header-left {
    flex-wrap: wrap;
  }

  .search input {
    width: 200px;
  }

  .title-row {
    flex-direction: column;
  }


  .recommend-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 720px) {
  .sidebar {
    width: 62px;
  }

  .page {
    margin-left: 62px;
    padding: 20px 16px 60px;
  }

  .site-footer {
    margin-left: 62px;
  }

  .search {
    width: 100%;
  }

  .search input {
    width: 100%;
  }

  .strip-row {
    grid-auto-columns: minmax(180px, 1fr);
  }

  .recommend-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 520px) {
  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .recommend-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-toggle {
    display: none;
  }

  .hot-tags {
    width: 100%;
  }

  .search input {
    padding-right: 60px;
  }

  .search button {
    padding: 8px 10px;
  }

  .theme-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
