@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

/* ========= ROOT / GLOBAL ========= */

:root {
  --bg: #000000;
  --bg-soft: #050505;
  --panel: #080808;
  --panel-alt: #101010;
  --fg: #f5f5f5;
  --fg-dim: #7f7f7f;
  --accent: #00ff7f;
  --accent-soft: rgba(0, 255, 127, 0.12);
  --border-hard: #262626;
  --header-h: 56px;
}

:root {
  --glass-bg: rgba(18, 18, 18, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(10px);
}

.panel,
.media-section,
.settings-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px;
}

/* ===== FORCE GLASS CONTINUE WATCHING ===== */

/* The big gray container */
.continue-watching,
.media-section,
.media-row,
.section-card,
.section-container {
  position: relative;
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Kill ANY inner solid backgrounds */
.continue-watching *,
.media-section *,
.media-row *,
.section-card * {
  background-color: transparent !important;
}

/* Prevent square edges behind posters */
.poster,
.poster img,
.poster-wrapper {
  border-radius: 16px;
  overflow: hidden;
  background: transparent !important;
}

/* Fix the faint square line you keep seeing */
.poster::before,
.poster-wrapper::before {
  display: none !important;
}


.media-item {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 18px;
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}

.media-item:hover {
  background: rgba(255, 255, 255, 0.10); /* MORE transparent look */
  backdrop-filter: blur(22px);
}


/* REMOVE BLOCK BACKGROUND FROM MEDIA GRID CELLS */
.media-grid > *,
.media-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}



.media-card {
  background: transparent;
  border: none;               /* ← kills the frame */
  border-radius: 16px;
  overflow: hidden;           /* ← curves poster */
  padding: 0;
}

.poster-thumb {
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
}

.poster-thumb img {
  border-radius: 16px;
  display: block;
}

#media-search {
  border-radius: 14px !important;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}


.media-card:hover {
  transform: translateY(-3px);
  border-color: var(--glass-hover);
}

.media-overlay {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--glass-border);
  font-size: 8px;
  padding: 6px;
}

#media-search {
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 9px;
  padding: 8px 10px;
}

#continue-section button {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
}

.side-header {
  backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.6);
}


.side-header {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 999;
}

.side-icon img {
  width: 26px;
  height: 26px;
  opacity: 0.45;
  transition: 0.2s;
}

.side-icon.active img,
.side-icon:hover img {
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--accent));
}

.media-row {
  margin-top: 28px;
}

.media-row-title {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--fg);
  margin-bottom: 10px;
}

.game-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: inherit; /* inherit rounding */
  overflow: hidden;       /* clip inner square */
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.game-card:hover .game-overlay {
  opacity: 1;
  transform: translateY(0);
}

.games-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;

  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 10px 16px;
  margin-bottom: 24px;
}

#game-search {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 1rem;
  width: 100%;
}

.media-row-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.media-row-track::-webkit-scrollbar {
  display: none;
}

.media-row .media-card {
  min-width: 160px;
}

.page-header {
  border-bottom: 1px solid #1e1e1e;
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.page-header h1 {
  font-size: 14px;
  letter-spacing: 2px;
  color: #e6e6e6;
}

.media-section {
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  padding: 14px;
  margin-bottom: 20px;
}

.media-section-title {
  font-size: 10px;
  color: #9a9a9a;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.media-card {
  background: #080808;
  border: 1px solid #222;
  transition: border-color 0.15s ease;
}

.media-card:hover {
  border-color: #555;
}

.poster-thumb {
  position: relative;
  background: #000;
}

.poster-thumb img {
  width: 100%;
  display: block;
}

.media-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.85);
  padding: 6px;
  font-size: 8px;
  color: #d0d0d0;
  border-top: 1px solid #222;
  opacity: 1;
}

#continue-section {
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
}

#continue-grid .media-card {
  background: #050505;
}

#media-search {
  background: #050505;
  border: 1px solid #2a2a2a;
  color: #e0e0e0;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 6px 8px;
}

#media-search:focus {
  border-color: #666;
}


/* --- S0LACE THEME UPDATE --- */

