@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #141414;
  --surface: #181818;
  --primary: #ffffff;
  --accent: #00d4ff;
  --muted: #888888;
  --card-bg: #181818;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background-color: var(--bg);
  color: #e5e5e5;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  padding-bottom: 60px;
  overflow-x: hidden;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4%;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 10%, transparent);
  background-color: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(10px);
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 4px #fff, 0 0 10px var(--accent), 0 0 20px var(--accent);
  cursor: pointer;
}

.search-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 450px; /* Hier kannst du einstellen, wie breit die Leiste in der Mitte sein soll */
    display: flex;
    justify-content: center;
}
.search-input {
  width: 100%;
  padding: 10px 20px;
  background: rgba(0,0,0,0.6);
  border: 1px solid #333;
  border-radius: 4px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.3s ease;
}
.search-input:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  background: rgba(0,0,0,0.85);
}

.search-dropdown {
  position: absolute;
  top: 110%; left: 0; right: 0;
  background: rgba(18,18,18,0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  max-height: 420px;
  overflow-y: auto;
  z-index: 1100;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  display: none;
  padding: 8px 0;
}
.search-dropdown.active { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: rgba(255,255,255,0.06); transform: translateX(1px); }

.dropdown-thumb {
  width: 60px;
  height: 40px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.dropdown-no-thumb .dropdown-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #8ab4f8;
  background: linear-gradient(135deg, rgba(3,10,21,0.95), rgba(12,24,48,0.9));
}

.dropdown-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dropdown-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-category {
  font-size: 11px;
  color: #8aa8c8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.dropdown-link {
  font-size: 12px;
  color: #bbb;
  opacity: 0.95;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-empty,
.dropdown-show-all {
  padding: 14px 18px;
  font-size: 13px;
  text-align: center;
  color: #b3b3b3;
}
.dropdown-show-all {
  color: #00d4ff;
  font-weight: 700;
}
.dropdown-show-all:hover { background: rgba(0,212,255,0.08); }

.reg-status-row.info { color: #f3d86f; }

/* Netflix Spotlight Banner */
.featured-banner {
  width: 100%;
  height: 55vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-bottom: 20px;
  cursor: pointer;
  overflow: hidden;
  background-color: var(--bg);
}

.banner-bg-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-size: cover;
  background-position: center 30%;
  transition: opacity 0.5s ease-in-out;
}

.banner-bg-container .vr-special-thumb,
.banner-bg-container .ttt-special-thumb {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  inset: 0;
}
.banner-bg-container .ttt-special-thumb {
  padding: 60px !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, 1fr) !important;
}
.banner-bg-container .ttt-thumb-cell {
  font-size: 70px !important;
}
.banner-bg-container .ttt-thumb-o {
  width: 60px !important;
  height: 60px !important;
  border-width: 8px !important;
}
.banner-bg-container .vr-thumb-ship {
  bottom: 50px !important;
  border-left-width: 25px !important;
  border-right-width: 25px !important;
  border-bottom-width: 50px !important;
}
.banner-bg-container .vr-thumb-obs-1 {
  top: 30% !important; left: 20% !important; width: 120px !important; height: 20px !important;
}
.banner-bg-container .vr-thumb-obs-2 {
  top: 50% !important; right: 15% !important; width: 180px !important; height: 25px !important;
}
.banner-bg-container .vr-thumb-orb {
  top: 40% !important; left: 55% !important; width: 30px !important; height: 30px !important;
}

.featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(75deg, rgba(20,20,20,0.95) 10%, rgba(20,20,20,0.5) 40%, transparent 80%),
              linear-gradient(to top, var(--bg) 0%, transparent 40%);
  z-index: 1;
}
.featured-content {
  position: relative;
  z-index: 2;
  padding: 0 4% 45px 4%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.featured-title { font-family: 'Orbitron', sans-serif; font-size: 3rem; font-weight: 900; color: #ffffff; margin-bottom: 8px; line-height: 1.1; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.featured-genre { font-size: 13px; color: #aaa; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }

.progress-container {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 7px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  z-index: 15;
}
.progress-bar {
  width: 0%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.banner-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #00d4ff;
  border-color: #00d4ff;
}
.arrow-left { left: 1.5%; }
.arrow-right { right: 1.5%; }

/* Game rows */
.game-section {
  padding: 0 4%;
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: -20px;
  position: relative;
  z-index: 10;
}

.row-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  color: #e5e5e5;
  font-weight: 700;
  margin-bottom: 5px;
  display: inline-block;
}

.game-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 12px 0 25px 0;
  scroll-behavior: auto;
}

