/* PS3 World - random-game styles (loaded after style.css on the pages that need them) */

/* ---- Random Game Selector ----
   Built from the same pieces as the rest of the site:
   page-hero spacing + faded character art, .btn, chip filters,
   the tool-block card and the info-box note. */
.rgs-hero {
  position: relative;
  padding: 20px 0 8px;
  text-align: center;
}

.rgs-char {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: 800px;
  max-width: 90vw;
  opacity: 0.15;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 70%, transparent 100%);
}

.rgs-hero > :not(.rgs-char) {
  position: relative;
  z-index: 1;
}

.rgs-hero .crumbs { margin: 0 auto 18px; }

.rgs-hero h1 { margin: 0 0 12px; }

.rgs-hero p {
  max-width: 760px;
  margin: 0 auto 28px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.65;
}

/* Same look as .btn, a little larger as the page's one action */
.rgs-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 240px;
  padding: 15px 34px;
  border: 1px solid var(--ps-blue-2);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--ps-blue), var(--btn-blue-end));
  box-shadow: 0 0 24px rgba(43, 143, 255, 0.35);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), filter 0.2s var(--ease);
}

.rgs-pick-btn::before {
  content: '';
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3h5v5M4 20 21 3M21 16v5h-5M15 15l6 6M4 4l5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3h5v5M4 20 21 3M21 16v5h-5M15 15l6 6M4 4l5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rgs-pick-btn:hover {
  box-shadow: 0 0 36px rgba(74, 217, 255, 0.6);
  transform: translateY(-1px);
}

.rgs-pick-btn:active { transform: none; }

.rgs-pick-btn:focus-visible {
  outline: 2px solid var(--ps-cyan);
  outline-offset: 3px;
}

.rgs-pick-btn:disabled {
  filter: saturate(0.4);
  opacity: 0.6;
  box-shadow: none;
  cursor: wait;
  transform: none;
}

.rgs-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 0;
}

.rgs-filters-label {
  margin-right: 4px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.rgs-filter {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.rgs-filter:hover {
  border-color: var(--border-2);
  background: var(--surface-hover);
  color: var(--text);
}

.rgs-filter.is-active,
.rgs-filter.is-active:hover {
  border-color: rgba(74, 217, 255, 0.45);
  background: rgba(43, 143, 255, 0.16);
  color: var(--ps-cyan);
}

.rgs-filter:focus-visible { outline: 2px solid var(--ps-cyan); outline-offset: 2px; }

/* Result card — same surface as .tool-block */
.rgs-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 960px;
  margin: 36px auto 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)), var(--bg-2);
  box-shadow: var(--shadow);
}

.rgs-cover-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 280px;
  aspect-ratio: 320 / 373;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--media-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px var(--border);
}

.rgs-cover {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

.rgs-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.rgs-info h2 {
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 26px;
  line-height: 1.25;
  overflow-wrap: break-word;
}

/* Each detail as a label / value row */
.rgs-meta {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.rgs-meta:last-child { border-bottom: 0; }

.rgs-meta strong {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.9;
}

/* Note — same as the site's blue info callouts */
.rgs-note {
  max-width: 960px;
  margin: 18px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--ps-sky);
  border-radius: var(--radius-md);
  background: rgba(74, 158, 255, 0.05);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
}

.rgs-note strong { color: var(--text); }

.rgs-credit {
  max-width: 960px;
  margin: 24px auto 64px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 720px) {
  /* Random game */
.rgs-card {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius);
  }
  .rgs-cover-wrap {
    width: min(260px, 72vw);
    margin: 0 auto;
  }
  .rgs-info h2 { font-size: 21px; text-align: center; }
  .rgs-meta { grid-template-columns: 122px minmax(0, 1fr); gap: 8px; font-size: 14px; padding: 8px 0; }
  .rgs-meta strong { letter-spacing: 0.8px; }
  .rgs-pick-btn { width: 100%; min-width: 0; }
}

/* ---- Extra filters: English, years, developer ---- */
.rgs-more { margin-top: 10px; }

.rgs-field select,
.rgs-field input {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.rgs-field select { padding-right: 30px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a2acc0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 14px no-repeat; }
.rgs-field select option { background: var(--bg-2); color: var(--text); }
.rgs-field--dev input { width: 210px; }
.rgs-field select:hover, .rgs-field input:hover { border-color: var(--border-2); color: var(--text); }
.rgs-field select:focus-visible, .rgs-field input:focus { border-color: var(--ps-cyan); color: var(--text); box-shadow: var(--ring); }
.rgs-field input::placeholder { color: var(--text-3); }

.rgs-count {
  min-height: 1.4em;
  margin: 12px auto 0 !important;
  color: var(--text-3) !important;
  font-size: 13px !important;
}

/* ---- Card actions: share + more from developer ---- */
.rgs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rgs-actions[hidden] { display: none; }
.rgs-act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.rgs-act:hover { border-color: rgba(74, 217, 255, 0.45); color: var(--ps-cyan); background: rgba(43, 143, 255, 0.1); }
.rgs-act:focus-visible { outline: 2px solid var(--ps-cyan); outline-offset: 2px; }
.rgs-act[hidden] { display: none; }
#rgsShare::before {
  content: '';
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 720px) {
  .rgs-field--dev { flex: 1 1 100%; }
  .rgs-field--dev input { width: 100%; }
  .rgs-actions { justify-content: center; }
}

/* Before the first pick: say what to do instead of a card of dashes */
.rgs-empty-note { display: none; margin: 4px 0 0; color: var(--text-2); line-height: 1.55; }
.rgs-card.is-empty .rgs-empty-note { display: block; }
.rgs-card.is-empty .rgs-meta,
.rgs-card.is-empty .rgs-actions { display: none; }