/* 1. Global Smoothing */
body {
  /* Keeps your existing font, just makes everything look smoother */
  -webkit-font-smoothing: antialiased;
}

/* 2. The "Taskbar" Style Sidebar */
.side-header {
  /* This creates the frosted glass effect */
  background: rgba(20, 20, 20, 0.7); 
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  
  /* Curves and Borders */
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  
  /* Spacing */
  padding: 10px 0;
  box-shadow: 5px 0 20px rgba(0, 0, 0, 0.3);
}

.side-icon {
  /* Make the icons float a bit */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 12px;
  margin: 5px 10px;
}

.side-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

/* 3. Search Bar Styling */
.games-search-wrap input {
  /* Pill shape */
  border-radius: 50px; 
  
  /* Glass effect dark background */
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 24px;
  
  /* Glow on focus */
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.games-search-wrap input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* 4. Game Cards (Curved & High Quality) */
.game-card {
  /* Remove any default blockiness */
  background: transparent;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy smooth */
  text-decoration: none; /* remove link underline */
}

.game-thumb {
  position: relative;
  border-radius: 24px; /* Heavy curve */
  overflow: hidden; /* Clips the image to the curve */
  
  /* The "Less Pixaly" Look: Deep shadows hide edges */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  aspect-ratio: 1 / 1; /* Keeps them square */
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents stretching/pixelation */
  transition: transform 0.4s ease;
  display: block;
}

/* 5. Hover Effects */
.game-card:hover {
  transform: translateY(-8px) scale(1.02); /* Floats up */
  z-index: 2;
}

.game-card:hover img {
  transform: scale(1.1); /* Zoom effect inside */
}

/* 6. The Overlay Text */
.game-overlay {
  /* Make it a smooth gradient instead of a solid block */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  
  /* Positioning */
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 10px;
  
  /* Text styling */
  text-align: center;
  color: white;
  font-weight: bold;
  opacity: 0; /* Hidden by default */
  transform: translateY(10px);
  transition: all 0.3s ease;
  
  /* Ensure text doesn't look pixaly */
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.game-card:hover .game-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* FIX POPULAR GAMES */
.popular-wrap {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.popular-track {
  display: flex;
  gap: 20px;
  animation: scrollTrack 25s linear infinite;
  padding: 20px 0;
}

@keyframes scrollTrack {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* RIGHT SIDE HEADER */
.side-header {
  position: fixed;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;

  padding: 10px;
  border-radius: 18px;

  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid var(--border-soft);
  z-index: 1000;
}

/* ICON BUTTON */
.side-icon {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;
  text-decoration: none;

  transition: 0.2s;
}

/* SVG ICON */
.side-icon svg {
  width: 20px;
  height: 20px;
  fill: #9ca3af; /* gray */
  transition: 0.2s;
}

/* HOVER */
.side-icon:hover {
  background: rgba(255,255,255,0.05);
}

.side-icon:hover svg {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
}

/* ACTIVE PAGE */
.side-icon.active svg {
  fill: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
}

/* PROXY MODE SAFE */
body.sj-proxied .side-header {
  pointer-events: auto;
}


/* ===== QUICK PANEL (VISITOR COUNTER + LINKS) ===== */

.quick-panel {
  position: fixed;
  top: 10px;
  right: 10px;
  background: var(--panel);
  border: 2px solid var(--border-hard);
  padding: 12px;
  font-family: "Press Start 2P";
  font-size: 8px;
  color: var(--fg);
  box-shadow: 0 0 0 1px #000, 0 0 20px rgba(0,0,0,0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visitor-count {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent);
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-btn {
  text-decoration: none;
  text-align: center;
  padding: 6px;
  font-size: 8px;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.quick-btn:hover {
  background: rgba(0,255,127,0.25);
  box-shadow: 0 0 14px rgba(0,255,127,0.6);
}


/* CATEGORY ICONS ABOVE POPULAR GAMES */

.popular-filter-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  margin-top: 10px;
}

.filter-icon {
  width: 32px;
  height: 32px;
  opacity: 0.35;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.filter-icon:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.filter-icon.active {
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--accent));
  transform: scale(1.15);
}


/* ===== QUICK PANEL (VISITOR COUNTER + LINKS) ===== */

.quick-panel {
  position: fixed;
  top: 10px;
  right: 10px;
  background: var(--panel);
  border: 2px solid var(--border-hard);
  padding: 12px;
  font-family: "Press Start 2P";
  font-size: 8px;
  color: var(--fg);
  box-shadow: 0 0 0 1px #000, 0 0 20px rgba(0,0,0,0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visitor-count {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent);
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-btn {
  text-decoration: none;
  text-align: center;
  padding: 6px;
  font-size: 8px;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.quick-btn:hover {
  background: rgba(0,255,127,0.25);
  box-shadow: 0 0 14px rgba(0,255,127,0.6);
}


/* ============================================================
   ACCOUNT PAGE FIXES — clean inputs, correct font, normal size
   ============================================================ */

/* container around each section */
.account-box {
  padding: 18px;
  border: 1px solid #262626;
  background: rgba(0,0,0,0.35);
  margin-bottom: 22px;
}

/* labels */
.account-box label {
  font-family: "Spectral", serif;
  font-size: 11px;
  color: var(--fg);
  display: block;
  margin-bottom: 4px;
}

/* input fields */
.account-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  border: 2px solid var(--accent);
  background: #0d0d0d;
  color: #ffffff;
  outline: none;
  border-radius: 4px;
  margin-bottom: 10px;
}

.account-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* login/signup buttons */
.account-btn {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  background: #002e1d;
  color: var(--accent);
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: 0.2s ease;
}

.account-btn:hover {
  background: #004f31;
  transform: translateY(-1px);
}

.media-card,
.tmdb-card,
.movie-card,
.tv-card {
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.poster-thumb {
  background: none !important;
  border: none !important;
  border-radius: 16px;
  overflow: hidden;
}



/* NAVIGATION FIXES — ALIGN ICON WITH TEXT */
.site-nav a.account-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 22px;
  margin: 0;
}

/* Actual icon element */
#account-icon {
  width: 18px;
  height: 18px;
  display: block;
  filter: grayscale(1) brightness(0.75);  /* gray inactive */
  transition: filter 0.2s ease, transform 0.2s ease;
  transform: translateY(1px); /* perfect vertical alignment */
}

/* Hover slightly brightens */
.site-nav a.account-link:hover #account-icon {
  filter: grayscale(0.6) brightness(1);
}

/* ACTIVE PAGE → ACCENT ICON */
html[data-accent="green"]   .site-nav a.account-link.active #account-icon {
  content: url("thumbs/acc/green.png");
  filter: none;
}

html[data-accent="violet"]  .site-nav a.account-link.active #account-icon {
  content: url("thumbs/acc/purple.png");
  filter: none;
}

html[data-accent="amber"]   .site-nav a.account-link.active #account-icon {
  content: url("thumbs/acc/amber.png");
  filter: none;
}

