:root {
  --bg: #1a1a1a;
  --card: transparent;
  --divider: #3a3a3a;
  --primary: #00c0e8;
  --primary-shadow: #4d4d4d;
  --secondary: #9aa0a8;
  --text: #ffffff;
  --on-primary: #000000;
  --hot: #ff00ff;
  --thumb-gap: 8px;
  --folder-fill: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

.app {
  width: min(1120px, 100vw);
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.search-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--divider);
  background: #0f0f0f;
  padding: 0 12px;
}

.search-icon {
  color: var(--secondary);
  font-size: 16px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
}

.search-box input::placeholder {
  color: var(--secondary);
}

#searchBtn {
  border: 0;
  min-width: 84px;
  min-height: 48px;
  padding: 0 16px;
  cursor: pointer;
  background: var(--primary);
  color: var(--on-primary);
  font-family: "Pixelify Sans", "Press Start 2P", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 0 var(--primary-shadow);
}

.meta {
  margin: 14px 0 8px;
  min-height: 20px;
}

.meta p {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 16px;
  align-items: start;
}

.card {
  background: var(--card);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  min-height: 232px;
  border: 0;
}

.card-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease;
}

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

.card-link:hover .play-btn {
  filter: brightness(1.05);
}

.title {
  margin: 0;
  padding: 8px 8px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.sub {
  display: none;
}

.thumb-wrap {
  position: relative;
  margin: 12px 8px 0;
  aspect-ratio: 140 / 122;
  width: calc(100% - 16px);
}

.thumb-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: polygon(
    0% 14%,
    0% 4%,
    4% 0%,
    34% 0%,
    42% 14%,
    96% 14%,
    100% 18%,
    100% 96%,
    96% 100%,
    4% 100%,
    0% 96%
  );
  z-index: 0;
}

.thumb-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

.thumb {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
  background: var(--folder-fill);
  clip-path: polygon(
    0% 14%,
    0% 4%,
    4% 0%,
    34% 0%,
    42% 14%,
    96% 14%,
    100% 18%,
    100% 96%,
    96% 100%,
    4% 100%,
    0% 96%
  );
  z-index: 1;
}

.play-btn {
  margin: 14px auto 0;
  width: 99px;
  min-height: 32px;
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: var(--on-primary);
  font-family: "Pixelify Sans", "Press Start 2P", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 6px 8px;
  box-shadow: 3px 3px 0 0 var(--primary-shadow);
  pointer-events: none;
}

.play-btn img {
  display: block;
  flex-shrink: 0;
}

.play-btn .icon-caret {
  width: 20px;
  height: 20px;
}

.play-btn .icon-down {
  width: 16px;
  height: 16px;
}

.download {
  margin-top: auto;
  min-height: 32px;
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: var(--on-primary);
  font-family: "Pixelify Sans", "Press Start 2P", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  box-shadow: 3px 3px 0 0 var(--primary-shadow);
}

.download:active,
#searchBtn:active,
.play-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--primary-shadow);
}

.hot {
  display: none;
}

.pagination {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn,
.ellipsis {
  min-width: 30px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  background: #121212;
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.page-btn {
  cursor: pointer;
}

.page-btn.active {
  background: var(--primary);
  color: var(--on-primary);
}

.ellipsis {
  border: 0;
  min-width: auto;
  background: transparent;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--secondary);
  padding: 24px 8px;
  border: 1px dashed var(--divider);
}

.detail-view {
  padding-top: 8px;
}

.back-link {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin: 8px 0 18px;
}

.back-link:hover {
  color: var(--primary);
}

.detail-card {
  border: 1px solid var(--divider);
  background: #121212;
  padding: clamp(16px, 4vw, 34px);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(190px, 290px) 1fr;
  gap: clamp(22px, 5vw, 48px);
  align-items: start;
}

.detail-thumb-wrap {
  position: relative;
  width: 100%;
  max-width: 290px;
  aspect-ratio: 140 / 122;
}

.detail-thumb-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: polygon(
    0% 14%,
    0% 4%,
    4% 0%,
    34% 0%,
    42% 14%,
    96% 14%,
    100% 18%,
    100% 96%,
    96% 100%,
    4% 100%,
    0% 96%
  );
  z-index: 0;
}

.detail-thumb-wrap .thumb-frame {
  display: none;
}

.detail-thumb {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
  background: var(--folder-fill);
  clip-path: polygon(
    0% 14%,
    0% 4%,
    4% 0%,
    34% 0%,
    42% 14%,
    96% 14%,
    100% 18%,
    100% 96%,
    96% 100%,
    4% 100%,
    0% 96%
  );
  z-index: 1;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  margin: 4px 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-intro h1 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 14px;
}

.rating {
  color: var(--secondary);
  font-size: 14px;
  margin-bottom: 18px;
}

.rating span {
  color: #ffd43b;
  letter-spacing: 2px;
}

.rating b {
  color: var(--text);
  margin-left: 6px;
}

.rating small {
  font-size: 12px;
}

.detail-copy {
  color: #d0d4db;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  max-width: 680px;
  margin: 0 0 24px;
}

.detail-download {
  width: min(220px, 100%);
  min-height: 40px;
}

.download-note {
  color: var(--secondary);
  font-size: 12px;
  margin: 12px 0 0;
}

.about-panel {
  border: 1px solid var(--divider);
  padding: 20px;
  margin-top: 22px;
}

.about-panel h2 {
  font-size: 16px;
  margin: 0 0 14px;
}

.about-panel p,
.compatibility {
  color: #c8cdd5;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.quick-stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.quick-stats span {
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.7;
}

.quick-stats b {
  display: block;
  color: var(--primary);
  font-size: 14px;
}

.mini-heading {
  color: var(--text);
  font-size: 13px;
  margin: 20px 0 8px;
}

.compatibility {
  font-size: 13px;
  line-height: 1.55;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.info-panel,
.reviews {
  border: 1px solid var(--divider);
  padding: 20px;
}

.info-panel h2,
.reviews h2 {
  font-size: 16px;
  margin: 0 0 18px;
  color: var(--text);
}

dl {
  margin: 0;
}

.info-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #2b3037;
  font-size: 13px;
}

.info-panel dt {
  color: var(--secondary);
}

.info-panel dd {
  margin: 0;
  text-align: right;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: #d0d4db;
}

.feature-list li {
  border-bottom: 1px solid #2b3037;
}

.feature-list li::first-letter {
  color: var(--primary);
}

.fine-print {
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.6;
  margin: 18px 0 0;
}

.reviews {
  margin-top: 16px;
}

.reviews-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.reviews-heading h2 {
  margin: 0;
}

.reviews-heading span {
  color: var(--secondary);
  font-size: 12px;
}

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

.review-grid blockquote {
  margin: 0;
  padding: 14px;
  background: #0f0f0f;
  color: #cdd2da;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

.review-grid cite {
  display: block;
  color: var(--primary);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  margin-top: 14px;
}

.review-grid cite small {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 500;
}

@media (max-width: 420px) {
  .app {
    padding-inline: 10px;
  }

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

  #searchBtn {
    min-width: 74px;
    padding-inline: 12px;
  }

  .title {
    font-size: 14px;
  }
}

@media (max-width: 700px) {
  .detail-hero,
  .detail-columns,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .detail-thumb-wrap {
    max-width: 280px;
  }

  .detail-copy {
    font-size: 14px;
  }
}
