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

/* ─── Base ───────────────────────────────────────────────── */
body {
  background: #111;
  color: #ccc;
  font-family: monospace;
  min-height: 100vh;
  user-select: none;
  overflow-x: hidden;
}

img, canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ─── Site Header / Nav ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #111;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 52px;
}

.site-logo {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
}

.site-logo span {
  color: #ff6b35;
}

.site-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

[hidden] {
  display: none !important;
}

.site-nav a,
.site-nav .nav-action,
.site-nav .nav-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  font-family: monospace;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: #666;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav .nav-action:hover {
  color: #ccc;
  border-color: #444;
}

.site-nav a.active,
.site-nav .nav-action.active {
  color: #ff6b35;
  border-color: #ff6b35;
}

.nav-action {
  cursor: pointer;
}

.site-nav .nav-soon {
  color: #333;
  border-style: dashed;
  cursor: default;
  pointer-events: none;
}

.site-nav .nav-soon::after {
  content: " (soon)";
  font-size: 12px;
  color: #2a2a2a;
  letter-spacing: 0;
}


/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  display: flex;
  gap: 32px;
  align-items: stretch;
  padding: 40px 32px;
  border-bottom: 1px solid #2a2a2a;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.hero-label {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ff6b35;
}

.hero-title {
  font-size: 34px;
  color: #fff;
  letter-spacing: 3px;
}

.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tags .tag-pill {
  width: auto;
  padding: 3px 8px;
  cursor: default;
  pointer-events: none;
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-top: 4px;
}

.hero-btn {
  flex-shrink: 0;
  font-family: monospace;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: none;
  color: #ff6b35;
  border: 1px solid #ff6b35;
  border-radius: 3px;
  padding: 8px 24px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.hero-btn:hover {
  background: #ff6b35;
  color: #111;
}

.hero-art {
  width: 340px;
  aspect-ratio: 16/9;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a2a;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,107,53,0.03) 20px,
    rgba(255,107,53,0.03) 21px
  );
}

/* ─── Browse Section ─────────────────────────────────────── */
.browse {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.browse-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.browse-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.browse-sidebar {
  flex-shrink: 0;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 68px;
}

.search-input {
  font-family: monospace;
  font-size: 15px;
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 7px 14px;
  outline: none;
  width: 100%;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.search-input::placeholder { color: #333; }

.search-input:focus { border-color: #ff6b35; }

.tag-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ─── Tag Pills ──────────────────────────────────────────── */
.tag-pill {
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  background: #1a1a1a;
  color: #555;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, color 0.15s;
}

.tag-pill:hover {
  border-color: #555;
  color: #ccc;
}

.tag-pill.active {
  border-color: #ff6b35;
  color: #ff6b35;
  background: rgba(255, 107, 53, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.22);
}

.tag-filter-separator {
  height: 1px;
  margin: 8px 0 4px;
  background: #2a2a2a;
}

/* ─── Games Grid ─────────────────────────────────────────── */
#games-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}

.browse-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
  width: 100%;
}

.browse-pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.browse-pagination-btn {
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  min-width: 34px;
  padding: 7px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  background: #1a1a1a;
  color: #777;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.browse-pagination-btn:hover:not(:disabled) {
  border-color: #555;
  color: #ccc;
}

.browse-pagination-page.is-active {
  border-color: #ff6b35;
  color: #ff6b35;
  background: rgba(255, 107, 53, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.22);
}

.browse-pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.browse-pagination-ellipsis {
  color: #444;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 0 4px;
}

/* ─── Game Card ──────────────────────────────────────────── */
.game-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: default;
  transition: transform 0.15s;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-2px);
}

.game-card-launch {
  display: block;
  width: 100%;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  background: #161616;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.game-card-launch:hover {
  border-color: #444;
  transform: translateY(-2px);
}

.game-card-launch:focus-visible {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

.game-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a2a;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.game-card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,107,53,0.03) 10px,
    rgba(255,107,53,0.03) 11px
  );
}

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