html[data-accent="white"]   .site-nav a.account-link.active #account-icon {
  content: url("thumbs/acc/white.png");
  filter: none;
}

/* inactive ALWAYS gray */
.site-nav a.account-link:not(.active) #account-icon {
  content: url("thumbs/acc/gray.png"); /* your gray version */
}


/* === ACCOUNT ICON BASE === */
.account-icon-link img {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 4px var(--accent));
  transition: 0.15s ease;
}

.account-icon-link:hover img {
  filter: drop-shadow(0 0 6px var(--accent)) brightness(1.3);
}

/* ACCENT VARIATIONS */
html[data-accent="green"] #account-icon {
  content: url("thumbs/acc/green.png");
}

html[data-accent="violet"] #account-icon {
  content: url("thumbs/acc/purple.png");
}

html[data-accent="amber"] #account-icon {
  content: url("thumbs/acc/amber.png");
}

html[data-accent="white"] #account-icon {
  content: url("thumbs/acc/white.png");
}


/* ================================
   ACCOUNT PAGE OVERRIDES
   Makes buttons normal-sized,
   fixes font, proper spacing
================================ */

.account-panel,
#loggedin-section .home-panel {
  font-size: 12px !important;
}

/* Inputs */
.account-block input {
  font-size: 12px !important;
  padding: 10px !important;
  height: 38px;
}

