@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --surface2: #1e1e1e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f0;
  --muted: #999;
  --steam-teal: #66c0f4;
  --steam-blue: #1b2838;
  --steam-blue-mid: #2a475e;
  --accent: #7c5cff;
  --accent-dim: #6346e0;
  --brand-hot: #e50914;
  --brand-hot-dim: #b0060f;
  --gold: #f6c90e;
  --green: #a4d007;
  --green-bg: #4c6b22;
  --nav-height: 60px;
  --font-display: "Bebas Neue", "Segoe UI", sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* —— Nav (template + NEXUS) —— */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(to bottom, rgba(14, 14, 14, 0.98), rgba(14, 14, 14, 0.75));
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s;
}

.top-nav.scrolled {
  background: rgba(14, 14, 14, 0.96);
  border-bottom-color: var(--border);
}

.top-nav-brand {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

.top-nav-brand span {
  color: var(--steam-teal);
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.top-nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.top-nav-links a:hover,
.top-nav-links a.active {
  color: var(--text);
}

.top-nav-links a.active {
  color: var(--steam-teal);
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-search {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface2);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 140px;
}

@media (min-width: 768px) {
  .nav-search {
    display: flex;
  }
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--steam-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-avatar:hover {
  transform: scale(1.06);
}

/* —— Hero (template cinematic) —— */
.hero {
  position: relative;
  min-height: 520px;
  height: clamp(480px, 72vh, 560px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-height) + 1rem) clamp(1.25rem, 4vw, 3.75rem) 3rem;
  overflow: hidden;
}

.hero-scene {
  position: absolute;
  right: 0;
  top: 0;
  width: min(70%, 900px);
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-img-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 30%, #1b1b2e 60%, #0e0e0e 100%);
}

.scene-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(102, 192, 244, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 192, 244, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(18deg);
  transform-origin: top center;
}

.scene-glow,
.scene-glow2 {
  position: absolute;
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
}

.scene-glow {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.15) 0%, transparent 70%);
  top: 18%;
  right: 18%;
}

.scene-glow2 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(102, 192, 244, 0.12) 0%, transparent 70%);
  bottom: 28%;
  right: 38%;
  animation-delay: 2s;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(14, 14, 14, 0.96) 28%, transparent 68%),
    linear-gradient(to top, var(--bg) 0%, transparent 42%);
  z-index: 1;
}

.hero-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 35%, rgba(102, 192, 244, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 25% 75%, rgba(124, 92, 255, 0.1) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.hero-badge.hot {
  background: var(--brand-hot);
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--steam-teal);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: #fff;
}

