:root {
  --bg: #091622;
  --bg-soft: #10273b;
  --panel: rgba(12, 26, 41, 0.72);
  --panel-border: rgba(153, 207, 255, 0.24);
  --text: #ebf6ff;
  --muted: #98b7cf;
  --accent: #36d2c2;
  --accent-2: #ff9f43;
  --danger: #f87070;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, #21415b 0%, rgba(33, 65, 91, 0) 35%),
    radial-gradient(circle at 92% 12%, #3f2e4f 0%, rgba(63, 46, 79, 0) 28%),
    linear-gradient(150deg, var(--bg) 0%, #071019 70%);
  font-family: "Avenir Next", "Trebuchet MS", "Gill Sans", sans-serif;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  width: min(44vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-a {
  top: -100px;
  left: -120px;
  background: #25d0c7;
  animation: floatA 12s ease-in-out infinite;
}

.bg-glow-b {
  bottom: -120px;
  right: -120px;
  background: #ff8747;
  animation: floatB 14s ease-in-out infinite;
}

.hub {
  position: relative;
  z-index: 1;
  width: min(1080px, 100% - 28px);
  margin: 18px auto 24px;
}

.hero {
  padding: clamp(20px, 4vw, 34px);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(8, 20, 34, 0.88), rgba(14, 34, 52, 0.72));
  border: 1px solid rgba(146, 204, 255, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  animation: riseIn 620ms ease;
}

.kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
}

h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1;
}

.subtitle {
  margin: 0;
  max-width: 700px;
  color: #d8edff;
  font-size: clamp(0.98rem, 2.2vw, 1.15rem);
}

.toolbar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.search-box {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
  flex: 1;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(189, 227, 255, 0.25);
  border-radius: 14px;
  background: rgba(8, 19, 29, 0.8);
  color: var(--text);
  padding: 12px 14px;
  font-size: 0.98rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(54, 210, 194, 0.18);
}

.meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 24px;
}

.grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
}

.card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 10px;
  min-height: 260px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(165deg, rgba(10, 24, 38, 0.88), rgba(14, 31, 48, 0.76));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transform: translateY(10px) scale(0.985);
  opacity: 0;
}

.card.visible {
  animation: cardIn 460ms ease forwards;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.game-pill,
.game-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
}

.game-pill {
  background: rgba(54, 210, 194, 0.15);
  color: #8af7ed;
}

.game-badge {
  background: rgba(255, 159, 67, 0.18);
  color: #ffd3a0;
}

.game-name {
  margin: 0;
  font-size: 1.35rem;
}

.game-desc {
  margin: 0;
  color: #d3e6f7;
  line-height: 1.45;
}

.game-path {
  margin: 2px 0 0;
  color: #8eb4cf;
  font-size: 0.78rem;
  word-break: break-word;
  font-family: "Menlo", "Consolas", monospace;
}

.card-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 11px;
  min-height: 42px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
  transition: transform 120ms ease, filter 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-primary {
  color: #08202d;
  background: linear-gradient(110deg, var(--accent), #7bf5cf);
  text-decoration: none;
}

.btn-secondary {
  color: #eef8ff;
  border-color: rgba(188, 223, 251, 0.35);
  background: rgba(20, 42, 60, 0.7);
}

.btn-ghost {
  color: #e8f4fe;
  border-color: rgba(198, 225, 246, 0.24);
  background: rgba(10, 26, 42, 0.68);
}

.notes {
  margin-top: 16px;
  border: 1px solid rgba(153, 207, 255, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(11, 24, 38, 0.66);
  color: #d6e8f8;
}

.notes h2 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notes p {
  margin: 0;
  line-height: 1.45;
}

.notes code {
  color: #9af6eb;
}

.empty {
  padding: 14px;
  border: 1px dashed rgba(175, 214, 244, 0.32);
  border-radius: 12px;
  color: var(--muted);
}

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

@keyframes cardIn {
  from {
    transform: translateY(10px) scale(0.985);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(28px, 18px);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-24px, -16px);
  }
}

@media (max-width: 620px) {
  .hub {
    width: min(100% - 18px, 1080px);
    margin-top: 10px;
  }

  .hero {
    padding: 16px;
    border-radius: 16px;
  }

  .card {
    min-height: 240px;
  }
}