.game-row::-webkit-scrollbar { height: 6px; }
.game-row::-webkit-scrollbar-track { background: transparent; }
.game-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.game-row:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); }

/* Game cards */
.gcard {
  flex: 0 0 230px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  border: 1px solid transparent;
}

.gcard:hover {
  transform: scale(1.12);
  z-index: 50;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 212, 255, 0.4);
  border-color: #00d4ff;
}

.gcard-thumb {
  width: 100%;
  height: 130px;
  background-size: cover;
  background-position: center;
  background-color: #222;
}

/* Tic-Tac-Toe thumbnail */
.ttt-special-thumb {
  width: 100%;
  height: 130px;
  background-color: var(--primary);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 10px;
  position: relative;
}
.ttt-special-thumb::before, .ttt-special-thumb::after {
  content: ''; position: absolute; background: #000000;
}
.ttt-special-thumb::before {
  top: 10px; bottom: 10px; left: 33.33%; width: 2px;
  box-shadow: calc(230px / 3 - 8px) 0 0 #000000;
}
.ttt-special-thumb::after {
  left: 10px; right: 10px; top: 33.33%; height: 2px;
  box-shadow: 0 calc(130px / 3 - 6px) 0 #000000;
}
.ttt-thumb-cell {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-size: 22px; font-weight: bold;
  color: #141414;
}
.ttt-thumb-x { color: #ff3344; }
.ttt-thumb-o {
  color: #0077ff;
  border: 3px solid #0077ff;
  width: 20px; height: 20px;
  border-radius: 4px;
  display: inline-block;
}

/* Void Runner thumbnail */
.vr-special-thumb {
  width: 100%;
  height: 130px;
  background: radial-gradient(circle at 50% 35%, #0e1e2d 10%, #03070b 80%);
  position: relative;
  overflow: hidden;
}
.vr-special-thumb::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(33deg, transparent 48%, rgba(0, 212, 255, 0.4) 49%, rgba(0, 212, 255, 0.4) 51%, transparent 52%),
    linear-gradient(-33deg, transparent 48%, rgba(0, 212, 255, 0.4) 49%, rgba(0, 212, 255, 0.4) 51%, transparent 52%),
    linear-gradient(90deg, transparent 48%, rgba(0, 212, 255, 0.15) 49%, rgba(0, 212, 255, 0.15) 51%, transparent 52%);
  background-position: center 35%;
}
.vr-thumb-ship {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 18px solid #aef6ff;
  filter: drop-shadow(0 0 5px var(--accent));
}
.vr-thumb-obs-1 {
  position: absolute; top: 45%; left: 25%; width: 32px; height: 6px;
  background: #ff2d6a; filter: drop-shadow(0 0 4px #ff2d6a); border-radius: 1px;
}
.vr-thumb-obs-2 {
  position: absolute; top: 60%; right: 20%; width: 45px; height: 8px;
  background: #ff2d6a; filter: drop-shadow(0 0 5px #ff2d6a); border-radius: 1px;
}
.vr-thumb-orb {
  position: absolute; top: 50%; left: 55%; width: 8px; height: 8px;
  border-radius: 50%; border: 1.5px solid #00ffb4; background: rgba(0,255,180,0.3);
  filter: drop-shadow(0 0 4px #00ffb4);
}

.pong-special-thumb {
  width: 100%;
  height: 130px;
  background: radial-gradient(circle at 50% 30%, #080b18 18%, #060814 50%, #020408 100%);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.pong-grid {
  position: absolute;
  inset: 12px;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
}
.pong-paddle {
  position: absolute;
  width: 8px;
  height: 40px;
  background: linear-gradient(180deg, #6affff, #2bc6ff);
  box-shadow: 0 0 14px rgba(0,214,255,0.8);
  border-radius: 99px;
}
.pong-paddle.left { left: 18px; top: calc(50% - 20px); }
.pong-paddle.right { right: 18px; top: calc(50% - 20px); }
.pong-ball {
  position: absolute;
  width: 16px;
  height: 16px;
  top: calc(50% - 8px);
  left: calc(50% - 8px);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff, #84d6ff 60%, #01adff 100%);
  box-shadow: 0 0 16px rgba(1,173,255,0.9);
}

.gcard-info { padding: 12px; background: var(--card-bg); }
.gcard-name { font-family: 'Orbitron', sans-serif; font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard-genre { font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 500; letter-spacing: 0.5px; }

.tag-special-thumb {
  width: 100%;
  height: 130px;
  background: linear-gradient(180deg, #0a0d18 0%, #111423 40%, #07090f 100%);
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
.tag-special-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.22;
}
.tag-special-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 18%, rgba(255,255,255,0.05), transparent 14%),
              radial-gradient(circle at 72% 78%, rgba(0,212,255,0.08), transparent 16%);
}
.tag-platform {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(0,212,255,0.45));
  box-shadow: 0 0 12px rgba(0,212,255,0.14);
}
.tag-platform.plat-a { top: 18%; left: 10%; width: 24%; }
.tag-platform.plat-b { top: 18%; right: 10%; width: 20%; }
.tag-platform.plat-c { top: 38%; left: 6%; width: 18%; }
.tag-platform.plat-d { top: 42%; left: 38%; width: 28%; }
.tag-platform.plat-e { top: 56%; right: 8%; width: 22%; }
.tag-platform.plat-f { top: 68%; left: 12%; width: 26%; }
.tag-platform.plat-g { top: 78%; right: 20%; width: 18%; }
.tag-player {
  position: absolute;
  width: 14px;
  height: 18px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255,255,255,0.18);
}
.tag-player.blue { background: #00d4ff; top: 24%; left: 12%; }
.tag-player.red { background: #ff2d6a; top: 38%; left: 65%; }
.tag-player.green { background: #2dfc72; top: 52%; left: 42%; }
.tag-player.yellow { background: #ffcc00; top: 74%; left: 28%; }

/* Neon LED Intro Overlay */
#introOverlay {
  position: fixed; inset: 0;
  background-color: #080808;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#introOverlay.active { display: flex; opacity: 1; }

.neon-led-container {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.6rem, 9vw, 4rem);
  font-weight: 900;
  letter-spacing: clamp(2px, 1vw, 6px);
  color: rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 2px;
  max-width: 92vw;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.neon-letter {
  animation: neonTurnOn 1.8s forwards;
  opacity: 0.1;
  text-shadow: none;
}
.neon-letter:nth-child(1) { animation-delay: 0.1s; }
.neon-letter:nth-child(2) { animation-delay: 0.2s; }
.neon-letter:nth-child(3) { animation-delay: 0.3s; }
.neon-letter:nth-child(4) { animation-delay: 0.4s; }
.neon-letter:nth-child(5) { animation-delay: 0.6s; }
.neon-letter:nth-child(6) { animation-delay: 0.7s; }
.neon-letter:nth-child(7) { animation-delay: 0.8s; }
.neon-letter:nth-child(8) { animation-delay: 0.9s; }
.neon-letter:nth-child(9) { animation-delay: 1.0s; }

@keyframes neonTurnOn {
  0%   { opacity: 0.1; color: rgba(255,255,255,0.05); text-shadow: none; }
  20%  { opacity: 0.8; color: #fff; text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff; }
  23%  { opacity: 0.2; color: rgba(255,255,255,0.05); text-shadow: none; }
  26%  { opacity: 0.9; color: #fff; text-shadow: 0 0 12px #00d4ff, 0 0 25px #00d4ff; }
  28%  { opacity: 0.3; color: rgba(255,255,255,0.05); text-shadow: none; }
  32%  { opacity: 1; color: #fff; text-shadow: 0 0 5px #fff, 0 0 15px #00d4ff, 0 0 30px #00d4ff, 0 0 50px #00d4ff; }
  100% { opacity: 1; color: #fff; text-shadow: 0 0 5px #fff, 0 0 15px #00d4ff, 0 0 30px #00d4ff, 0 0 50px #00d4ff; }
}

/* Game Screen */
#gameScreen {
  position: fixed; inset: 0;
  background: #141414;
  z-index: 9998;
  display: none;
  flex-direction: column;
}
#gameScreen.active { display: flex; }

.game-screen-header {
  background: #181818;
  padding: 15px 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #333;
  z-index: 100;
}
.game-info-btn {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 101;
}
.game-info-btn:hover { background: #00d4ff; color: #000; }
.game-info-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.game-info-overlay.active { display: flex; }
.game-info-card {
  width: min(92%, 420px);
  padding: 24px;
  border-radius: 18px;
  background: rgba(8,10,20,0.98);
  border: 1px solid rgba(0,212,255,0.24);
  box-shadow: 0 0 40px rgba(0,212,255,0.16);
}
.game-info-card h2 { margin: 0 0 12px; font-family: 'Orbitron', sans-serif; font-size: 1.3rem; color: #fff; }
.game-info-card p, .game-info-card li { font-family: 'Inter', sans-serif; font-size: 0.95rem; color: #d7f3ff; line-height: 1.6; }
.game-info-card ul { margin: 12px 0 16px 18px; padding: 0; }
.game-info-controls { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.back-btn {
  background: rgba(255,255,255,0.1);
  color: white; border: none;
  padding: 8px 16px; border-radius: 4px;
  font-weight: 600; cursor: pointer;
  font-size: 14px; transition: background 0.2s;
}
.back-btn:hover { background: #00d4ff; color: #000; }
.game-screen-title { font-family: 'Orbitron', sans-serif; font-weight: 700; margin-left: 20px; color: #fff; }

.game-container-area {
  flex: 1; width: 100%; height: 100%;
  position: relative; background-color: #0b0b0b;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}

/* 404 error box */
.error-404-box {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 20px;
}
.error-code {
  font-family: 'Orbitron', sans-serif;
  font-size: 6rem; font-weight: 900;
  color: #333; line-height: 1; margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.2);
}
.error-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: #ff0055; margin-bottom: 15px; }
.error-msg { max-width: 450px; color: #aaa; font-size: 15px; line-height: 1.6; }

/* Responsive / Mobile adjustments */
@media (max-width: 720px) {
  header { padding: 12px 4%; }
  .logo { font-size: 1.2rem; }
  .search-container { width: 70%; left: 50%; transform: translateX(-50%); }
  .featured-banner { height: 34vh; }
  .featured-title { font-size: 1.6rem; }
  .game-row { gap: 10px; padding-bottom: 14px; }
  .gcard { flex: 0 0 160px; }
  .gcard-thumb { height: 100px; }
  .gcard:hover { transform: none; box-shadow: 0 6px 14px rgba(0,0,0,0.6); }
  .game-info-card { max-width: 92%; padding: 16px; }
  /* Make paddles and grids smaller in thumbnails */
  .pong-paddle { height: 30px; width: 6px; }
  .pong-ball { width: 12px; height: 12px; }

  /* Disable TAG GAME direct play on mobile: visually de-emphasize */
  .gcard[data-route="games/taggame.html"] { opacity: 0.7; border: 1px dashed rgba(255,255,255,0.06); }
}

@media (max-width: 420px) {
  .gcard { flex: 0 0 140px; }
  .gcard-thumb { height: 88px; }
  .featured-title { font-size: 1.2rem; }
  .search-container { display: none; }
}
