/* assets/styles.css */
/* Base */

:root {
  --bg: #02091c;
  --bg-elevated: #020a23;
  --bg-elevated-soft: #020617;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --border-strong: rgba(148, 163, 184, 0.4);
  --fg: #f9fafb;
  --fg-soft: #a5b4fc;
  --accent: #00ffe0;
  --accent-soft: rgba(0, 255, 224, 0.24);
  --accent-strong: rgba(0, 255, 224, 1);
  --danger: #fb7185;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.9);
  --glass: rgba(15, 23, 42, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter",
    "SF Pro Text", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 255, 224, 0.15), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.25), transparent 60%),
    radial-gradient(circle at bottom, #020617 0, #000 60%);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section-header {
  margin-bottom: 28px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.section-header p {
  margin: 0;
  color: var(--fg-soft);
  font-size: 0.95rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.96),
    rgba(2, 6, 23, 0.86),
    transparent
  );
  border-bottom: 1px solid rgba(30, 64, 175, 0.7);
}

.header-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 0 14px rgba(0, 255, 224, 0.9));
}

.logo-text {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.logo-dot {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--fg-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
}

/* Buttons */

.btn {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(15, 23, 42, 0.9);
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, var(--accent));
  color: #020617;
  border-color: transparent;
  box-shadow:
    0 14px 40px rgba(16, 185, 129, 0.7),
    0 0 30px rgba(0, 255, 224, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 60px rgba(16, 185, 129, 0.95),
    0 0 40px rgba(0, 255, 224, 0.7);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-soft);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--border-strong);
  color: var(--fg);
}

.btn-xs {
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
}

/* Cards */

.card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, #111827 0, #020617 55%, #020617 100%);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -120px -120px auto auto;
  background: radial-gradient(circle, rgba(0, 255, 224, 0.35), transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.section-download {
  padding-top: 40px;
}

.download-grid {
  display: flex;
  justify-content: center;
}

.download-code {
  width: 100%;
  max-width: 720px;
  padding: 14px 16px;
  background: radial-gradient(circle at 0 0, rgba(0, 255, 224, 0.12), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.18), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

.loader-card {
  border-color: rgba(0, 255, 224, 0.4);
}

.loader-card .code-block {
  animation: none;
  box-shadow: none;
}

.loader-card .code-block::after {
  content: none;
}

@keyframes loaderFloat {
  0% {
    transform: translateY(0);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9);
  }
  100% {
    transform: translateY(-6px);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 1);
  }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.chip {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4b5563;
}

.chip-live {
  background: var(--accent);
  box-shadow:
    0 0 0 4px rgba(0, 255, 224, 0.28),
    0 0 18px rgba(0, 255, 224, 0.9);
  animation: chipPulse 1.8s ease-in-out infinite;
}

@keyframes chipPulse {
  0% {
    box-shadow:
      0 0 0 2px rgba(0, 255, 224, 0.4),
      0 0 14px rgba(0, 255, 224, 0.9);
  }
  100% {
    box-shadow:
      0 0 0 7px rgba(0, 255, 224, 0),
      0 0 26px rgba(0, 255, 224, 1);
  }
}

.card-title {
  font-weight: 600;
}

.card-meta {
  margin-left: auto;
  color: var(--fg-soft);
}

.code-block {
  margin: 0;
  padding: 11px 13px;
  border-radius: 14px;
  background: linear-gradient(
    120deg,
    rgba(0, 255, 224, 0.16),
    #020617 30%,
    #020617 70%,
    rgba(37, 99, 235, 0.25)
  );
  background-size: 220% 220%;
  border: 1px solid rgba(30, 64, 175, 0.9);
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
  position: relative;
  animation: codeGlow 6s ease-in-out infinite alternate;
}

@keyframes codeGlow {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 0 20px rgba(0, 255, 224, 0.18);
  }
  100% {
    background-position: 100% 50%;
    box-shadow: 0 0 32px rgba(59, 130, 246, 0.25);
  }
}

.code-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  mix-blend-mode: screen;
  opacity: 0;
  animation: codeScan 5s linear infinite;
}

@keyframes codeScan {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  25% {
    opacity: 0.9;
  }
  50% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.code-block code {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  white-space: pre;
  color: #e5e7eb;
}

.loader-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 11px;
  font-size: 0.78rem;
}

.meta-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(37, 99, 235, 0.9);
  color: var(--fg-soft);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-pill-ok {
  color: var(--accent-strong);
}

.meta-pill-build {
  color: #e5e7eb;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4b5563;
}

.status-dot-live {
  background: var(--accent-strong);
  box-shadow: 0 0 16px rgba(0, 255, 224, 0.95);
}

/* Executors section */

.section-executors {
  padding-top: 28px;
}

.executor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.executor-card {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, #020617, #020617 55%);
  border: 1px solid rgba(55, 65, 81, 0.95);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  transform: translateY(0);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
  animation: executorFloat 7s ease-in-out infinite alternate;
  animation-delay: calc(var(--card-index, 0) * 120ms);
}

.executor-card::before {
  opacity: 0.2;
}

.executor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.95);
  border-color: rgba(0, 255, 224, 0.7);
}

.executor-card:hover::before {
  opacity: 0.55;
}

