/* WamPlay.fun — Shared Site Stylesheet ("Click. Play. Repeat.") */
* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background-color: #f8fafc;
  background-image: url('/assets/bg-wamplay.jpg');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #0f172a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: #2563eb; }
a:hover { color: #1d4ed8; }

.page-main {
  flex: 1 0 auto;
  width: 100%;
}

/* Top Navigation Bar (consistent across Home, Trust Pages, and Game Pages) */
.site-nav-bar {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.top-btn {
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s, color 0.15s;
}
.top-btn:hover {
  border-color: #0f172a;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}
.top-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Primary Header Brand ("WAMPLAY.FUN — Click. Play. Repeat.") */
.site-header {
  text-align: center;
  padding: 16px 20px 20px;
}
.site-header.compact {
  padding: 8px 20px 14px;
}
.logo-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-family: 'Oswald', sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #0f172a;
  line-height: 1;
  text-decoration: none;
}
.site-header.compact .logo-row {
  font-size: 32px;
}
.logo-row:hover { color: #0f172a; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #dc2626 100%);
  color: #fff; font-size: 21px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.site-header.compact .logo-mark {
  width: 30px; height: 30px; font-size: 16px; border-radius: 8px;
}
.logo-row .tld { color: #2563eb; }
.tagline {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: #475569;
  font-weight: 600;
}

/* Filter & Search Bar */
.controls-bar {
  max-width: 1080px;
  margin: 0 auto 18px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.filter-pill {
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: all 0.14s ease;
  backdrop-filter: blur(6px);
}
.filter-pill:hover {
  border-color: #0f172a;
  color: #0f172a;
  transform: translateY(-1px);
}
.filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}
.pill-count {
  font-size: 10.5px;
  font-weight: 800;
  opacity: 0.72;
}
.search-wrap {
  position: relative;
  flex: 0 1 230px;
  min-width: 180px;
}
.search-wrap svg {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 7px 11px 7px 32px;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* Games Grid & Cards (now crawlable <a href="/games/<slug>"> links!) */
.grid-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 24px 36px;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.games-grid.related-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}
.empty-state button {
  margin-top: 10px;
  background: #2563eb; color: #fff; border: none;
  border-radius: 8px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}

.banner-card {
  position: relative;
  aspect-ratio: 2.15 / 1;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #0f172a;
  background: #0b0f19;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
  padding: 0;
  width: 100%;
  display: block;
  text-align: left;
  text-decoration: none;
}
.banner-card.hidden-card { display: none; }
.banner-card:hover {
  transform: translateY(-5px) scale(1.018);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}
.banner-card:active { transform: scale(0.988); }
.banner-card:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
.banner-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.banner-card:hover img { transform: scale(1.04); }

.card-badge {
  position: absolute; top: 9px; left: 10px; z-index: 2;
  padding: 3px 7px; border-radius: 6px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.65px;
  color: #ffffff; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0) 38%, rgba(15,23,42,0.86) 100%);
  pointer-events: none;
}
.card-meta {
  position: absolute; left: 12px; right: 86px; bottom: 10px;
  pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
}
.related-grid .card-meta { right: 12px; }
.card-genre {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.9px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.card-title {
  font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 700;
  line-height: 1.08; letter-spacing: 0.5px; color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.related-grid .card-title { font-size: 16px; }
.play-hover {
  position: absolute; bottom: 11px; right: 11px;
  background: #ffffff; color: #0f172a;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0.94;
  transition: background 0.16s, color 0.16s, transform 0.16s;
  pointer-events: none;
}
.banner-card:hover .play-hover,
.banner-card:focus-visible .play-hover {
  background: #2563eb; color: #ffffff; transform: translateX(1px); opacity: 1;
}

/* Dedicated Game Page Shell (/games/<slug>) */
.game-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px 24px 40px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #334155;
  margin: 0 0 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 14px;
  width: fit-content;
  backdrop-filter: blur(6px);
}
.breadcrumb a { color: #2563eb; text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span.sep { color: #94a3b8; }

.player-shell {
  background: #0b0f19;
  border: 2px solid #0f172a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22);
}
.player-bar {
  background: #ffffff;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.player-bar-left, .player-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.player-title {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.15;
}
.player-console-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.player-btn {
  background: #fff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: border-color 0.14s, background 0.14s;
}
.player-btn:hover { border-color: #0f172a; background: #f8fafc; color: #0f172a; }

.player-frame-wrap {
  position: relative;
  width: 100%;
  height: min(74vh, 660px);
  min-height: 440px;
  background: #07070c;
}
.player-frame-wrap:fullscreen {
  height: 100vh;
  max-height: none;
}
#gameFrame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Ad-Safe Editorial Spacing Container (well away from canvas/PLAY/touch buttons) */
.ad-safe-zone {
  max-width: 970px;
  margin: 28px auto;
  text-align: center;
}

/* Editorial Content Cards (Game Pages & Standalone Trust Pages) */
.content-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 24px 48px;
}
.content-card {
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #0f172a;
  border-radius: 16px;
  padding: 26px 30px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  margin-top: 24px;
  line-height: 1.7;
  color: #1e293b;
}
.content-card h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  margin: 0 0 10px;
  color: #0f172a;
  line-height: 1.15;
}
.content-card h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  margin: 24px 0 10px;
  color: #0f172a;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 6px;
}
.content-card h2:first-child { margin-top: 0; }
.content-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 18px 0 6px;
  color: #0f172a;
}
.content-card p { margin: 0 0 13px; font-size: 14.5px; }
.content-card ul, .content-card ol { margin: 0 0 14px; padding-left: 22px; font-size: 14.5px; }
.content-card li { margin-bottom: 6px; }

.page-lead {
  font-size: 15.5px !important;
  color: #334155;
  font-weight: 500;
}
.callout-box {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 13.8px;
  color: #1e3a8a;
}
.callout-box strong { color: #0f172a; }

/* Controls & Meta Grid inside Game Pages */
.two-col-meta {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  margin-top: 18px;
}
.sub-panel {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
}
.sub-panel h3 { margin-top: 0; font-family: 'Oswald', sans-serif; font-size: 18px; letter-spacing: 0.3px; }

.controls-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  align-items: center;
  margin-top: 10px;
}
.controls-grid kbd {
  display: inline-block;
  background: #0f172a;
  color: #ffffff;
  border-radius: 6px;
  padding: 3px 8px;
  font: 700 11.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.controls-grid span { font-size: 13.5px; color: #334155; font-weight: 500; }

.meta-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 14px;
  margin: 10px 0 0;
  font-size: 13.5px;
}
.meta-dl dt { font-weight: 700; color: #475569; }
.meta-dl dd { margin: 0; color: #0f172a; word-break: break-word; }

/* Licenses & Credits Table */
.credits-table-wrap {
  overflow-x: auto;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  margin-top: 14px;
  background: #ffffff;
}
.credits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.credits-table th {
  background: #f1f5f9;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #334155;
  border-bottom: 1.5px solid #cbd5e1;
}
.credits-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}
.credits-table tr:hover td { background: #f8fafc; }
.credits-table code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11.5px;
  color: #0f172a;
}

/* Home Overview Band (Original Editorial Content below Grid) */
.home-editorial {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 36px;
}

/* Persistent Footer Across All Pages */
.site-footer-bar {
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.94);
  color: #e2e8f0;
  border-top: 2px solid #1e293b;
  padding: 22px 24px;
  margin-top: auto;
}
.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.footer-brand {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
}
.footer-brand strong {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.8px;
  color: #ffffff;
  font-size: 15px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 2px;
  transition: color 0.14s;
}
.footer-links a:hover { color: #60a5fa; text-decoration: underline; }

/* Upload Your Own Game Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: #fff; border: 2px solid #0f172a; border-radius: 18px;
  max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 22px 24px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.modal-card h2 { font-family: 'Oswald', sans-serif; font-size: 24px; margin: 0; color: #0f172a; }
.modal-x {
  width: 30px; height: 30px; border-radius: 999px; border: 1.5px solid #cbd5e1;
  background: #fff; color: #334155; font-size: 16px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-x:hover { border-color: #0f172a; color: #0f172a; }
.review-notice {
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px; font-size: 12.5px; color: #1e3a8a; line-height: 1.45;
}
.upload-form { display: flex; flex-direction: column; gap: 11px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11.5px; font-weight: 700; color: #334155; text-transform: uppercase; letter-spacing: 0.4px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%; padding: 8px 10px; border: 1.5px solid #cbd5e1; border-radius: 9px;
  font-family: inherit; font-size: 13px; color: #0f172a; background: #fff;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #2563eb; }
.file-drop {
  border: 1.5px dashed #94a3b8; border-radius: 10px; padding: 12px;
  background: #f8fafc; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.file-drop:hover { border-color: #2563eb; background: #eff6ff; }
.file-drop input { display: none; }
.file-drop-label { font-size: 12.5px; font-weight: 600; color: #334155; display: block; }
.file-drop-sub { font-size: 11px; color: #64748b; display: block; margin-top: 2px; }
.form-status {
  display: none; font-size: 12.5px; padding: 9px 11px; border-radius: 9px; line-height: 1.4; font-weight: 500;
}
.form-status.ok { display: block; background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.form-status.err { display: block; background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.form-status.info { display: block; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.btn-cancel {
  background: #fff; color: #334155; border: 1.5px solid #cbd5e1; border-radius: 9px;
  padding: 8px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-submit {
  background: #2563eb; color: #fff; border: 1.5px solid #2563eb; border-radius: 9px;
  padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-submit:hover { background: #1d4ed8; color: #fff; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Responsive Breakpoints */
@media (max-width: 920px) {
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games-grid.related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col-meta { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-nav-bar { justify-content: center; padding: 12px 14px 0; }
  .site-header { padding: 12px 14px 16px; }
  .logo-row { font-size: 34px; }
  .controls-bar { padding: 0 14px; }
  .search-wrap { flex: 1 1 100%; }
  .grid-wrap, .game-page-wrap, .content-wrap, .home-editorial { padding-left: 14px; padding-right: 14px; }
  .games-grid, .games-grid.related-grid { grid-template-columns: 1fr; gap: 15px; }
  .content-card { padding: 18px 18px; }
  .player-frame-wrap { height: 62vh; min-height: 360px; }
  .form-row { grid-template-columns: 1fr; }
  .site-footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
