
:root {
  color-scheme: dark;
  --bg: #0c0e12;
  --panel: #13161c;
  --panel-2: #191d24;
  --line: #272c35;
  --text: #f5f7fb;
  --muted: #9da6b5;
  --accent: #ffffff;
  --shadow: 0 12px 32px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,.05), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui, sans-serif;
}

body { min-height: 100vh; }

button, input { font: inherit; }

button { color: inherit; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 72px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.count-card {
  min-width: 148px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(19,22,28,.78);
  box-shadow: var(--shadow);
  text-align: right;
  backdrop-filter: blur(12px);
}

.count-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.count-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 17, 22, .88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-2);
}

.search-icon {
  color: var(--muted);
  font-size: 22px;
  transform: translateY(-1px);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search-wrap input::placeholder { color: #747d8b; }

.tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: thin;
}

.tag-button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: .16s ease;
}

.tag-button:hover {
  color: var(--text);
  border-color: #3b424e;
  transform: translateY(-1px);
}

.tag-button.active {
  background: var(--text);
  color: #0e1014;
  border-color: var(--text);
  font-weight: 800;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 4px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.text-button:hover { color: var(--text); }

.emote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 12px;
}

.emote-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #161920, #11141a);
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.emote-card:hover {
  transform: translateY(-3px);
  border-color: #3b424e;
  background: linear-gradient(180deg, #1a1e26, #13161c);
}

.emote-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 16px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25% 75%, rgba(255,255,255,.018) 75%),
    linear-gradient(45deg, rgba(255,255,255,.018) 25%, transparent 25% 75%, rgba(255,255,255,.018) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
}

.emote-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.emote-info {
  padding: 12px 13px 13px;
  border-top: 1px solid var(--line);
}

.command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.copy-hint {
  color: #727b88;
  font-size: 11px;
  font-weight: 600;
}

.tag-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

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

.empty-state h2 {
  margin: 10px 0 4px;
  color: var(--text);
  font-size: 20px;
}

.empty-state p { margin: 0; }

.empty-icon { font-size: 34px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  padding: 11px 15px;
  border: 1px solid #3a414c;
  border-radius: 12px;
  background: rgba(20,23,29,.96);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 28px;
  }

  .hero {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .count-card {
    width: 100%;
    text-align: left;
  }

  .toolbar { top: 8px; }

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

  .emote-media { padding: 12px; }

  .copy-hint { display: none; }
}


/* Hero guide & channel links */
.subtitle code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
}

.subtitle.secondary {
  margin-top: 7px;
  font-size: 13px;
}

.channel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.channel-link:hover {
  transform: translateY(-2px);
  border-color: #424a57;
}

.channel-link.youtube { background: rgba(255, 0, 0, .10); }
.channel-link.youtube:hover { background: rgba(255, 0, 0, .16); }
.channel-link.chzzk { background: rgba(0, 255, 163, .08); }
.channel-link.chzzk:hover { background: rgba(0, 255, 163, .14); }

.channel-icon {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
}

.youtube .channel-icon {
  background: #ff0033;
  color: #fff;
}

.chzzk .channel-icon {
  background: #00ffa3;
  color: #07130f;
  font-weight: 900;
}

.suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 0 0 18px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(19, 22, 28, .64);
}

.suggestion-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.suggestion-card strong {
  display: block;
  margin: 1px 0 4px;
  font-size: 13px;
}

.suggestion-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .channel-links { width: 100%; }
  .channel-link {
    flex: 1 1 0;
    justify-content: center;
  }
  .suggestion-card { padding: 14px; }
}


.channel-link.discord {
  background: rgba(88, 101, 242, .12);
}

.channel-link.discord:hover {
  background: rgba(88, 101, 242, .20);
}

.channel-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 5px;
}

.discord-inline {
  color: var(--text);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.35);
  text-underline-offset: 3px;
}

.discord-inline:hover {
  text-decoration-color: currentColor;
}
