/* UnblockedHub Games — own look (does not use /css/style.css) */

:root {
  --ink: #0b0e0c;
  --ink-2: #121816;
  --panel: #161d1a;
  --line: #24302a;
  --line-hot: #3d5c4a;
  --text: #e7f2ea;
  --mute: #8aa094;
  --faint: #5a6e62;
  --lime: #b8f24a;
  --lime-dim: rgba(184, 242, 74, 0.14);
  --cyan: #3ee0c2;
  --amber: #ffb454;
  --danger: #ff6b5a;
  --radius: 14px;
  --nav-h: 60px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(62, 224, 194, 0.12), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(184, 242, 74, 0.1), transparent 50%),
    linear-gradient(180deg, #0d1210 0%, var(--ink) 40%, #0a0f0c 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, select { font: inherit; color: inherit; }

/* Shared nav classes from shared.js — restyled here */
.navbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 22px;
  background: rgba(11, 14, 12, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.navbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--lime);
  white-space: nowrap;
}

.navbar-logo svg { color: var(--cyan); }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--mute);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.active { color: var(--ink); background: var(--lime); }
.nav-link.disabled { opacity: 0.35; pointer-events: none; }

.nav-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1200;
}

/* Page */
.arcade {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 72px;
}

.hero {
  position: relative;
  min-height: min(52vh, 420px);
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 48px 0 36px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -10% -5% auto auto;
  width: min(58vw, 520px);
  height: min(58vw, 520px);
  border-radius: 40% 60% 55% 45%;
  background:
    conic-gradient(from 120deg, rgba(184, 242, 74, 0.22), transparent 40%, rgba(62, 224, 194, 0.18), transparent 75%),
    radial-gradient(circle at 40% 40%, rgba(62, 224, 194, 0.25), transparent 62%);
  filter: blur(8px);
  animation: drift 14s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(-28px, 18px) rotate(12deg); }
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.92;
  max-width: 10ch;
  background: linear-gradient(120deg, var(--text) 20%, var(--lime) 70%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandIn 0.7s var(--ease) both;
}

@keyframes brandIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.hero-copy {
  max-width: 36ch;
  color: var(--mute);
  font-size: 1.05rem;
  line-height: 1.55;
  animation: brandIn 0.7s var(--ease) 0.08s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  animation: brandIn 0.7s var(--ease) 0.14s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--lime);
  color: var(--ink);
}

.btn-ghost {
  border: 1px solid var(--line-hot);
  color: var(--text);
  background: rgba(22, 29, 26, 0.55);
}

.btn-ghost:hover { border-color: var(--cyan); }

.toolbar {
  display: grid;
  gap: 14px;
  margin: 8px 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 24, 22, 0.72);
  backdrop-filter: blur(10px);
}

.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-tab {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--mute);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.source-tab:hover { color: var(--text); border-color: var(--line-hot); }
.source-tab.active {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

.source-tab .count {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.75;
}

.filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--faint);
  pointer-events: none;
}

#search {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  outline: none;
  transition: border-color 0.2s var(--ease);
}

#search:focus { border-color: var(--cyan); }

#category {
  min-width: 160px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  outline: none;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px var(--lime-dim);
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.status-dot.warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 180, 84, 0.15); }
.status-dot.err { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 90, 0.15); }

.section-label {
  margin: 8px 0 14px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid transparent;
  background: transparent;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
  animation: tileIn 0.45s var(--ease) both;
}

.tile:hover { transform: translateY(-4px); }
.tile:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

@keyframes tileIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.tile-art {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(145deg, #1c2621, #101612);
  border: 1px solid var(--line);
  position: relative;
}

.tile:hover .tile-art { border-color: var(--line-hot); }

.tile-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.tile:hover .tile-art img { transform: scale(1.06); }

.tile-art .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--faint);
}

.tile-meta { display: grid; gap: 4px; padding: 0 2px 2px; }

.tile-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-sub {
  font-size: 0.72rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.empty, .loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--mute);
}

.loading .spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 14px;
  border: 2px solid var(--line);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Player overlay */
.player {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  background: #050706;
}

.player.open { display: flex; }

.player-bar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
}

.player-title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-frame-wrap {
  flex: 1;
  position: relative;
  background: #000;
}

.player-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.player-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
  gap: 12px;
  background: var(--ink);
}

.player-fallback.show { display: grid; }

@media (max-width: 720px) {
  .filters { grid-template-columns: 1fr; }
  #category { width: 100%; }
  .navbar { gap: 12px; padding: 0 12px; }
  .navbar-links .nav-link span { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .hero { min-height: auto; padding-top: 28px; }
}
