:root {
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --surface: rgba(255,255,255,0.92);
  --surface-dark: rgba(18,18,18,0.88);
  --text: #f7f7f7;
  --text-dark: #111;
  --muted: #bdbdbd;
  --muted-dark: #555;
  --line: rgba(255,255,255,0.18);
  --line-dark: rgba(0,0,0,0.12);
  --accent: #ffffff;
  --shadow: 0 24px 70px rgba(0,0,0,0.42);
  --radius: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.12), transparent 34rem),
    linear-gradient(135deg, #000 0%, #101010 50%, #f5f5f5 220%);
  overflow-x: hidden;
}

body::before {
  content: "🐈‍⬛  🐾  🐈  🖤  🐾  🐈‍⬛";
  position: fixed;
  inset: auto -10vw 8vh auto;
  width: 120vw;
  font-size: clamp(2rem, 7vw, 7rem);
  letter-spacing: 1.1rem;
  opacity: 0.055;
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; }

#cat-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 20px;
  text-align: center;
}

.header.compact { padding-bottom: 8px; }

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.cat-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #000;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.nav-link {
  text-decoration: none;
  color: #e8e8e8;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255,255,255,0.06);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.nav-link:hover,
.nav-link.active {
  transform: translateY(-2px);
  background: #fff;
  color: #000;
}

.hero-card,
.info-panel,
.link-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(230,230,230,0.9));
  color: var(--text-dark);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(32px, 5vw, 72px);
}

.home-hero { min-height: 420px; }

.hero-card::after,
.info-panel::after,
.link-box::after {
  content: "CAT MODE";
  position: absolute;
  right: -20px;
  bottom: -12px;
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 10rem);
  letter-spacing: -0.08em;
  color: rgba(0,0,0,0.045);
  pointer-events: none;
}

.cat-head {
  margin: 0 auto 14px;
  position: relative;
  width: 102px;
  height: 92px;
}

.cat-head .face {
  position: absolute;
  inset: 18px 0 0;
  display: grid;
  place-items: center;
  background: #050505;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 38px 38px 44px 44px;
  font-size: 44px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

.ear {
  position: absolute;
  top: 0;
  width: 38px;
  height: 38px;
  background: #050505;
  border: 3px solid #fff;
  transform: rotate(45deg);
  z-index: 0;
}

.ear.left { left: 12px; }
.ear.right { right: 12px; }

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  color: #333;
}

.brand {
  margin: 0;
  font-size: clamp(3rem, 10vw, 7.2rem);
  line-height: .9;
  letter-spacing: -0.085em;
  font-weight: 900;
}

.sub {
  max-width: 760px;
  margin: 18px auto 0;
  color: #2d2d2d;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.65;
}

.controls,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0,0,0,0.18);
}

.btn.primary {
  background: #000;
  color: #fff;
  border-color: #000;
}

.sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.section-card {
  display: block;
  min-height: 172px;
  padding: 24px;
  border-radius: 22px;
  text-decoration: none;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    #0a0a0a;
  border: 1px solid var(--line);
  box-shadow: 0 18px 38px rgba(0,0,0,0.28);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.section-card:hover {
  transform: translateY(-7px);
  border-color: #fff;
  background: #141414;
}

.section-card .emoji {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.section-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.section-card p {
  margin: 8px 0 0;
  color: #cfcfcf;
}

.container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 10px;
}

.info-panel,
.link-box {
  padding: clamp(26px, 4vw, 42px);
  text-align: center;
}

.info-panel h2,
.link-box h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.06em;
}

.info-panel p:not(.eyebrow),
.link-box p {
  color: #333;
  line-height: 1.7;
}

.toolbar {
  justify-content: space-between;
  background: rgba(0,0,0,0.06);
  padding: 12px;
  border-radius: 18px;
}

.search-wrap {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 8px 14px;
  color: #111;
  font-weight: 800;
}

.search-wrap input {
  border: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
  font: inherit;
  font-weight: 600;
  background: transparent;
  color: #111;
}

.game-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.platform {
  background: rgba(255,255,255,0.94);
  color: #111;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 16px 42px rgba(0,0,0,0.26);
  transition: transform .2s ease, box-shadow .2s ease;
}

.platform:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 56px rgba(0,0,0,0.34);
}

.game-link {
  display: block;
  text-decoration: none;
}

.game-card {
  position: relative;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 20px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 15%, rgba(255,255,255,0.18), transparent 9rem),
    linear-gradient(145deg, #060606, #151515);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
}

.game-card::before {
  content: "🐾";
  position: absolute;
  right: 18px;
  top: 28px;
  font-size: 4rem;
  opacity: .08;
}

.cat-ears span {
  position: absolute;
  top: -10px;
  width: 38px;
  height: 38px;
  background: #fff;
  transform: rotate(45deg);
  opacity: .95;
}

.cat-ears span:first-child { left: 24px; }
.cat-ears span:last-child { left: 68px; }

.file-type {
  margin: 0 0 8px;
  color: #bfbfbf;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-weight: 800;
}

.game-title {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.download-note {
  margin: 8px 0 0;
  color: #dadada;
  font-weight: 600;
}

.game-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: #444;
  font-size: .92rem;
}

.game-status a {
  color: #000;
  font-weight: 900;
  text-decoration: none;
  border-bottom: 2px solid #000;
}

.status-circle {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(255,255,255,0.08), 0 0 18px currentColor;
}

.green { color: #7df7a5; }
.red { color: #ff6f6f; }
.blue { color: #89c7ff; }
.white { color: #fff; }
.yellow { color: #fff08a; }
.pink { color: #e6e6e6; }

.link-box {
  max-width: 520px;
  margin: 24px auto 0;
}

.link-code {
  margin: 22px auto;
  padding: 18px;
  border-radius: 18px;
  background: #000;
  color: #fff;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 900;
  letter-spacing: .08em;
}

.muted-text { color: #555 !important; }

.footer {
  padding: 28px 18px 34px;
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
}

.sound-btn,
.version-badge {
  position: fixed;
  z-index: 50;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.72);
  color: #fff;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
}

.sound-btn {
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
}

.version-badge {
  top: 16px;
  right: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 900;
}

.confirm-popup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,0.72);
  z-index: 100;
  transition: opacity .2s ease;
}

.confirm-popup.hidden {
  opacity: 0;
  pointer-events: none;
}

.confirm-box {
  width: min(420px, 100%);
  background: #fff;
  color: #111;
  border-radius: 22px;
  padding: 26px;
  text-align: center;
  box-shadow: 0 28px 90px rgba(0,0,0,0.55);
  animation: pop .2s ease;
}

.confirm-box h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.confirm-box p {
  color: #444;
  margin: 0;
}

.confirm-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.confirm-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 900;
  cursor: pointer;
}

#confirm-yes {
  background: #000;
  color: #fff;
}

#confirm-no {
  background: #efefef;
  color: #111;
}

@keyframes pop {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 760px) {
  .sections { grid-template-columns: 1fr; }
  .toolbar { justify-content: center; }
  .search-wrap { flex-basis: 100%; }
  .game-status { align-items: flex-start; flex-direction: column; }
  .brand { letter-spacing: -0.07em; }
}