/* Buttons */
.account-btn,
.account-actions .proxy-btn {
  font-size: 12px !important;
  padding: 10px 14px !important;
  height: 40px;
  line-height: 1;
  font-family: "Press Start 2P", sans-serif !important;
}

/* Full-width login/create buttons */
.account-btn {
  width: 100% !important;
}

/* Account action row */
.account-actions {
  gap: 12px;
}

.account-actions .proxy-btn {
  min-width: 140px;
  text-align: center;
}

/* Email label */
.account-email {
  font-size: 12px !important;
}

/* ========= THEME VARIANTS (ONLY OVERRIDE COLORS, NOTHING ELSE) ========= */

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #050505;
  --panel: #080808;
  --panel-alt: #101010;
  --fg: #f5f5f5;
  --fg-dim: #7f7f7f;
  --border-hard: #262626;
}

:root[data-theme="light"] {
  --bg: #f4f4f5;
  --bg-soft: #e4e4e7;
  --panel: #ffffff;
  --panel-alt: #e5e7eb;
  --fg: #020617;
  --fg-dim: #4b5563;
  --border-hard: #cbd5f5;
}

:root[data-theme="baby"] {
  --bg: #021521;
  --bg-soft: #032334;
  --panel: #04243a;
  --panel-alt: #063751;
  --fg: #e0f2ff;
  --fg-dim: #8fb4d9;
  --border-hard: #0f3c5e;
}

:root[data-theme="xmas"] {
  --bg: #050b08;
  --bg-soft: #0a1510;
  --panel: #0f2017;
  --panel-alt: #152b1f;
  --fg: #fefce8;
  --fg-dim: #a3a3a3;
  --border-hard: #14532d;
}

/* ==========================================
   SETTINGS PAGE OVERRIDES (normal sized UI)
========================================== */

.settings-panel,
.settings-panel * {
  font-size: 12px !important;
  font-family: "Press Start 2P", sans-serif !important;
}

/* Buttons inside settings */
.settings-panel .proxy-btn,
#blank-launch,
#btn-reset-settings,
#btn-clear-media {
  font-size: 12px !important;
  padding: 10px 14px !important;
  height: 40px;
  text-align: center;
  line-height: 1;
}

/* Make full-width action buttons cleaner */
#blank-launch {
  width: 100%;
}

/* Inputs */
.settings-panel input,
.settings-panel select {
  font-size: 12px !important;
  padding: 10px !important;
  height: 38px;
}

/* Section labels */
.settings-panel .motd-label {
  font-size: 11px !important;
}

/* SETTINGS PAGE BUTTON FIX */
.settings-panel .proxy-btn {
  font-size: 8px !important;          /* smaller text */
  padding: 4px 10px !important;       /* less vertical height */
  border-width: 2px !important;
  width: auto !important;
  text-align: center;
  letter-spacing: 0.04em;
  font-family: "Press Start 2P", system-ui, sans-serif;
}

.settings-panel input[type="text"],
.settings-panel input[type="password"],
.settings-panel select {
  font-size: 8px !important;
  padding: 5px 8px !important;
  height: auto !important;
}

.settings-panel label {
  font-size: 8px !important;
}

.settings-panel {
  font-size: 8px !important;
}

/* --- SETTINGS PAGE BUTTON FIX --- */
.settings-page .proxy-btn {
  font-size: 8px !important;
  padding: 5px 10px !important;
  height: auto !important;
  border-width: 2px !important;
  font-family: "Press Start 2P", system-ui, sans-serif !important;
  letter-spacing: 0.05em;
  width: auto !important;
}

/* Inputs in settings */
.settings-page input,
.settings-page select {
  font-size: 8px !important;
  padding: 6px 8px !important;
  font-family: "Press Start 2P", system-ui, sans-serif !important;
}

/* Labels and small text */
.settings-page label,
.settings-page .motd-label {
  font-size: 8px !important;
}