.game-card-body {
  padding: 12px 2px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.game-card-topline {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.game-card-name {
  font-size: 16px;
  color: #ccc;
  letter-spacing: 1px;
}

.game-card:hover .game-card-name { color: #fff; }

.favorite-toggle,
.favorite-remove {
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #777;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 5px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.favorite-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.favorite-toggle:hover,
.favorite-remove:hover {
  color: #ccc;
  border-color: #555;
}

.favorite-toggle.is-active {
  color: #ffd400;
  border-color: #ffd400;
}

.favorite-toggle.is-active:hover {
  background: rgba(255, 212, 0, 0.08);
}

.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 8px;
}

.game-card-rating {
  color: #888;
  font-size: 12px;
  letter-spacing: 1px;
  margin-top: 2px;
}

.game-card-vote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-card-vote-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.game-card-tags .tag-pill {
  width: auto;
  padding: 3px 8px;
}

/* ─── Screenshots Gallery ────────────────────────────────── */
.screenshots {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a #111;
}

.screenshots::-webkit-scrollbar { height: 4px; }
.screenshots::-webkit-scrollbar-track { background: #111; }
.screenshots::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

.screenshot-box {
  flex-shrink: 0;
  width: 340px;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a2a;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  overflow: hidden;
}

.screenshot-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Game Detail Page ───────────────────────────────────── */
.game-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.back-link {
  font-family: monospace;
  font-size: 15px;
  color: #444;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 28px;
  transition: color 0.15s;
}

.back-link:hover { color: #ccc; }

.game-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.game-hero-name {
  font-size: 34px;
  color: #fff;
  letter-spacing: 3px;
}

.game-hero-desc {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

.game-hero-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 4px;
}

.game-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.game-detail-vote-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.game-hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-hero-tags .tag-pill {
  width: auto;
  padding: 3px 8px;
  cursor: default;
  pointer-events: none;
}

#play-btn {
  align-self: flex-start;
  font-family: monospace;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: none;
  color: #ff6b35;
  border: 1px solid #ff6b35;
  border-radius: 3px;
  padding: 8px 24px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

#play-btn:hover { background: #ff6b35; color: #111; }

.runtime-fullscreen-btn {
  position: fixed;
  top: 66px;
  right: 32px;
  z-index: 120;
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #555;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 4px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.runtime-fullscreen-btn:hover {
  color: #ccc;
  border-color: #555;
}

.screenshots-section {
  margin-bottom: 32px;
}

.section-label {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 14px;
  border-bottom: 1px solid #1e1e1e;
  padding-bottom: 8px;
}

#status {
  font-size: 15px;
  color: #555;
  margin-top: 12px;
  min-height: 1.4em;
}

/* ─── About section ──────────────────────────────────────── */
.game-about-section {
  margin-bottom: 32px;
}

.game-meta-section {
  margin-bottom: 32px;
}

.game-meta-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.game-vote-panel {
  padding: 10px 12px;
  height: 100%;
}

.game-vote-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.game-vote-summary {
  color: #ccc;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

.game-vote-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.game-vote-btn-icon {
  font-variant-emoji: text;
}

.game-vote-btn-icon .game-vote-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.game-vote-actions .favorite-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-vote-panel .game-vote-btn-icon:hover:not(:disabled),
.game-detail-vote-actions .game-vote-btn-icon:hover:not(:disabled) {
  color: #ccc;
}

.game-vote-panel .game-vote-btn-icon.is-active,
.game-card-vote-toggle.is-active,
.game-detail-vote-actions .game-vote-btn-icon.is-active {
  color: #ffd400;
}

.game-vote-panel .game-meta-key,
.game-vote-panel .game-meta-value {
  font-family: monospace;
}

.game-vote-panel .game-meta-key {
  margin-bottom: 6px;
}

.game-vote-panel .game-meta-value {
  color: #ccc;
  font-size: 14px;
  line-height: 1.4;
}

.game-meta-layout .game-meta-grid {
  margin: 0;
}

.game-meta-layout .game-meta-item {
  min-height: 100%;
}

.game-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.game-meta-item {
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  background: #121212;
  padding: 10px 12px;
}

.game-meta-key {
  color: #666;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.game-meta-value {
  color: #ccc;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.detail-status {
  min-height: 1.4em;
  color: #555;
  font-size: 14px;
}

.detail-status.is-error {
  color: #ff6b35;
}

.game-about {
  font-size: 15px;
  color: #666;
  line-height: 1.8;
}

#detail-meta-content {
  margin-top: 18px;
}

.game-about p { margin-bottom: 12px; }

.game-about h1,
.game-about h2,
.game-about h3 {
  color: #ccc;
  letter-spacing: 2px;
  margin: 20px 0 8px;
}

.game-about ul,
.game-about ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.game-about li { margin-bottom: 4px; }

.game-about code {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 1px 6px;
  font-family: monospace;
  font-size: 13px;
  color: #ff6b35;
}

.game-about pre {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 12px 16px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.game-about pre code {
  border: none;
  padding: 0;
  color: #aaa;
}

.game-about strong { color: #aaa; }

.game-about a {
  color: #ff6b35;
  text-decoration: none;
}

.game-about a:hover { text-decoration: underline; }

.game-about hr {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 20px 0;
}

#canvas {
  display: none;
  margin-top: 20px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#canvas:fullscreen,
#canvas:-webkit-full-screen,
#canvas:-moz-full-screen,
#canvas:-ms-fullscreen {
  width: 100vw;
  height: 100vh;
  margin: 0;
}

/* ─── Playing state ──────────────────────────────────────── */
body.is-playing .game-page {
  max-width: 100%;
  width: 100%;
  padding: 16px 0;
}

body.is-playing #status {
  text-align: center;
}

body.is-playing #canvas {
  display: block !important;
  margin: 0 auto;
}

/* ─── Empty / error states ───────────────────────────────── */
.empty-state {
  color: #333;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 40px 0;
  text-align: center;
}

/* ─── User Panel ────────────────────────────────────────── */
.user-panel {
  border-top: 1px solid #2a2a2a;
  background: #0f0f0f;
}

.user-panel-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 56px;
}

.panel-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.panel-heading h2 {
  font-size: 30px;
  color: #fff;
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-transform: lowercase;
}

.panel-heading p {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
}

.auth-grid,
.account-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-account-shell {
  grid-template-columns: 1fr;
}

.auth-card,
.account-card,
.favorites-card {
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  background: #141414;
  padding: 18px;
}

.auth-card h3,
.account-card h3 {
  color: #fff;
  font-size: 22px;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-transform: lowercase;
}

.auth-card label {
  display: block;
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 12px;
}

.auth-card input {
  width: 100%;
  margin-top: 6px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 10px 12px;
  color: #ccc;
  font-family: monospace;
}

.auth-card input:focus {
  outline: none;
  border-color: #ff6b35;
}

.auth-card input.is-invalid {
  border-color: #ff6b35;
  background: rgba(255, 107, 53, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.25);
}

.field-error {
  display: block;
  min-height: 1.1em;
  margin-top: 6px;
  color: #ff6b35;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

.auth-card button {
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #ff6b35;
  color: #111;
  border: 0;
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
}

.auth-card button:hover { filter: brightness(1.05); }

.account-card p,
.account-card a {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.account-card a {
  display: inline-block;
  margin-top: 8px;
  color: #ff6b35;
  text-decoration: none;
}

.profile-url-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.profile-url-link {
  margin: 0;
}

.profile-url-copy {
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #777;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 5px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.profile-url-copy:hover:not(:disabled) {
  color: #ccc;
  border-color: #555;
}

.profile-url-copy:disabled {
  opacity: 0.5;
  cursor: default;
}

.favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}

.favorite-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #1e1e1e;
}

.favorite-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.favorite-name {
  color: #ccc;
  font-size: 16px;
  letter-spacing: 1px;
}

.favorite-desc {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 4px;
}

.auth-status {
  min-height: 1.4em;
  margin-top: 14px;
  color: #666;
  font-size: 14px;
}

.auth-status.is-error {
  color: #ff6b35;
}

@media (max-width: 900px) {
  .auth-grid,
  .account-shell {
    grid-template-columns: 1fr;
  }

  .user-panel-shell {
    padding: 32px 20px 48px;
  }
}

@media (max-width: 720px) {
  .site-header,
  .hero,
  .browse,
  .game-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .browse-layout {
    flex-direction: column;
  }

  .browse-sidebar {
    width: 100%;
    position: static;
  }

  .game-card-topline,
  .favorite-row,
  .hero-footer,
  .game-hero-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-meta-layout {
    grid-template-columns: 1fr;
  }
}

/* ─── My Games Panel ─────────────────────────────────────── */
.create-panel-shell {
  color: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 20px 0 32px;
}

.my-games-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.my-games-file-label {
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.my-games-file-label:hover {
  color: #ccc;
  border-color: #555;
}

.my-games-filename {
  font-family: monospace;
  font-size: 13px;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.my-games-upload-btn {
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #111;
  background: #ff6b35;
  border: 0;
  border-radius: 3px;
  padding: 7px 18px;
  cursor: pointer;
  transition: filter 0.15s;
}

.my-games-upload-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.my-games-upload-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.my-games-status {
  font-family: monospace;
  font-size: 13px;
  color: #555;
  min-height: 1.4em;
  margin-bottom: 16px;
}

.my-games-status.is-error {
  color: #ff6b35;
}

.my-games-section-label {
  margin-bottom: 16px;
}

/* ─── Docs Page ─────────────────────────────────────────── */
.docs-intro {
  max-width: 1200px;
  margin: 0 auto 18px;
  padding: 32px 32px 0;
}

.docs-page {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.docs-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  width: max-content;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.docs-intro h2 {
  font-size: 30px;
  color: #fff;
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-transform: none;
}

.docs-intro p {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
}

.learn-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #2a2a2a;
  flex-wrap: wrap;
}

.learn-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.learn-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.learn-cta-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: #2a2a2a;
}

.learn-cta-discord {
  margin-top: -4px;
}

.learn-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.12), 0 10px 24px rgba(255, 107, 53, 0.12);
}

.learn-cta-copy {
  margin: 0;
  color: #888;
  font-size: 14px;
  line-height: 1.6;
  max-width: 44ch;
  flex: 1 1 280px;
}

.docs-toc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  width: max-content;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.docs-toc a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: #666;
  text-decoration: none;
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.docs-toc a:hover {
  color: #ccc;
  border-color: #444;
}

.docs-toc .toc-level-3 {
  opacity: 0.85;
}

.docs-content {
  min-width: 0;
  font-size: 15px;
  color: #666;
  line-height: 1.8;
}

.docs-content p {
  margin-bottom: 12px;
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4,
.docs-content h5,
.docs-content h6 {
  color: #ccc;
  letter-spacing: 2px;
  margin: 24px 0 10px;
}

.docs-content h1 {
  font-size: 30px;
}

.docs-content h2 {
  font-size: 22px;
}

.docs-content h3 {
  font-size: 18px;
}

.docs-content ul,
.docs-content ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.docs-content li {
  margin-bottom: 4px;
}

.docs-content code {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 1px 6px;
  font-family: monospace;
  font-size: 13px;
  color: #ff6b35;
}

.docs-content pre {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 12px 16px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.docs-content pre code {
  border: none;
  padding: 0;
  color: #aaa;
  background: transparent;
}

.docs-content strong {
  color: #aaa;
}

.docs-content a {
  color: #ff6b35;
  text-decoration: none;
}

.docs-content a:hover {
  text-decoration: underline;
}

.docs-content hr {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 20px 0;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 14px;
}

.docs-content th,
.docs-content td {
  border: 1px solid #2a2a2a;
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}

.docs-content th {
  background: #171717;
  color: #ccc;
}

.docs-content tbody tr:nth-child(even) td {
  background: #121212;
}

.docs-content td code,
.docs-content th code {
  font-size: 12px;
}

@media (max-width: 980px) {
  .docs-intro {
    padding-left: 16px;
    padding-right: 16px;
  }

  .learn-cta {
    align-items: flex-start;
  }

  .docs-page {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-toc {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .docs-toc a {
    flex: 1 1 180px;
  }

  .learn-cta-copy {
    max-width: none;
  }
}

.docs-frame {
  width: 100%;
  min-height: calc(100vh - 220px);
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.my-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}

.profile-game-edit {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #1f1f1f;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-game-edit label {
  font-size: 12px;
  color: #666;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-game-edit input {
  font-family: monospace;
  font-size: 13px;
  color: #ccc;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 8px 10px;
}

.profile-game-edit input:focus {
  outline: none;
  border-color: #ff6b35;
}

.profile-game-tags-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-game-tags-label {
  font-size: 12px;
  color: #666;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.profile-game-tags-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-game-tags-picker .tag-pill {
  width: auto;
  padding: 5px 9px;
  text-align: center;
}

.profile-game-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-game-save {
  padding: 7px 12px;
}

.my-game-delete {
  font-family: monospace;
  font-size: 16px;
  line-height: 1;
  color: #555;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 2px 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.my-game-delete:hover {
  color: #ff6b35;
  border-color: #ff6b35;
  background: rgba(255, 107, 53, 0.08);
}
