@import url("https://fonts.googleapis.com/css2?family=DotGothic16&display=swap");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DotGothic16", sans-serif;
  color: #2b1b2f;
  background: #2b1b2f;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
}

.search-page {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 14px 36px;
  background:
    linear-gradient(180deg, #72e6ff 0%, #ffe27a 46%, #ffb86a 100%);
}

.search-hero {
  text-align: center;
}

.search-title {
  margin: 4px 0 12px;
  font-size: 1.45rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.55);
}

.search-lead {
  margin: 0 0 20px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.genre-section {
  padding: 14px;
  background: rgba(255, 253, 242, 0.9);
  border: 4px solid #2b1b2f;
  box-shadow: 5px 5px 0 rgba(43, 27, 47, 0.28);
}

.genre-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.genre-btn,
.show-all-btn {
  min-height: 48px;
  padding: 8px 5px;
  color: #2b1b2f;
  font-size: 0.76rem;
  cursor: pointer;
  background: #ffe27a;
  border: 3px solid #2b1b2f;
  box-shadow: 3px 3px 0 #ff4b8b;
}

.genre-btn:active,
.genre-btn.active,
.show-all-btn:active,
.show-all-btn.active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.genre-btn.active,
.show-all-btn.active {
  color: #fff;
  background: #ff4b8b;
}

.show-all-btn {
  width: 100%;
  margin-top: 12px;
  background: #82ffcf;
}

.result-section {
  margin-top: 24px;
  padding: 14px;
  background: rgba(255, 253, 242, 0.94);
  border: 4px solid #2b1b2f;
  box-shadow: 5px 5px 0 rgba(43, 27, 47, 0.28);
}

.result-section.hidden {
  display: none;
}

.result-title {
  margin: 0 0 14px;
  font-size: 0.94rem;
  line-height: 1.5;
  text-align: center;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  display: block;
  overflow: hidden;
  background: #fffdf2;
  border: 4px solid #2b1b2f;
  box-shadow: 3px 3px 0 rgba(43, 27, 47, 0.28);
}

.result-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  image-rendering: pixelated;
}

.empty-result {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 10px;
  font-size: 0.82rem;
  line-height: 1.7;
  text-align: center;
  background: #fff7d6;
  border: 3px dashed #2b1b2f;
}

.search-footer {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 26px 12px 38px;
  text-align: center;
  background: #2b1b2f;
}

.search-footer a {
  color: #fff;
  font-size: 0.78rem;
}

@media (min-width: 430px) {
  .genre-btn,
  .show-all-btn {
    font-size: 0.82rem;
  }
}