.hero-title span {
  color: var(--steam-teal);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-score {
  background: rgba(246, 201, 14, 0.12);
  border: 1px solid rgba(246, 201, 14, 0.35);
  color: var(--gold);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.72rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.hero-tag {
  font-size: 0.65rem;
  padding: 0.2rem 0.55rem;
  border: 0.5px solid rgba(102, 192, 244, 0.35);
  color: var(--steam-teal);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(240, 240, 240, 0.72);
  margin-bottom: 1.5rem;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.hero-stat {
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.hero-stat .stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--steam-teal);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  text-decoration: none;
}

.btn-play,
.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-play:hover,
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.btn-ghost,
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover,
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-accent {
  background: var(--steam-teal);
  color: #0e0e0e;
}

.btn-accent:hover {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* Ticker */
.ticker-bar {
  background: linear-gradient(90deg, var(--accent), var(--brand-hot));
  padding: 0.45rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  gap: 3.5rem;
  animation: ticker 35s linear infinite;
}

.ticker-item {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.ticker-item::before {
  content: "▸ ";
  opacity: 0.65;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Sections */
.section {
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  gap: 1rem;
}

.section-title,
.row-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: uppercase;
}

.section-title span,
.row-title span {
  color: var(--steam-teal);
}

.row-sub,
.section-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.35rem 0 1rem;
}

.section-see-all {
  font-size: 0.72rem;
  color: var(--steam-teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  border-bottom: 0.5px solid rgba(102, 192, 244, 0.35);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.section-see-all:hover {
  opacity: 0.75;
}

.page-inner {
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

/* Category pills */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.55rem;
  max-width: 900px;
}

.category-pill {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 3px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-family: inherit;
  text-decoration: none;
  display: block;
}

button.category-pill {
  width: 100%;
}

.category-pill:hover,
.category-pill.active {
  border-color: rgba(102, 192, 244, 0.4);
  color: var(--steam-teal);
  background: rgba(102, 192, 244, 0.06);
}

.cat-icon {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

/* Steam-style game cards (API store) */
.cards-row {
  display: grid;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}

.cards-row::-webkit-scrollbar {
  height: 4px;
}

.cards-row::-webkit-scrollbar-thumb {
  background: var(--surface2);
  border-radius: 2px;
}

.cards-5 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.cards-4 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.game-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: default;
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}

.game-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(102, 192, 244, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.game-card:hover .card-overlay {
  opacity: 1;
}

.card-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.card-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  border: none;
  cursor: not-allowed;
}

.card-body {
  padding: 0.75rem;
}

.card-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-tier {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--steam-teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-tier.free {
  color: var(--green);
}

.card-rating {
  font-size: 0.68rem;
  color: var(--gold);
  white-space: nowrap;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
  z-index: 2;
}

.badge-gold,
.badge-top {
  background: rgba(246, 201, 14, 0.2);
  color: var(--gold);
  border: 0.5px solid rgba(246, 201, 14, 0.4);
}

.badge-silver {
  background: rgba(180, 180, 190, 0.2);
  color: #d4d4d8;
  border: 0.5px solid rgba(180, 180, 190, 0.35);
}

.badge-new {
  background: var(--accent);
  color: #fff;
}

.badge-certified {
  background: var(--green-bg);
  color: var(--green);
}

/* Netflix poster row (home / inventory) */
.row-scroll {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.poster-card {
  flex: 0 0 auto;
  width: clamp(150px, 20vw, 200px);
  scroll-snap-align: start;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s var(--ease);
}

.poster-card:hover {
  transform: scale(1.06);
  z-index: 5;
}

.poster-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.feature-scroll .poster-image {
  aspect-ratio: 16 / 10;
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 55%);
}

.poster-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
}

.poster-meta h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  margin-bottom: 0.3rem;
}

.asset-poster {
  width: clamp(130px, 16vw, 160px);
}

.asset-poster .poster-image {
  aspect-ratio: 1 / 1;
}

/* Store / profile page headers */
.store-hero,
.profile-hero {
  padding: calc(var(--nav-height) + 2rem) clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
}

.store-hero h1,
.profile-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.store-hero p,
.profile-hero .sub {
  color: var(--muted);
  margin-top: 0.35rem;
  max-width: 480px;
  font-size: 0.9rem;
}

.store-status {
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.store-status.store-error {
  color: #f87171;
}

.profile-hero {
  text-align: center;
}

.profile-avatar-lg {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--steam-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.profile-wallet-box {
  margin: 0 clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 4px;
}

.profile-wallet-box .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.profile-wallet-box code {
  font-size: 0.75rem;
  color: var(--steam-teal);
  word-break: break-all;
}

/* Info strip */
.info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
}

.info-tile {
  padding: 1.15rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s, transform 0.2s;
}

.info-tile:hover {
  border-color: rgba(102, 192, 244, 0.35);
  transform: translateY(-2px);
}

.info-tile h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--steam-teal);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.info-tile p,
.info-tile a {
  font-size: 0.82rem;
  color: var(--muted);
}

.info-tile a {
  color: var(--steam-teal);
}

.info-tile a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer,
.store-footer {
  margin-top: 2.5rem;
  padding: 1.75rem clamp(1.25rem, 4vw, 2.5rem);
  border-top: 0.5px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer-logo span {
  color: var(--steam-teal);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy,
.site-footer {
  font-size: 0.72rem;
  color: rgba(153, 153, 153, 0.55);
}

.site-footer a {
  color: var(--muted);
  margin: 0 0.25rem;
}

.site-footer a:hover {
  color: var(--text);
}

/* Featured spotlight */
.featured-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.featured-art {
  min-height: 200px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
}

.featured-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.featured-info p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  .hero-scene {
    width: 100%;
    opacity: 0.35;
  }

  .featured-spotlight {
    grid-template-columns: 1fr;
  }

  .top-nav-links a:not(.active):nth-child(n + 4) {
    display: none;
  }
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--surface2);
}
