@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap");

:root {
  --bg: #07090d;
  --panel: #0e1218;
  --panel2: #151a22;
  --text: #f3f5f7;
  --muted: #929aa7;
  --line: rgba(255,255,255,.1);
  --accent: #ffffff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans JP", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  padding: 0 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(7,9,13,.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .18em;
}

.logo span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .3em;
}

.site-header nav {
  display: flex;
  gap: 28px;
  color: #b8bec8;
  font-size: 13px;
}

.hero {
  min-height: 720px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), 90%);
  margin: 0 auto;
  padding-top: 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #7e8794;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
}

h1 {
  margin: 0;
  font-size: clamp(70px, 12vw, 150px);
  line-height: .82;
  letter-spacing: -.06em;
  font-weight: 900;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 1px #69717d;
}

.hero-text {
  margin: 38px 0 28px;
  color: #adb4bf;
  line-height: 1.9;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border: 1px solid var(--line);
  padding: 13px 21px;
  cursor: pointer;
  transition: .2s;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  background: #fff;
  color: #080a0d;
}

.secondary {
  background: rgba(255,255,255,.04);
  color: white;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to right, transparent, black 55%, black);
}

.puzzle-section,
.about-section {
  width: min(var(--max), 90%);
  margin: auto;
}

.puzzle-section {
  padding: 100px 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 35px;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -.04em;
}

#resultCount {
  color: var(--muted);
  font-size: 13px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 12px;
  margin-bottom: 35px;
}

#searchInput,
#difficultyFilter {
  border: 1px solid var(--line);
  background: var(--panel);
  color: white;
  padding: 14px 16px;
  outline: none;
}

#searchInput:focus,
#difficultyFilter:focus {
  border-color: rgba(255,255,255,.4);
}

.tag-filters {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-filter {
  border: 1px solid var(--line);
  background: transparent;
  color: #aeb5bf;
  padding: 8px 13px;
  cursor: pointer;
}

.tag-filter.active,
.tag-filter:hover {
  background: white;
  color: #080a0d;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.puzzle-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .25s, border-color .25s;
}

.puzzle-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,.25);
}

.card-image {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #171c23;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #707987;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.card-image img + .image-placeholder {
  display: none;
}

.open-mark {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 22px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tags span {
  padding: 4px 8px;
  background: #1a2028;
  color: #9ca5b1;
  font-size: 10px;
}

.card-body h3 {
  margin: 18px 0 8px;
  font-size: 25px;
}

.description {
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.meta {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  color: #c8ced6;
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.play-button,
.vrchat-button {
  flex: 1;
  text-align: center;
  padding: 11px;
  border: 1px solid var(--line);
  font-size: 12px;
}

.play-button {
  background: white;
  color: #080a0d;
}

.vrchat-button:hover {
  background: rgba(255,255,255,.08);
}

.empty {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}

.hidden {
  display: none;
}

.about-section {
  padding: 100px 0 140px;
  border-top: 1px solid var(--line);
}

.about-section p:not(.eyebrow) {
  color: #aab2bd;
  line-height: 2;
}

.x-link {
  display: inline-block;
  margin-top: 20px;
  border-bottom: 1px solid #fff;
  padding-bottom: 5px;
}

footer {
  padding: 25px 5vw;
  border-top: 1px solid var(--line);
  color: #69717d;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 850px) {
  .puzzle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .site-header {
    height: 62px;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    min-height: 650px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .puzzle-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
}
