:root {
  --bg: #080a0e;
  --panel: #0e1118;
  --panel-raised: #141823;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f3f0e9;
  --muted: #8d94a3;
  --red: #df3e45;
  --red-bright: #ff6669;
  --blue: #4aa8c4;
  --gold: #c8a96a;
  --radius: 18px;
  --max-width: 1420px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header,
main,
footer {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(223, 62, 69, 0.65);
  color: var(--red-bright);
  border-radius: 4px;
  background: rgba(223, 62, 69, 0.1);
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.live-status {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #59c988;
  box-shadow: 0 0 0 5px rgba(89, 201, 136, 0.09), 0 0 18px rgba(89, 201, 136, 0.45);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.55fr);
  gap: 32px;
  align-items: center;
  padding: 32px 0 28px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--red-bright);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.archive-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.archive-stats div {
  padding: 12px 16px;
}

.archive-stats div + div {
  border-left: 1px solid var(--line);
}

.archive-stats dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.archive-stats dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.7fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.featured__stage {
  min-width: 0;
  background: #030405;
}

.video-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 700px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(223, 62, 69, 0.12), transparent 28%),
    #030405;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-frame__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
  transition: opacity 180ms ease;
}

.video-frame__empty[hidden] {
  opacity: 0;
  pointer-events: none;
}

.video-frame__empty strong {
  color: #d7d4ce;
  font-size: 14px;
}

.video-frame__empty small {
  margin-top: 5px;
  font-size: 11px;
}

.sigil {
  margin-bottom: 18px;
  color: var(--red);
  font-size: 34px;
}

.featured__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.share-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d8d9dc;
  background: transparent;
  font-size: 11px;
  letter-spacing: 0;
}

.share-button:hover:not(:disabled) {
  border-color: rgba(223, 62, 69, 0.6);
  color: #fff;
}

.share-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.featured__details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 56px);
  border-left: 1px solid var(--line);
}

.featured__details h2 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  line-height: 1.12;
}

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

.encounter-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 48px 0 0;
  border-top: 1px solid var(--line);
}

.encounter-data div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.encounter-data div:nth-child(odd) {
  padding-right: 18px;
}

.encounter-data div:nth-child(even) {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.encounter-data dt {
  color: var(--muted);
  font-size: 11px;
}

.encounter-data dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 650;
}

.featured__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #aeb3bc;
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.archive {
  padding: 52px 0 64px;
}

.archive__heading {
  display: flex;
  gap: 30px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.archive__heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
}

.filters {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.filter {
  padding: 8px 15px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.filter:hover,
.filter.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.replay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.replay-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 17, 24, 0.78);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.replay-card:hover,
.replay-card.is-selected {
  border-color: rgba(223, 62, 69, 0.48);
  background: rgba(20, 24, 35, 0.96);
  transform: translateY(-3px);
}

.replay-card__button {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  text-align: left;
}

.replay-card__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(223, 62, 69, 0.15), transparent 38%),
    radial-gradient(circle at 75% 30%, rgba(74, 168, 196, 0.12), transparent 35%),
    #07090d;
}

.replay-card__visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  pointer-events: none;
}

.replay-card__visual::after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(5, 6, 9, 0.9));
  content: "";
}

.replay-card__play {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(5, 6, 9, 0.52);
  backdrop-filter: blur(7px);
}

.replay-card__duration {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 12px;
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(3, 4, 5, 0.76);
  font-size: 10px;
}

.replay-card__content {
  padding: 19px;
}

.replay-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.replay-card h3 {
  margin: 10px 0 8px;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", "Batang", serif;
  font-size: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.archive-state {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.archive-state[hidden] {
  display: none;
}

.loader {
  width: 25px;
  height: 25px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.archive-state p {
  margin: 13px 0 0;
  font-size: 13px;
}

.load-more {
  display: block;
  min-width: 190px;
  margin: 34px auto 0;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9dbe0;
  background: rgba(255, 255, 255, 0.03);
}

.load-more:hover {
  border-color: rgba(223, 62, 69, 0.5);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 30px 0 48px;
  border-top: 1px solid var(--line);
  color: #676e7b;
  font-size: 11px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1060px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .archive-stats {
    max-width: 520px;
  }

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

  .featured__details {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

@media (max-width: 700px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header {
    min-height: 74px;
  }

  .live-status {
    font-size: 0;
  }

  .intro {
    padding: 24px 0 22px;
  }

  .intro h1 {
    max-width: 100%;
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .archive-stats div {
    padding: 18px 11px;
  }

  .archive-stats dd {
    font-size: 23px;
  }

  .featured {
    border-radius: var(--radius);
  }

  .featured__details {
    padding: 28px 22px;
  }

  .featured__summary {
    overflow-wrap: anywhere;
  }

  .encounter-data {
    margin-top: 32px;
  }

  .archive {
    padding-top: 44px;
  }

  .archive__heading {
    display: block;
  }

  .filters {
    width: 100%;
    margin-top: 22px;
    overflow-x: auto;
    border-radius: 12px;
  }

  .filter {
    flex: 1 0 auto;
  }

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

  footer {
    display: grid;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
