/* ============================================
   Site search page — desktop layout
   Adapted from backdoor-site-beta/d/search_results.html
   ============================================ */

/* ─── BREADCRUMBS ─── */
.crumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin: 24px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.crumbs a { color: var(--text-muted); text-decoration: none; transition: color .15s; }
.crumbs a:hover { color: var(--text); }
.crumbs span { color: rgba(255,255,255,0.25); }

/* ─── BIG SEARCH BAR ─── */
.sr-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 22px;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--border-strong);
  border-top-color: rgba(255,255,255,0.18);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  transition: border-color .15s, box-shadow .15s;
  position: relative; z-index: 2;
}
.sr-search-bar:focus-within {
  border-color: var(--border-blue);
  box-shadow: 0 6px 24px rgba(74,124,255,0.18);
}
.sr-search-bar svg.ic { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.sr-search-bar input[type="text"] {
  flex: 1;
  min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 13px 0;
  font-weight: 500;
}
.sr-search-bar input::placeholder { color: var(--text-dim); }
.sr-search-bar .clear-x {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.sr-search-bar .clear-x:hover { color: var(--text); border-color: var(--border-strong); }
.sr-search-bar .clear-x svg { width: 14px; height: 14px; }
.sr-search-bar .go-btn {
  padding: 11px 18px;
  background: linear-gradient(135deg, #7a5dff 0%, #4a7cff 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.sr-search-bar .go-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(122,93,255,0.4); }
.sr-search-bar .go-btn svg { width: 14px; height: 14px; }

/* ─── PAGE HEAD ─── */
.sr-head {
  padding: 20px 0 4px;
}
.sr-head h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.sr-head h1 .q { color: var(--blue-bright); font-weight: 800; }
.sr-head .sub { font-size: 14px; color: var(--text-muted); }
.sr-head .sub b { color: var(--text); font-weight: 700; }

/* ─── SECTION HEAD ─── */
.sr-section { margin-top: 28px; }
.sr-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sr-section-head h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sr-section-head h2 .ct {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─── GAMES GRID (catalog-style cards) ─── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 16px;
}
.game-card-wrap {
  position: relative;
  display: flex;
  align-self: start;
}
.game-card {
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .25s cubic-bezier(0.22, 1, 0.36, 1);
}
.game-card-wrap:hover .game-card { transform: scale(0.97); }
.game-cover {
  aspect-ratio: var(--game-card-aspect, 600 / 900);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(255,255,255,0.04);
  border-radius: var(--radius-lg, 13px);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: border-color .25s, box-shadow .25s;
}
.game-card-wrap:hover .game-cover {
  border-color: var(--gold);
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 24px 4px rgba(212,175,106,0.35),
    0 16px 40px rgba(0,0,0,0.45);
}
.game-card-wrap:hover .game-name { color: var(--gold-bright); }
.game-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,0.3));
}
@keyframes heartFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1px); }
}
@keyframes heartPulse {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.3); }
  30%  { transform: scale(0.95); }
  45%  { transform: scale(1.1); }
  60%  { transform: scale(1); }
}
@keyframes heartGlowPulse {
  0%, 100% { filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8)) drop-shadow(0 0 8px rgba(255,90,90,0.5)) drop-shadow(0 0 16px rgba(255,60,60,0.25)); }
  50%      { filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8)) drop-shadow(0 0 12px rgba(255,90,90,0.7)) drop-shadow(0 0 22px rgba(255,60,60,0.4)); }
}
.game-fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 35px; height: 35px;
  border: none; background: none;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.25;
  color: #fff;
  cursor: pointer;
  z-index: 3;
  animation: heartFloat 4.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
  transition: opacity .25s, color .25s, filter .25s;
}
.game-fav:hover {
  opacity: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7)) drop-shadow(0 0 10px rgba(255,90,90,0.5));
}
.game-fav.active,
.game-fav.is-active {
  color: #e54848;
  opacity: 0.85;
  animation: heartFloat 3s ease-in-out infinite, heartGlowPulse 1.5s ease-in-out infinite;
}
.game-fav.active:hover,
.game-fav.is-active:hover {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7)) drop-shadow(0 0 14px rgba(255,90,90,0.75)) drop-shadow(0 0 28px rgba(255,60,60,0.45));
}
.game-fav.active svg,
.game-fav.is-active svg { fill: currentColor; }
.game-fav.just-toggled svg { animation: heartPulse .5s ease-out; }
.game-fav.is-loading { pointer-events: none; opacity: 0.5; }
.game-fav svg { width: 25px; height: 25px; stroke-width: 1.8; fill: none; transition: transform .35s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.game-platforms {
  position: absolute;
  bottom: 8px; left: 8px;
  display: flex; gap: 4px;
  z-index: 2;
}
.game-platform {
  padding: 3.3px 6.6px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3.3px;
  font-size: 9.9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
}
.game-sub-float {
  position: absolute;
  top: 0; left: 0;
  padding: 5px 6px 5px 5px;
  background: rgba(255,255,255,0);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  border-right: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  border-radius: 13px 0 13px 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 3;
}
.game-sub-float img { width: 29px; height: 29px; display: block; object-fit: contain; }

.game-info {
  padding: 10px 2px 0;
  display: flex; flex-direction: column;
  gap: 4px;
}
.game-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .25s;
}
.game-edition-row { display: flex; align-items: center; gap: 6px; }
.game-edition {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.game-prices {
  display: flex; align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.game-discount-inline {
  order: 1;
  display: inline-flex; align-items: center;
  padding: 4px 6px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: -0.02em;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(74,124,255,0.3);
}
.game-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.game-price .currency { color: inherit; margin-left: 2px; }

.psplus-price-line {
  display: flex; align-items: center; gap: 6px;
  margin-top: 1px;
  transform: translateX(1px);
}
.psplus-price-line img { display: none; }
.psplus-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.psplus-price .currency { color: inherit; margin-left: 1px; }
.psplus-discount {
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  padding: 4px 6px;
  background: rgba(212,175,106,0.12);
  border: 1px solid rgba(212,175,106,0.18);
  border-radius: 4px;
  line-height: 1;
}

@keyframes pulse-icon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.9); }
}
.game-deadline-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--red-bright, #ff7878);
  letter-spacing: -0.005em;
}
.game-deadline-inline svg {
  width: 11px; height: 11px;
  stroke-width: 2.2;
  animation: pulse-icon 2s ease-in-out infinite;
}
.game-deadline-inline.last { color: var(--red, #e54848); font-weight: 700; }

/* ─── SUBSCRIPTION RESULT CARDS ─── */
.subs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sub-result-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(160deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.005) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, background .2s, transform .2s;
}
.sub-result-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* mini cover — reuse subscription page sizing */
.sub-result-card .src-cover {
  width: 110px;
  height: auto;
  aspect-ratio: 1200 / 630;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  container-type: inline-size;
}
.sub-result-card .src-cover::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.sub-result-card .src-cover .sc-bg-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; line-height: 0.78; letter-spacing: -0.03em;
  user-select: none; pointer-events: none; z-index: 1;
  font-size: 56cqw;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.sub-result-card .src-cover .sc-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.sub-result-card .src-cover .ps-logo {
  height: 9cqw; min-height: 8px; width: auto; display: block;
}
.sub-result-card .src-cover .sc-tier {
  font-weight: 900; font-size: 11cqw;
  line-height: 1; letter-spacing: 0.03em; text-transform: uppercase;
}
.sub-result-card .src-cover .ea-wordmark {
  font-family: 'Geist', sans-serif;
  font-weight: 900; font-size: 18cqw;
  letter-spacing: -0.02em; line-height: 1;
  color: #fff;
}
.sub-result-card .src-cover .ps-logo-wrap {
  position: relative; display: inline-block;
  height: 9cqw; min-height: 8px; line-height: 0;
}
.sub-result-card .src-cover .ps-logo-wrap .tinted-img {
  height: 100%; width: auto; display: block;
}
.sub-result-card .src-cover .ps-logo-wrap .crest {
  position: absolute; left: 0; top: 0; height: 100%; width: auto; display: block;
}

/* gradient variants (mirror subscription.css) */
.src-cover.sc-essential { background: #c0c0c6; }
.src-cover.sc-essential::before {
  background:
    radial-gradient(ellipse 70% 80% at 30% 20%, rgba(255,255,255,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 75% 80%, rgba(160,160,175,0.5) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 50% 50%, rgba(220,220,228,0.3) 0%, transparent 70%),
    linear-gradient(155deg, #d6d6dc 0%, #b5b5be 40%, #a0a0ac 70%, #c0c0c8 100%);
}
.src-cover.sc-essential .sc-bg-num {
  background: linear-gradient(180deg, #ebebf0 0%, #6d6d78 100%);
  -webkit-background-clip: text;
          background-clip: text;
}
.src-cover.sc-essential .sc-tier { color: #1a1a20; }

.src-cover.sc-extra { background: #c9a035; }
.src-cover.sc-extra::before {
  background:
    radial-gradient(ellipse 65% 75% at 25% 25%, rgba(255,230,140,0.45) 0%, transparent 55%),
    radial-gradient(ellipse 55% 65% at 80% 75%, rgba(160,120,20,0.4) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(230,195,80,0.25) 0%, transparent 65%),
    linear-gradient(155deg, #e2c560 0%, #caa530 35%, #a88520 65%, #dbb845 100%);
}
.src-cover.sc-extra .sc-bg-num {
  background: linear-gradient(180deg, #f4da80 0%, #5c4510 100%);
  -webkit-background-clip: text;
          background-clip: text;
}
.src-cover.sc-extra .sc-tier { color: #000; }

.src-cover.sc-deluxe { background: #000; --accent: #f5c518; }
.src-cover.sc-deluxe::before {
  background:
    radial-gradient(ellipse 60% 65% at 35% 30%, rgba(200,170,100,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 55% at 70% 70%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(200,170,100,0.05) 0%, transparent 65%),
    linear-gradient(155deg, #0e0e0e 0%, #050505 40%, #000 70%, #0a0a0a 100%);
}
.src-cover.sc-deluxe .sc-bg-num {
  background: linear-gradient(180deg, #d6b85a 0%, #000 100%);
  -webkit-background-clip: text;
          background-clip: text;
}
.src-cover.sc-deluxe .sc-tier { color: var(--accent); }
.src-cover.sc-deluxe .ps-logo-wrap .tinted-img {
  clip-path: inset(0 0 0 25.5%);
  filter: brightness(0) saturate(100%) invert(78%) sepia(68%) saturate(2000%) hue-rotate(358deg) brightness(105%) contrast(101%);
}

.src-cover.sc-eaplay { background: #1a1a3e; --accent: #ff4654; }
.src-cover.sc-eaplay::before {
  background:
    radial-gradient(ellipse 55% 65% at 80% 15%, rgba(220,50,80,0.3) 0%, transparent 55%),
    radial-gradient(ellipse 45% 50% at 90% 40%, rgba(180,40,100,0.2) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 15% 85%, rgba(40,40,120,0.35) 0%, transparent 55%),
    linear-gradient(155deg, #22224a 0%, #1a1a40 30%, #14142e 60%, #1e1e48 100%);
}
.src-cover.sc-eaplay .sc-bg-num {
  background: linear-gradient(180deg, #4c4c8c 0%, #0d0d24 100%);
  -webkit-background-clip: text;
          background-clip: text;
}
.src-cover.sc-eaplay .sc-tier { color: var(--accent); }

.src-body { flex: 1; min-width: 0; }
.src-family {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.src-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
}
.src-price {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.src-price .currency { margin-left: 2px; font-weight: 700; }
.src-price .src-period {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}
.src-price.price-unavailable {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  padding: 80px 0;
  text-align: center;
  margin-top: 24px;
}
.empty-state .ic {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
}
.empty-state .ic svg { width: 32px; height: 32px; }
.empty-state h3 {
  font-size: 20px; font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 22px;
  line-height: 1.5;
}
.empty-state .empty-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.empty-state .empty-cta:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--gold);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1280px) { .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subs-grid { grid-template-columns: 1fr; }
}

/* ===== MOBILE FOUNDATION (B4) ===== */
@media (max-width: 600px) {
  .crumbs { margin: 18px 0 12px; font-size: 12px; gap: 6px; }

  .sr-search-bar { padding: 5px 5px 5px 16px; gap: 8px; border-radius: 12px; }
  .sr-search-bar svg.ic { width: 18px; height: 18px; }
  /* iOS auto-zoom triggers when input font-size < 16px on focus */
  .sr-search-bar input[type="text"] { font-size: 16px; padding: 12px 0; }
  .sr-search-bar .clear-x { width: 30px; height: 30px; }
  .sr-search-bar .go-btn { padding: 10px 14px; font-size: 12px; }
  .sr-search-bar .go-btn svg { width: 13px; height: 13px; }

  .sr-head { padding: 16px 0 4px; }
  .sr-head h1 { font-size: 22px; }
  .sr-head .sub { font-size: 13px; }

  .sr-section { margin-top: 22px; }
  .sr-section-head { margin-bottom: 12px; }
  .sr-section-head h2 { font-size: 18px; }
  .sr-section-head h2 .ct { font-size: 11px; padding: 2px 6px; }

  /* Games grid is already 2-col at 820 — tighten gaps + card chrome */
  .games-grid { gap: 16px 10px; }
  .game-info { padding: 8px 2px 0; }
  .game-name { font-size: 13px; }
  .game-edition { font-size: 11px; }
  .game-price { font-size: 14px; }
  .psplus-price { font-size: 11px; }
  .game-fav { width: 32px; height: 32px; top: 6px; right: 6px; }
  .game-fav svg { width: 22px; height: 22px; }
  .game-sub-float img { width: 24px; height: 24px; }
  .game-platforms { bottom: 6px; left: 6px; gap: 3px; }

  /* Subs grid: cards become 1fr at 820 already — tighten internal layout */
  .subs-grid { gap: 12px; }
  .sub-result-card { padding: 12px 14px; gap: 12px; border-radius: 12px; }
  .sub-result-card .src-cover { width: 88px; }
  .src-family { font-size: 10px; margin-bottom: 3px; }
  .src-name { font-size: 16px; margin-bottom: 4px; }
  .src-price { font-size: 16px; }
  .src-price .src-period { font-size: 11px; }

  .empty-state { padding: 56px 0; margin-top: 16px; }
  .empty-state .ic { width: 60px; height: 60px; margin-bottom: 16px; border-radius: 14px; }
  .empty-state .ic svg { width: 28px; height: 28px; }
  .empty-state h3 { font-size: 18px; }
  .empty-state p { font-size: 13px; margin-bottom: 18px; }
  .empty-state .empty-cta { padding: 10px 18px; font-size: 13px; }
}