/* ========= REST OF YOUR ORIGINAL CSS (UNCHANGED) ========= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Press Start 2P", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.04em;

  /* dungeon / CRT grid */
  background-image:
    linear-gradient(rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.9)),
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 16px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 16px
    );

  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

/* ========= HEADER / NAV ========= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.98);
  border-bottom: 3px solid var(--border-hard);
  box-shadow: 0 0 0 1px #000, 0 6px 0 #000, 0 0 24px rgba(0, 255, 127, 0.2);
  flex-shrink: 0;
}

.site-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 6px rgba(0, 255, 127, 0.7);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-title span {
  font-size: 8px;
  color: var(--fg-dim);
  text-shadow: none;
}

.site-nav {
  display: flex;
  gap: 6px;
  font-size: 8px;
}

.site-nav a {
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 0;
  border: 2px solid transparent;
  color: var(--fg-dim);
  cursor: pointer;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.site-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 255, 127, 0.2),
    transparent 50%,
    rgba(0, 255, 127, 0.2)
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.site-nav a:hover::before {
  opacity: 1;
}

.site-nav a:hover {
  color: var(--fg);
  border-color: var(--border-hard);
  box-shadow: 0 0 0 1px #000, 0 0 18px rgba(0, 255, 127, 0.4);
}

.site-nav a.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px #000, 0 0 18px rgba(0, 255, 127, 0.6);
}

/* ========= MAIN LAYOUT ========= */

main {
  padding: 18px 12px 32px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* ========= PAGE HEADER ========= */

.page-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

h1 {
  font-size: 14px;
  margin: 0;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

h1::before,
h1::after {
  content: "█";
  color: var(--accent);
  font-size: 12px;
}

.sub {
  font-size: 8px;
  color: var(--fg-dim);
  max-width: 420px;
  line-height: 1.6;
}

.sub span {
  color: var(--accent);
}

/* ========= HOME ========= */

.home-main {
  flex: 1;
  padding: 18px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-center {
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-logo-title {
  text-align: center;
  padding-bottom: 6px;
}

.home-logo-mark {
  font-size: 26px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 255, 127, 0.8),
    0 0 22px rgba(0, 255, 127, 0.5);
}

.home-logo-sub {
  margin-top: 4px;
  font-size: 8px;
  color: var(--fg-dim);
}

.home-panel {
  border: 2px solid var(--border-hard);
  background: radial-gradient(circle at top left, #101010 0, #050505 60%);
  padding: 12px;
  box-shadow: 0 0 0 1px #000, 0 0 18px rgba(0, 0, 0, 0.9);
}

.home-proxy-panel {
  margin: 0;
}

.home-popular-panel {
  max-width: 1000px;
  margin: 0 auto;
}

.motd-label {
  font-size: 8px;
  color: var(--fg-dim);
  margin-bottom: 6px;
}

/* MOTD */
#motd {
  font-size: 9px;
  line-height: 1.6;
  cursor: pointer;
  padding: 8px;
  border: 2px dashed rgba(60, 60, 60, 0.9);
  background: rgba(0, 0, 0, 0.9);
}

#motd:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 255, 127, 0.4);
}

/* POPULAR STRIP */
.popular-wrap {
  overflow: hidden;
  border: 2px solid var(--border-hard);
  background: #000;
  box-shadow: 0 0 0 1px #000, 0 0 24px rgba(0, 0, 0, 0.9);
}

.popular-track {
  display: flex;
  gap: 10px;
  padding: 10px;
  width: max-content;
  animation: popular-scroll 28s linear infinite;
}

@keyframes popular-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.popular-pill {
  position: relative;
  display: block;
  flex: 0 0 96px;
  height: 96px;
  border: 2px solid var(--border-hard);
  background: #050505;
  overflow: hidden;
  cursor: pointer;
}

.pill-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #050505;
  image-rendering: pixelated;
}

.pill-name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  padding: 4px;
  text-align: center;
  background: rgba(0, 0, 0, 0.82);
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.12s ease;
  text-shadow: 0 0 6px rgba(0, 255, 127, 0.7);
}

.popular-pill:hover .pill-name {
  opacity: 1;
}

