/* ============ HOME — PS1 / PSX BOOT THEME ============ */
body.theme-home {
  --accent: #7dd3fc;
  --accent-2: #f472b6;
  --header-bg: rgba(5,5,10,0.85);
  background:
    radial-gradient(ellipse at 50% -10%, #14142b 0%, #05050a 55%),
    #05050a;
  font-family: var(--font-body);
}

/* ---- CRT scanline + vignette overlay ---- */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.035) 0px,
      rgba(255,255,255,0.035) 1px,
      transparent 2px,
      transparent 3px
    );
  mix-blend-mode: overlay;
}
.crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 899;
  box-shadow: inset 0 0 180px 60px rgba(0,0,0,0.85);
}

/* ---- BOOT SPLASH ---- */
#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#boot-splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-logo {
  font-family: var(--font-pixel);
  font-size: clamp(20px, 4vw, 34px);
  letter-spacing: 4px;
  color: #fff;
  display: flex;
  gap: 2px;
  animation: boot-wobble 2.4s ease-in-out infinite;
}
.boot-logo b:nth-child(1) { color: #ff5577; }
.boot-logo b:nth-child(2) { color: #ffcc33; }
.boot-logo b:nth-child(3) { color: #33cc88; }
.boot-logo b:nth-child(4) { color: #4aa8ff; }
.boot-logo b:nth-child(5) { color: #fff; }
.boot-logo b:nth-child(6) { color: #fff; }
.boot-logo b:nth-child(7) { color: #fff; }

@keyframes boot-wobble {
  0%, 100% { transform: perspective(300px) rotateX(0deg) scale(1); }
  50% { transform: perspective(300px) rotateX(6deg) scale(1.03); }
}

.boot-bar-track {
  width: min(260px, 60vw);
  height: 6px;
  background: #1a1a22;
  border: 1px solid #333;
}
.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4aa8ff, #f472b6);
  animation: boot-fill 2.2s ease-in-out forwards;
}
@keyframes boot-fill { to { width: 100%; } }

.boot-caption {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: #8b93a7;
  letter-spacing: 2px;
}
.boot-skip {
  position: absolute;
  bottom: 24px;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #4a4f5e;
  letter-spacing: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .boot-logo, .boot-bar-fill { animation: none; }
  .boot-bar-fill { width: 100%; }
}

/* ---- HERO ---- */
.psx-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 6% 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) { .psx-hero { grid-template-columns: 1fr; padding-top: 40px; } }

.psx-eyebrow {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: var(--accent-2);
  letter-spacing: 3px;
  margin-bottom: 14px;
}
.psx-eyebrow::before { content: '▶ '; }

.psx-title {
  font-family: var(--font-pixel);
  font-size: clamp(18px, 2.6vw, 26px);
  line-height: 1.7;
  color: #fff;
  text-shadow: none;
  margin-bottom: 22px;
  cursor: default;
  transition: text-shadow 0.15s;
}
.psx-title:hover {
  text-shadow: 2px 0 #ff5577, -2px 0 #4aa8ff, 0 2px #33cc88;
}

.psx-sub {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 46ch;
  margin-bottom: 28px;
}

.psx-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #05050a;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 22px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 2px solid #fff;
  box-shadow: 5px 5px 0 rgba(255,255,255,0.15);
  transition: transform 0.15s;
}
.psx-cta:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 rgba(255,255,255,0.2); }

/* ---- media stage: shows the currently selected physical media ---- */
.psx-disc-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.media-stage {
  width: min(240px, 55vw);
  height: min(240px, 55vw);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.stage-trigger:hover { transform: scale(1.04); }
.stage-trigger:active { transform: scale(0.97); }
.media-stage.inserting .media-shape { animation-duration: 0.5s !important; }

@keyframes disc-spin { to { transform: rotate(360deg); } }
@keyframes reel-spin { to { transform: rotate(360deg); } }
@keyframes media-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* CD */
.cd-media {
  --c1: #ff5577; --c2: #ffcc33; --c3: #33cc88; --c4: #4aa8ff; --c5: #a855f7;
  width: 200px; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #05050a 0 18%, transparent 19%),
    conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c1));
  position: relative;
  animation: disc-spin 6s linear infinite;
  box-shadow: 0 0 40px rgba(74,168,255,0.35), 0 0 0 6px #0d0d14;
}

/* Blu-ray */
.bluray-media {
  width: 200px; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #05050a 0 18%, transparent 19%),
    conic-gradient(from 0deg, #0c1a2e, #1e40af, #0c1a2e, #0ea5e9, #0c1a2e);
  position: relative;
  animation: disc-spin 7s linear infinite;
  box-shadow: 0 0 40px rgba(14,165,233,0.4), 0 0 0 6px #0d0d14;
}
.bd-tag {
  position: absolute; top: 18%; right: 16%;
  font-family: var(--font-pixel); font-size: 8px; color: #0ea5e9;
  background: #000; padding: 3px 5px; letter-spacing: 1px;
  z-index: 2;
}

.cd-media .disc-sheen, .bluray-media .disc-sheen {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(255,255,255,0.25), transparent 40%);
}
.cd-media .disc-hole, .bluray-media .disc-hole {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 14%; height: 14%; background: #05050a; border-radius: 50%;
  transform: translate(-50%,-50%); border: 2px solid #1a1a22;
}

/* Cartucho */
.cart-media {
  width: 168px; height: 130px;
  background: linear-gradient(160deg, #6b7280, #1f2937);
  border: 3px solid #0f172a;
  border-radius: 6px 6px 14px 14px;
  position: relative;
  animation: media-bob 3.2s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.cart-grip {
  position: absolute; top: 10px; left: 10px; right: 10px; height: 16px;
  background: repeating-linear-gradient(90deg, #9ca3af 0 5px, #4b5563 5px 9px);
  border-radius: 2px;
}
.cart-label {
  position: absolute; top: 36px; left: 16px; right: 16px; bottom: 30px;
  background: #f8fafc; border: 2px solid #0f172a;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 11px; color: #111;
  letter-spacing: 1px;
}
.cart-pins {
  position: absolute; bottom: 8px; left: 24px; right: 24px; height: 10px;
  background: repeating-linear-gradient(90deg, #d4af37 0 4px, #1f2937 4px 7px);
}

/* Fita cassete */
.tape-media {
  width: 208px; height: 128px;
  background: linear-gradient(160deg, #3f3f46, #111827);
  border: 3px solid #000; border-radius: 8px;
  position: relative;
  animation: media-bob 3.4s ease-in-out infinite 0.2s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.tape-label {
  position: absolute; top: 10px; left: 18px; right: 18px; height: 26px;
  background: #fef3c7; border: 2px solid #78350f;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 9px; color: #78350f; letter-spacing: 1px;
}
.tape-reel {
  position: absolute; top: 52px; width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle, #111 0 7px, #6b7280 8px 15px, #111 16px 17px);
  animation: reel-spin 4s linear infinite;
}
.tape-reel-l { left: 30px; }
.tape-reel-r { right: 30px; }
.tape-strip {
  position: absolute; top: 70px; left: 68px; right: 68px; height: 2px;
  background: #52525b;
}

/* UMD / disco PSP */
.umd-media {
  width: 126px; height: 148px;
  background: linear-gradient(160deg, #4c1d95, #1e1b4b);
  border: 3px solid #000; border-radius: 12px;
  position: relative;
  animation: media-bob 3.6s ease-in-out infinite 0.4s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.umd-disc {
  position: absolute; top: 44%; left: 50%; width: 74px; height: 74px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: conic-gradient(from 0deg, #a78bfa, #38bdf8, #f0abfc, #a78bfa);
  animation: disc-spin 6s linear infinite;
  box-shadow: 0 0 20px rgba(167,139,250,0.4);
}
.umd-label {
  position: absolute; bottom: 12px; left: 0; right: 0; text-align: center;
  font-family: var(--font-pixel); font-size: 9px; color: #c7d2fe; letter-spacing: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cd-media, .bluray-media, .umd-disc, .tape-reel, .cart-media, .tape-media, .umd-media { animation: none; }
}

.disc-caption {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-align: center;
  min-height: 20px;
  transition: color 0.2s;
}
.disc-caption.active { color: #fff; }

/* ---- disc tray: 5 selectable physical media formats ---- */
.disc-tray {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.tray-thumb {
  width: 58px; height: 58px;
  background: #0a0a12;
  border: 2px solid #262a3a;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}
.tray-thumb:hover { transform: translateY(-3px); border-color: #fff; }
.tray-thumb.active { border-color: var(--accent); box-shadow: 0 0 14px rgba(125,211,252,0.5); }
.tray-thumb .thumb-shape {
  transform: scale(0.27);
  transform-origin: center;
  pointer-events: none;
}

/* ---- memory card nav ---- */
.mc-section { padding: 20px 6% 10px; max-width: 1240px; margin: 0 auto; }
.mc-heading {
  font-family: 'VT323', monospace;
  font-size: 22px;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 18px;
}
.mc-heading::before { content: '💾 '; }

.mc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.mc-card {
  background: linear-gradient(160deg, #14141f, #0a0a12);
  border: 2px solid #262a3a;
  padding: 22px 20px;
  text-decoration: none;
  color: var(--fg);
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
  overflow: hidden;
}
.mc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-color, #4aa8ff);
}
.mc-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-color, #4aa8ff);
}
.mc-slot { font-family: 'VT323', monospace; font-size: 13px; color: var(--muted); letter-spacing: 2px; }
.mc-name { font-size: 19px; font-weight: 700; color: #fff; margin: 8px 0 6px; }
.mc-desc { font-size: 12.5px; color: var(--muted); }
.mc-icon { font-size: 26px; margin-bottom: 10px; display: block; }

/* ---- news list styled like PS1 disc menu ---- */
.psx-menu-section { padding: 50px 6% 10px; max-width: 1240px; margin: 0 auto; }
.psx-menu {
  border: 2px solid #262a3a;
  background: rgba(20,20,31,0.6);
}
.psx-menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px solid #1c1e29;
  transition: background 0.15s, padding-left 0.15s;
}
.psx-menu-row:last-child { border-bottom: none; }
.psx-menu-row:hover {
  background: rgba(74,168,255,0.08);
  padding-left: 28px;
}
.psx-menu-row .cursor { opacity: 0; color: var(--accent); font-family: 'VT323', monospace; font-size: 18px; }
.psx-menu-row:hover .cursor { opacity: 1; }
.psx-menu-cat {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: 1.5px;
  min-width: 110px;
}
.psx-menu-title { flex: 1; font-size: 15px; font-weight: 600; }
.psx-menu-meta { font-size: 11.5px; color: var(--muted); font-family: 'VT323', monospace; letter-spacing: 1px; }

.psx-more {
  display: inline-block;
  margin-top: 18px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 1px;
}
.psx-more:hover { text-decoration: underline; }
