:root {
  color-scheme: only light;
  --bg: #0a0b1f;
  --bg-deep: #030411;
  --neon: #ffcc33;
  --accent: #32f5ff;
  --hot: #ff4dd6;
  --panel: #151a39;
  --panel-light: #1f2552;
  --text: #f6f2ff;
  --muted: #a0a6d4;
  --glow: 0 0 12px rgba(50, 245, 255, 0.4);
}

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

body {
  font-family: "Press Start 2P", sans-serif;
  background: radial-gradient(circle at top, #1d214b 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 3px
  );
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 1;
  animation: flicker 6s infinite;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 15%, rgba(255, 204, 51, 0.12), transparent 40%),
    radial-gradient(circle at 75% 30%, rgba(255, 77, 214, 0.15), transparent 42%),
    radial-gradient(circle at 45% 80%, rgba(50, 245, 255, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.cabinet {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  color: var(--neon);
  text-shadow: var(--glow);
  margin-bottom: 18px;
}


.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  background: var(--panel);
  padding: 18px 20px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.stats {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--accent);
  font-size: 0.8rem;
}

.stats span:first-child {
  font-size: 1.3rem;
  color: var(--neon);
}

.search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.65rem;
  color: var(--muted);
}

.search input {
  background: var(--panel-light);
  border: 2px solid rgba(50, 245, 255, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.7rem;
  min-width: 220px;
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: linear-gradient(135deg, rgba(21, 26, 57, 0.98), rgba(34, 41, 86, 0.98));
  border-radius: 18px;
  padding: 22px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  pointer-events: none;
}

.card h2 {
  font-size: 0.9rem;
  color: var(--neon);
}

.card p {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.6;
}

.card .actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.card a {
  text-decoration: none;
  color: var(--bg-deep);
  background: var(--neon);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.65rem;
  box-shadow: 0 0 12px rgba(255, 204, 51, 0.5);
}

.card .tag {
  color: var(--accent);
  font-size: 0.6rem;
}


@keyframes flicker {
  0%,
  100% {
    opacity: 0.92;
  }
  50% {
    opacity: 0.8;
  }
}

@media (max-width: 720px) {
  .cabinet {
    padding: 48px 18px 70px;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .search input {
    width: 100%;
  }
}