@media (max-width: 600px) {
  .popular-pill {
    flex: 0 0 80px;
    height: 80px;
  }
}

/* PROXY FORM */

.proxy-label {
  font-size: 8px;
  color: var(--fg-dim);
  margin-bottom: 6px;
}

#sj-form {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

#sj-address {
  flex: 1;
  padding: 8px 10px;
  border-radius: 0;
  border: 2px solid var(--border-hard);
  background: #000;
  color: var(--fg);
  font-size: 9px;
  font-family: "Press Start 2P", system-ui, sans-serif;
}

#sj-address::placeholder {
  color: #444;
}

#sj-address:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px #000, 0 0 12px rgba(0, 255, 127, 0.5);
}

.proxy-btn {
  font-size: 8px;
  padding: 0 10px;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.proxy-btn:hover {
  background: rgba(0, 255, 127, 0.25);
  box-shadow: 0 0 0 1px #000,
    0 0 16px rgba(0, 255, 127, 0.6);
}

.poster-thumb img {
  border-radius: 16px;
  display: block;
}

#media-search {
  border-radius: 14px !important;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
}


/* ERROR */
#sj-error {
  margin-top: 6px;
  font-size: 8px;
  color: #ff6666;
  white-space: pre-wrap;
}

#sj-error-code {
  font-size: 7px;
  color: #ccc;
  font-family: "Courier New";
}

#sj-frame {
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

/* SEARCH + GRIDS */

.games-search-wrap,
.app-search-wrap,
.media-search-wrap {
  margin: 10px 0 18px;
  padding: 8px;
  border: 2px solid var(--border-hard);
  background: radial-gradient(circle at top left, #101010 0, #050505 60%);
  box-shadow: 0 0 0 1px #000, 0 0 18px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-label {
  font-size: 8px;
  color: var(--fg-dim);
}

#game-search,
#app-search,
#media-search {
  flex: 1;
  padding: 7px 10px;
  border-radius: 0;
  border: 2px solid var(--border-hard);
  background: #000;
  color: var(--fg);
  font-size: 9px;
  font-family: "Press Start 2P";
}

.game-grid,
.app-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(6, 2fr);
  gap: 14px;
}

.game-card,
.app-card,
.media-card {
  background: var(--panel);
  border-radius: 16px;            /* CHANGED: from 0 to 16px for curves */
  padding: 6px;
  border: none;                   /* CHANGED: removed the solid border line */
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.08s ease,
    box-shadow 0.08s ease,
    border-color 0.08s ease,
    background 0.08s ease;
  position: relative;
  overflow: hidden;               /* Keeps image inside the new curves */
}

/* This part adds the "retro" scanline effect. 
   If you want the icons to be clean, you can delete this whole block. 
   Otherwise, I've added a curve to it so it matches the card. */

.game-thumb,
.app-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: #000;
  border: 2px solid #151515;
  overflow: hidden;
}

.poster-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  background: #000;
  border: 2px solid #151515;
  overflow: hidden;
}

.game-thumb img,
.app-thumb img,
.poster-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.game-overlay,
.app-overlay,
.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.12s ease;
  font-size: 9px;
  color: var(--accent);
  text-shadow: 0 0 6px rgba(0, 255, 127, 0.7);
}

.game-card:hover .game-overlay,
.app-card:hover .app-overlay,
.media-card:hover .media-overlay {
  opacity: 1;
}

.app-card:hover,
.media-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--panel-alt);
  box-shadow: 0 0 0 1px #000,
    0 0 20px rgba(0, 255, 127, 0.45);
}

#game-empty,
#app-empty,
#media-empty {
  display: none;
  font-size: 8px;
  color: var(--fg-dim);
  padding: 6px 8px;
  border: 1px dashed #333;
  background: rgba(0, 0, 0, 0.7);
}

/* PLAYER LAYOUT */

main.player-main {
  flex: 1;
  padding: 12px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100vh - var(--header-h));
}

.player-info {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--fg-dim);
}

.player-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.player-actions button,
.player-actions a {
  font-size: 8px;
  border: 2px solid var(--border-hard);
  background: #000;
  color: var(--fg);
  padding: 3px 8px;
}