@keyframes executorFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-4px);
  }
}

/* Executor logo + text */

.executor-logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, #111827, #020617 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
  overflow: hidden;
}

.executor-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.02);
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.9));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.executor-card:hover .executor-logo-wrap img {
  transform: scale(1.06);
  filter: drop-shadow(0 0 22px rgba(0, 255, 224, 0.6));
}

/* Executor text */

.executor-body {
  position: relative;
  z-index: 1;
}

.executor-name {
  margin: 0 0 2px;
  font-size: 0.96rem;
}

.executor-tag {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: var(--fg-soft);
}

.executor-unc {
  margin: 0;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.executor-unc span {
  color: var(--accent-strong);
}

/* Footer */

.site-footer {
  margin-top: auto;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(30, 64, 175, 0.7);
  background: radial-gradient(circle at top, #020617 0, #020617 60%, #000 100%);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
}

.footer-note {
  opacity: 0.9;
}

/* Logout button in header */
.nav-logout {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: transparent;
  border: none;
  color: var(--fg-soft);
  cursor: pointer;
  padding-bottom: 2px;
}
.nav-logout:hover {
  color: var(--accent);
}

/* Admin trigger square */

.admin-trigger {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.7);
  background: radial-gradient(circle at 30% 20%, #020617, #020617 75%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}
.admin-trigger span {
  font-size: 9px;
  color: #e5e7eb;
}
.admin-trigger:hover {
  border-color: rgba(0,255,224,0.8);
  box-shadow:
    0 0 12px rgba(0,255,224,0.6),
    0 0 24px rgba(59,130,246,0.5);
}

/* Audio player bar in header */
.audio-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  margin-left: 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.audio-player-logo {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  object-fit: cover;
}

.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.audio-bars span {
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(to top, #e879f9, #22d3ee);
  transform-origin: bottom;
  animation: equalize 1s ease-in-out infinite;
  animation-play-state: paused; /* only animate when playing */
}

.audio-player.is-playing .audio-bars span {
  animation-play-state: running;
}

.audio-bars span:nth-child(2) { animation-delay: -0.2s; }
.audio-bars span:nth-child(3) { animation-delay: -0.4s; }
.audio-bars span:nth-child(4) { animation-delay: -0.6s; }

@keyframes equalize {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.audio-volume {
  width: 90px;
  cursor: pointer;
}

/* If you want it tighter on small screens */
@media (max-width: 640px) {
  .audio-player {
    margin-left: 8px;
    padding: 3px 8px;
  }

  .audio-volume {
    width: 70px;
  }
}

/* --- Audio control --- */

.audio-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
}

.audio-toggle {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transform-origin: center;
}

.audio-toggle.playing {
  animation: audioPulse 0.9s ease-in-out infinite;
}

@keyframes audioPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 5px rgba(0, 255, 224, 0.7);
  }
  50% {
    transform: translateY(-1px) scale(1.08);
    text-shadow: 0 0 10px rgba(0, 255, 224, 1);
  }
}

.volume-slider {
  width: 90px;
  accent-color: var(--accent);
}

/* --- Games section --- */

.section-games {
  padding-top: 10px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  overflow: hidden;
}

.game-media {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0 0 10px;
  background: #020617;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
}

.game-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.game-card:hover .game-media img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.game-status {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(0, 255, 224, 0.7);
  box-shadow: 0 0 10px rgba(0, 255, 224, 0.7);
}

.game-status::before {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--accent);
}

.game-status--soon {
  animation: gameStatusPulse 1.4s ease-in-out infinite;
}

@keyframes gameStatusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.16);
    opacity: 1;
  }
}

.game-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-name {
  font-size: 1rem;
  font-weight: 600;
}

.game-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-pill--wip {
  border-color: rgba(251, 191, 36, 0.8);
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
}

.game-description {
  font-size: 0.8rem;
  color: var(--fg-soft);
}

.game-features-link {
  align-self: flex-start;
  border: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--accent);
  background: rgba(0, 255, 224, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.game-features-link:hover {
  background: rgba(0, 255, 224, 0.16);
  transform: translateY(-1px);
}

/* --- Overlay / modal --- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.overlay--visible {
  display: flex;
}

.overlay-inner {
  position: relative;
  max-width: 420px;
  width: 92%;
  background: radial-gradient(circle at top, #020617, #020617);
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.8),
    0 0 40px rgba(0, 255, 224, 0.28);
  padding: 18px 20px 16px;
}

.overlay-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--fg-soft);
  font-size: 18px;
  cursor: pointer;
}

.overlay-content {
  margin-top: 6px;
}

.overlay-title {
  font-size: 1rem;
  margin-bottom: 8px;
}

.overlay-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.overlay-list li {
  font-size: 0.86rem;
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.overlay-list li::before {
  content: "•";
  color: var(--accent);
  font-size: 1rem;
}

.overlay-note {
  font-size: 0.86rem;
  color: var(--fg-soft);
}

.overlay-video-placeholder {
  margin-top: 4px;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  font-size: 0.86rem;
  text-align: center;
  color: var(--fg-soft);
}

.tag-small {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* Responsive */

@media (max-width: 800px) {
  .section-download {
    padding-top: 28px;
  }

  .download-code {
    max-width: 100%;
  }
}
