/* TMZ Games hub — white + red treatment (matches the TMZ podcast section):
   image hero header with gradient, padded max-width container, black italic
   section titles with a red rule, colored icon tiles with black labels. */

@font-face {
  font-family: "ProximaXCond";
  src: url("assets/fonts/proxima-xcond-bold.woff2") format("woff2"),
       url("assets/fonts/proxima-xcond-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "ProximaXCond";
  src: url("assets/fonts/proxima-xcond-black.woff2") format("woff2"),
       url("assets/fonts/proxima-xcond-black.woff") format("woff");
  font-weight: 900;
  font-display: swap;
}

:root {
  --ink: #f4f4f5;
  --mute: rgba(255, 255, 255, 0.5);
  --paper: #0b0b0d;
  --hair: rgba(255, 255, 255, 0.1);
  --red: #cf0000;
  --tmz-red: #cf0100;
  --pink: #e4055e;
  --display: "ProximaXCond", "Arial Narrow", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --maxw: 1070px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---- Header (sits over the hero) ---- */
.hdr { position: absolute; top: 0; left: 0; right: 0; z-index: 30; color: #fff; }
.hdr__mobile {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px; gap: 16px;
}
.hdr__logo--mobile { height: 26px; width: auto; }
.hdr__search { color: #fff; display: grid; place-items: center; padding: 6px; }
.hdr__search svg { fill: currentColor; width: 21px; height: 21px; }
.hdr__desktop { display: none; }

@media (min-width: 768px) {
  .hdr__mobile { display: none; }
  .hdr__desktop {
    position: relative;
    display: flex; align-items: center; gap: 24px;
    height: 80px;
    max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  }
  .hdr__logo--desktop { height: 46px; width: auto; }
  .hdr__nav { display: flex; align-items: center; gap: 18px; margin-left: 8px; }
  .hdr__nav a {
    position: relative;
    font-family: var(--display); font-weight: 800;
    font-size: 15px; text-transform: uppercase; letter-spacing: 0.3px;
    color: #fff; text-decoration: none; line-height: 1; padding-bottom: 5px;
    transition: opacity 0.2s ease;
  }
  .hdr__nav a:hover { opacity: 0.85; }
  .hdr__nav a.is-active { font-weight: 900; }
  .hdr__nav a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0;
    height: 3px; background: #fff; border-radius: 2px;
  }
}
@media (min-width: 1024px) {
  .hdr__nav { gap: 30px; }
  .hdr__nav a { font-size: 26px; }
}

/* ---- Hero (image header, TMZ-red veil, fades into the dark page) ---- */
.hero {
  position: relative; height: 250px;
  background: var(--tmz-red);
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% 16%;
}
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, #cf0100 6%, rgba(207, 1, 0, 0.62) 40%, rgba(207, 1, 0, 0) 72%);
}
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100px;
  background: linear-gradient(to top, var(--paper) 14%, rgba(11, 13, 13, 0));
}
.hero__inner {
  position: absolute; left: 0; right: 0; bottom: 42px; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
}
.hero__title {
  margin: 0; font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 32px; line-height: 0.95; text-transform: uppercase;
  color: #fff; letter-spacing: 0.5px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero__sub {
  margin: 4px 0 0; font-family: var(--display); font-weight: 700;
  font-size: 21px; color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero { height: 332px; }
  .hero__fade { height: 124px; }
  .hero__inner { bottom: 58px; }
  .hero__title { font-size: 46px; }
  .hero__sub { font-size: 27px; }
}

/* ---- Arena / rows (white, padded, centered) ---- */
.arena {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 16px 0 56px;
  display: flex; flex-direction: column; gap: 32px;
  animation: arenaIn 0.45s ease both;
}
@keyframes arenaIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.row { display: flex; flex-direction: column; gap: 14px; }
.row__head { display: flex; align-items: center; gap: 14px; padding: 0 16px; }
.row__title {
  margin: 0; font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 26px; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--ink); line-height: 1;
}

/* Rail (carousel) */
.row__rail {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity; scroll-padding-inline: 16px;
  -webkit-overflow-scrolling: touch; padding: 2px 0 8px;
}
.row__rail::-webkit-scrollbar { display: none; }
.row__rail-inner {
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px;
  gap: 14px; padding-inline: 16px;
}