.player-actions button:hover,
.player-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 14px rgba(0, 255, 127, 0.5);
}

.player-frame-wrap {
  flex: 1;
  border: 2px solid var(--border-hard);
  overflow: hidden;
  background: #020617;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

#media-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Add this to the bottom of your index.css */

.home-panel, .account-box, .settings-panel {
    border-radius: 24px; /* Matches your game-thumb curve */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(8, 8, 8, 0.8);
}

.account-input {
    border-radius: 50px !important; /* Pill shape for search/inputs */
    padding: 10px 20px !important;
}

.account-btn, .proxy-btn, .quick-btn {
    border-radius: 50px !important; /* Pill shape for buttons */
    text-transform: uppercase;
}

/* RESPONSIVE */

@media (max-width: 1024px) {
  .game-grid,
  .app-grid,
  .media-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .site-header {
    padding: 0 10px;
  }
  .site-title {
    font-size: 10px;
  }
  .site-nav {
    gap: 4px;
  }
  .site-nav a {
    padding: 3px 6px;
  }
  .game-grid,
  .app-grid,
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 540px) {
  body {
    font-size: 9px;
  }
  .game-grid,
  .app-grid,
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* HARD RESET MEDIA CARDS */
.media-card,
.tmdb-card,
.movie-card,
.tv-card {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

/* KILL PSEUDO ELEMENTS (THIS IS THE SQUARE LINE) */
.media-card::before,
.media-card::after,
.tmdb-card::before,
.tmdb-card::after,
.poster-thumb::before,
.poster-thumb::after {
  content: none !important;
  display: none !important;
}

/* ENSURE IMAGE IS THE ONLY VISIBLE THING */
.poster-thumb {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  overflow: hidden;
  border-radius: 16px;
}

.poster-thumb img {
  display: block;
  border-radius: 16px;
  border: none !important;
  outline: none !important;
}

  /* KILL ALL LINK / FOCUS RINGS ON MEDIA CARDS */
.media-card,
.media-card:focus,
.media-card:focus-visible,
.media-card:active {
  outline: none !important;
  box-shadow: none !important;
}

/* ALSO KILL IT ON THE POSTER WRAPPER */
.poster-thumb,
.poster-thumb:focus,
.poster-thumb:focus-visible {
  outline: none !important;
}

  /* MEDIA CARDS — REMOVE BLOCK CONTAINER */
.media-card {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* KILL ALL BROWSER FOCUS / ACTIVE STYLES */
.media-card:focus,
.media-card:focus-visible,
.media-card:active {
  outline: none !important;
  box-shadow: none !important;
}

.media-card {
  -webkit-tap-highlight-color: transparent;
}

/* POSTER IS THE ONLY VISUAL ELEMENT */
.poster-thumb {
  border-radius: 18px;
  overflow: hidden;
  background: transparent !important;
}

/* IMAGE MUST FILL + CLIP */
.poster-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}


/* PREVENT CHROME FROM DRAWING ACCESSIBILITY RING */
.media-card {
  -webkit-tap-highlight-color: transparent;
}

/* ENSURE IMAGE IS CLIPPED CLEANLY */
.poster-thumb {
  border-radius: 16px;
  overflow: hidden;
  background: transparent !important;
}

  /* ===== REMOVE SQUARE CARD BEHIND GAMES & MEDIA ===== */

/* Section containers */
.section,
.section-inner,
.section-content,
.media-section,
.games-section {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Grid wrappers */
.grid,
.grid-wrapper,
.media-grid,
.games-grid {
  background: transparent !important;
}

/* Individual cards */
.card,
.media-card,
.game-card {
  background: rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none !important;
  overflow: hidden;
}

/* Kill invisible square overlays */
.card::before,
.card::after,
.media-card::before,
.game-card::before {
  content: none !important;
}

  /* ===== FIX SQUARE BACKGROUND ON GAME / MEDIA CARDS ===== */

a.game-card,
a.media-card {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;

  border-radius: 22px;
  overflow: hidden; /* clips everything inside */
}

/* If the image is inside */
a.game-card img,
a.media-card img {
  border-radius: 22px;
  display: block;
}

  /* === ABSOLUTE SQUARE REMOVAL === */

a.game-card,
a.game-card *,
a.game-card::before,
a.game-card::after {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

/* Force rounding at EVERY LEVEL */
a.game-card {
  border-radius: 22px !important;
  overflow: hidden !important;
  position: relative;
}

a.game-card::before,
a.game-card::after {
  content: none !important;
  display: none !important;
}

/* Images */
a.game-card img {
  display: block;
  border-radius: 22px !important;
}

  /* ===== KILL THE GAME CARD SQUARE COMPLETELY ===== */

.game-card {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* this is usually the culprit */
.game-thumb {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  border-radius: 14px; /* rounded */
  overflow: hidden;    /* clip image to curve */
}

/* ensure image matches curve */
.game-thumb img {
  border-radius: 14px;
  display: block;
}

/* overlay should not add a square */
.game-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.65),
    rgba(0,0,0,0)
  ) !important;

  border-radius: 14px;
}

.game-card::before,
.game-card::after,
.game-thumb::before,
.game-thumb::after {
  content: none !important;
  display: none !important;
}

  /* Kill desktop forced box */
@media (min-width: 768px) {
  .game-thumb,
  .media-card {
    background: transparent !important;
    box-shadow: none !important;
  }

  .game-thumb {
    height: auto !important;
    aspect-ratio: auto !important;
  }

  .game-thumb img {
    display: block;
    width: 100%;
    height: auto;
  }

  .game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0); /* invisible */
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .25s ease, background .25s ease;
}

.game-card:hover .game-overlay {
  opacity: 1;
  background: rgba(20,20,20,0.45);
  backdrop-filter: blur(10px);
}

  .game-thumb {
  position: relative;
  background: none !important;
  padding: 0;
}

.game-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

  .game-overlay {
  display: none;
}

.game-card:hover .game-overlay {
  display: flex;
  position: absolute;
  inset: 0;

  align-items: center;
  justify-content: center;

  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: 18px;
}

  .game-card,
.game-thumb {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}

  .game-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.game-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

  .game-card {
  all: unset;
  display: inline-block;
}

  .game-thumb {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
}

  .game-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

  .game-card {
  cursor: pointer;
  text-decoration: none;
}

  .game-card {
  outline: none !important;
  border: none;
  background: transparent;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.game-card:focus,
.game-card:focus-visible,
.game-card:active {
  outline: none !important;
  box-shadow: none !important;
}

.game-thumb {
  overflow: hidden; /* THIS IS CRITICAL */
  border-radius: 14px; /* or whatever you use */
  background: transparent;
}

  .game-thumb img {
  display: block;            /* kills inline img box */
  width: 100%;
  height: 100%;
  object-fit: cover;

  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

  .game-thumb img {
  display: block;            /* kills inline img box */
  width: 100%;
  height: 100%;
  object-fit: cover;

  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.game-card::before,
.game-card::after {
  content: none !important;
  display: none !important;
}

  /* Remove borders and outlines from all images in the games section */
.games-container img, 
.game-icon img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Ensure links don't have borders or underlines */
.games-container a,
.game-icon a {
    text-decoration: none;
    border: none;
}
.game-card {
    /* REMOVES THE BOX/BORDER */
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important; /* Removes any grey background fill */

    /* APPLIES THE CURVES */
    border-radius: 20px; /* Adjust this to make it more or less round */
    overflow: hidden;    /* Important: Clips the image corners to match the card */
}

/* Ensure the image inside also follows the curve */
.game-card img {
    border: none !important;
    border-radius: 20px; 
    display: block;
}

  /* 1. Remove border from the main card */
.game-card, a.game-card {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 20px; /* Makes it curved */
    overflow: hidden;    /* Keeps image inside the curves */
}

/* 2. KILL THE "GHOST" BOX (The most likely culprit) */
a.game-card:after {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* 3. Make sure the image inside is also curved */
.game-card img {
    border-radius: 20px !important;
    border: none !important;
}
