:root {
  --bg: #0b0b0b;
  --card: #0f0f0f;
  --accent: #d32f2f;
  --muted: #9b9b9b;
  --glass: rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box;
}

/* 스크롤바 숨기기 (Chrome, Safari, Edge) */
body::-webkit-scrollbar {
  display: none;
}

/* 스크롤바 숨기기 (Firefox) */
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 320px ~ 374px (초소형 ~ 아이폰 SE 크기) */
@media (max-width: 374px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .searchwrap {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .searchwrap input {
    flex: 1;
    min-width: 0;
  }
  .brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .brand h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.1rem;
  }
  .hero h2 {
    font-size: 1.4rem; /* 1.5rem -> 1.4rem */
    margin: 0 0 6px;
  }
  .hero p {
    font-size: 0.8rem; /* 0.9rem -> 0.8rem */
    margin: 0 0 12px;
  }
  .hero {
    padding: 10px;
  }
}

/* 375px ~ 424px (일반 스마트폰 크기) */
@media (min-width: 375px) and (max-width: 424px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .searchwrap {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .searchwrap input {
    flex: 1;
    min-width: 0;
  }
  .brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .brand h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.2rem;
  }
  .hero h2 {
    font-size: 1.5rem; /* 1.6rem -> 1.5rem */
    margin: 0 0 6px;
  }
  .hero p {
    font-size: 0.85rem; /* 0.95rem -> 0.85rem */
    margin: 0 0 12px;
  }
  .hero {
    padding: 12px;
  }
}

/* 425px ~ 479px (중형 스마트폰 크기) */
@media (min-width: 425px) and (max-width: 479px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .searchwrap {
    width: 100%;
    display: flex;
    gap: 10px;
  }
  .searchwrap input {
    flex: 1;
    min-width: 0;
  }
  .brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .brand h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.3rem;
  }
  .hero h2 {
    font-size: 1.6rem; /* 1.7rem -> 1.6rem */
    margin: 0 0 6px;
  }
  .hero p {
    font-size: 0.9rem; /* 1rem -> 0.9rem */
    margin: 0 0 12px;
  }
  .hero {
    padding: 14px;
  }
}

/* 480px 이하 (기존 적용용) */
@media (max-width: 480px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .searchwrap {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .searchwrap input {
    flex: 1;
    min-width: 0;
  }
  .brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .brand h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--bg), #050505);
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  gap: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.6px;
}

.pokeball {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent) 0 180deg, #fff 180deg 360deg);
  box-shadow: 0 6px 18px rgba(211, 47, 47, 0.14), inset 0 -6px 12px rgba(0, 0, 0, 0.5);
  position: relative;
  flex: 0 0 35px;
  border: 3px solid #000;
  transform: rotate(-90deg);
}

.pokeball::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #333;
}

.searchwrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.searchwrap input {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  min-width: 220px;
}

.searchwrap button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
}

.container {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.hero h2 {
  font-size: 36px;
  margin: 0 0 8px;
}

.hero p {
  color: var(--muted);
  margin: 0 0 12px; /* 18px -> 12px로 축소 */
}

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

.btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent), #ff6b6b);
  box-shadow: 0 8px 30px rgba(211, 47, 47, 0.12);
  color: #fff;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(211, 47, 47, 0.2);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.monster-silhouette {
  width: 260px;
  height: 160px;
  background: linear-gradient(180deg, rgba(211, 47, 47, 0.12), transparent);
  border-radius: 16px;
  filter: blur(6px);
  opacity: 0.9;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
  transition: transform .22s ease;
}

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

.card .thumb {
  height: 140px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(255, 0, 0, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.12);
}

.card h3 {
  margin: 12px 0 6px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.card .tags {
  font-size: 12px;
  color: var(--muted);
}

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

.card .download {
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, var(--accent), #ff6b6b);
  color: #111;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(211, 47, 47, 0.12);
  transition: transform .18s ease, box-shadow .18s ease;
}

.card .download:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.08);
}

.card .detail {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.card .detail:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer {
  max-width: 1100px;
  margin: 28px auto;
  padding: 12px 20px;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7));
  backdrop-filter: blur(6px);
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-card {
  background: linear-gradient(180deg, var(--card), #0b0b0b);
  padding: 18px;
  border-radius: 14px;
  width: min(720px, 94%);
  position: relative;
}

.modal .close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
}

/* 토스트 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(211, 47, 47, 0.95);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .monster-silhouette {
    display: none;
  }
  .hero h2 {
    font-size: 1.7rem; /* 1.8rem -> 1.7rem */
    margin: 0 0 8px;
  }
  .hero p {
    font-size: 0.9rem; /* 1rem -> 0.9rem */
    margin: 0 0 12px;
  }
  .hero-actions {
    margin-top: 8px;
  }
}

/* 파티클(데코) */
.particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.08;
  mix-blend-mode: screen;
  transition: opacity 0.5s ease;
}

.particle.small {
  width: 8px;
  height: 8px;
}

.particle.med {
  width: 16px;
  height: 16px;
}

.particle.big {
  width: 28px;
  height: 28px;
}

.thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.discord-link {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 6px;
  color: #7289da;
  transition: color 0.3s ease;
}

.discord-link:hover,
.discord-link:focus {
  color: #99aaff;
  outline: none;
}

.discord-link svg {
  height: 18px;
  width: 18px;
  fill: currentColor;
  vertical-align: middle;
}