/* Card — flat TMZ red, game name set as a headline inside, icon as a small corner mark */
.card {
  position: relative; display: block; width: 100%;
  cursor: pointer; scroll-snap-align: start; transition: transform 0.2s ease;
}
.card:active { transform: scale(0.97); }
@media (hover: hover) { .card:hover { transform: translateY(-4px); } }

.card__art {
  position: relative; aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, #ef1219 0%, var(--tmz-red) 46%, #8a0000 100%);
  border-radius: 14px; overflow: hidden;
  padding: 13px;
  display: flex; align-items: flex-end;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card__art::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  pointer-events: none;
}
@media (hover: hover) { .card:hover .card__art { box-shadow: 0 12px 30px rgba(207, 1, 0, 0.5); } }

/* Vendor / casual games keep full-bleed cover art (full width + height) */
.card--full .card__art { padding: 0; background: #0f0f12; }
.card--full .card__art::before { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.card__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card__icon {
  position: absolute; top: 12px; right: 12px;
  width: 60px; height: 60px; object-fit: contain;
  opacity: 0.95; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.32));
  transition: transform 0.25s ease;
}
@media (hover: hover) { .card:hover .card__icon { transform: scale(1.1) rotate(-3deg); } }

.card__name {
  position: relative; z-index: 1;
  font-family: var(--display); font-weight: 900; font-style: italic;
  text-transform: uppercase; color: #fff; text-align: left;
  font-size: 19px; line-height: 0.95; letter-spacing: 0;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
  padding-right: 2px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- Game modal (centered dialog, like the ynet arena) ---- */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
}
.modal--open { opacity: 1; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.modal__panel {
  position: relative; margin: 16px 0 0;
  width: min(428px, 96vw); height: min(750px, 92vh);
  background: #151517; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  transform: translateY(12px) scale(0.985); transition: transform 0.25s ease;
}
.modal--open .modal__panel { transform: translateY(0) scale(1); }
.modal__head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 11px 14px;
  background: #151517; border-bottom: 2px solid var(--tmz-red);
}
.modal__title {
  margin: 0; min-width: 0; flex: 1 1 auto;
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 19px; letter-spacing: 0.3px; text-transform: uppercase;
  color: #fff; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal__close {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #fff;
  display: grid; place-items: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.modal__close:hover { background: var(--tmz-red); }
.modal__close:active { transform: scale(0.92); }
.modal__body { flex: 1; background: #0b0b0d; overflow: hidden; }
.modal__host, .modal__host iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 560px) {
  .modal { align-items: stretch; }
  .modal__panel { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; border: 0; }
}

/* ---- Search drawer ---- */
.search-drawer { position: fixed; inset: 0; z-index: 9999; }
.search-drawer__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); animation: sd-fade 0.25s ease; }
@keyframes sd-fade { from { opacity: 0; } to { opacity: 1; } }
.search-drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(420px, 100%); background: #000; color: #fff;
  animation: sd-slide 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sd-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
.search-drawer__head { height: 48px; padding: 0 16px; display: flex; align-items: center; }
.search-drawer__close { color: #fff; padding: 8px; margin-left: -8px; display: grid; place-items: center; }
.search-drawer__form {
  margin: 0 16px; background: #111; height: 86px; border-radius: 2px;
  padding: 0 16px; display: flex; align-items: center; gap: 12px;
}
.search-drawer__input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  color: #fff; text-align: center; text-transform: uppercase;
  font-family: var(--display); font-weight: 900; font-size: 38px;
}
.search-drawer__input::placeholder { color: #4a4a4a; }
.search-drawer__submit { color: #fff; padding: 4px; display: grid; place-items: center; }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .row__rail-inner { grid-auto-columns: 118px; gap: 11px; }
  .row__title { font-size: 22px; }
  .card__art { padding: 11px; }
  .card__name { font-size: 17px; }
  .card__icon { width: 50px; height: 50px; top: 10px; right: 10px; }
}
@media (max-width: 380px) {
  .row__rail-inner { grid-auto-columns: 106px; }
}
