:root {
  --bg: #f3f4f6;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --line: rgba(15, 23, 42, 0.07);
  --ink: #101828;
  --muted: #667085;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at top left, rgba(191, 210, 255, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 239, 222, 0.26), transparent 24%),
    linear-gradient(180deg, #fafbfc 0%, #eef2f6 100%);
}

button,
select,
input {
  font: inherit;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
  overflow: hidden;
}

.top-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.nav-chip {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-chip.active {
  background: #111827;
  color: #fff;
}

.view-slider {
  display: flex;
  width: 200%;
  transition: transform 280ms ease;
}

.view-slider[data-view="ads"] {
  transform: translateX(-50%);
}

.view-page {
  width: 50%;
  padding-right: 16px;
  flex: 0 0 50%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy,
.hero-panel,
.summary-band,
.library {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.sub-hero {
  margin-top: 0;
}

.hero-copy {
  padding: 28px;
}

.hero-panel {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 640px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.98;
  font-weight: 650;
}

h2 {
  font-size: 26px;
  line-height: 1.08;
  font-weight: 620;
}

h3 {
  font-size: 26px;
  line-height: 1.18;
  font-weight: 620;
}

.hero-text,
.band-note,
.window-note {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 620px;
  margin-top: 14px;
  font-size: 16px;
}

.window-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.window-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.window-switch button.active {
  background: #111827;
  color: #fff;
}

.summary-band,
.library {
  padding: 24px;
  margin-bottom: 18px;
}

.band-head,
.library-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

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

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -36px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--glow);
  filter: blur(8px);
}

.summary-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.summary-platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
}

.summary-count {
  color: var(--muted);
  font-size: 13px;
}

.summary-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-main small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.summary-main strong {
  font-size: 24px;
  font-weight: 620;
}

.library-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.viral-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ad-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.ad-empty {
  padding: 22px;
  border-radius: 22px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.94));
}

.ad-empty strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 620;
}

.ad-empty p {
  color: var(--muted);
  line-height: 1.65;
}

.ad-empty-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ad-empty-points span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
}

.ad-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ad-overview-card,
.ad-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ad-overview-card {
  padding: 16px;
  border-radius: 18px;
}

.ad-overview-card small,
.ad-metric small,
.ad-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ad-overview-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 620;
}

.ad-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ad-card {
  padding: 18px;
  border-radius: 22px;
}

.ad-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.ad-card h3 {
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.15;
}

.ad-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ad-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f5f8;
  color: #475467;
  font-size: 12px;
  font-weight: 620;
}

.ad-badge-good {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.ad-badge-mid {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.ad-badge-weak {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.ad-videos,
.ad-note {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.ad-video-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.ad-cover-frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, #edf2f8, #dfe7f1);
}

.ad-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ad-metric {
  padding: 14px;
  border-radius: 16px;
  background: #f7f8fb;
}

.ad-metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 24px;
  line-height: 1;
  font-weight: 620;
}

.ad-metric span {
  color: var(--muted);
  font-size: 12px;
}

.ad-card.tone-good {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 0 0 1px rgba(16, 185, 129, 0.08);
}

.ad-card.tone-mid {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.ad-card.tone-weak {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.ad-rule-list {
  display: grid;
  gap: 8px;
}

.ad-rule-list span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 12px;
  background: #f7f8fb;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

.viral-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.viral-cover {
  max-width: 220px;
}

.viral-body h3 {
  margin-bottom: 14px;
}

.viral-body .video-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-card {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.cover-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #edf2f8, #dfe7f1);
  outline: none;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.cover-frame:hover {
  transform: translateY(-1px);
}

.cover-frame.is-active {
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.14), 0 18px 38px rgba(17, 24, 39, 0.12);
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #7a8699;
}

.cover-placeholder span {
  font-size: 24px;
  font-weight: 620;
}

.cover-placeholder small {
  font-size: 11px;
}

.paste-hint {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #344054;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.cover-frame.is-active .paste-hint,
.cover-frame:hover .paste-hint {
  opacity: 1;
  transform: translateY(0);
}

.cover-input {
  display: none;
}

.video-body {
  min-width: 0;
}

.video-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.category-row {
  margin-bottom: 8px;
}

.rank-chip,
.platform-chip,
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f5f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.01em;
}

.video-card h3 {
  min-height: auto;
  margin-bottom: 10px;
  text-wrap: balance;
  font-size: 18px;
  line-height: 1.18;
}

.video-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.video-stats div {
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(246, 247, 250, 0.92);
}

.video-stats dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.video-stats dd {
  margin: 0;
  font-size: 15px;
  font-weight: 610;
  line-height: 1;
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto auto -24px -18px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  opacity: 0.12;
}

.metric-icon {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.icon-play::before,
.icon-heart::before,
.icon-chat::before,
.icon-share::before,
.icon-save::before,
.icon-plus::before,
.icon-ring::before,
.icon-spark::before,
.icon-eye::before,
.icon-time::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}

.icon-play::before {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  left: 7px;
}

.icon-heart::before {
  width: 8px;
  height: 8px;
  background: currentColor;
  transform: rotate(45deg);
  top: 4px;
}

.icon-heart::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 999px;
  left: 3px;
  top: 2px;
  box-shadow: 4px 0 0 currentColor;
}

.icon-chat::before {
  width: 10px;
  height: 8px;
  border-radius: 6px;
  background: currentColor;
  top: 4px;
}

.icon-chat::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  left: 5px;
  bottom: 2px;
}

.icon-share::before {
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  top: 3px;
}

.icon-share::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: currentColor;
  left: 4px;
  bottom: 5px;
  transform: rotate(-30deg);
}

.icon-save::before {
  width: 8px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  top: 3px;
}

.icon-plus::before {
  width: 8px;
  height: 2px;
  background: currentColor;
}

.icon-plus::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 8px;
  background: currentColor;
  inset: 0;
  margin: auto;
}

.icon-ring::before {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-spark::before {
  width: 9px;
  height: 9px;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.icon-eye::before {
  width: 12px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 999px / 70%;
}

.icon-eye::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 999px;
  inset: 0;
  margin: auto;
}

.icon-time::before {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-time::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 5px;
  background: currentColor;
  left: 8px;
  top: 4px;
  box-shadow: 3px 2px 0 -0.3px currentColor;
}

.tone-blue .metric-icon,
.tone-blue .metric-card dt {
  color: #2563eb;
}

.tone-blue::after {
  background: #2563eb;
}

.tone-rose .metric-icon,
.tone-rose .metric-card dt {
  color: #e11d48;
}

.tone-rose::after {
  background: #e11d48;
}

.tone-gold .metric-icon,
.tone-gold .metric-card dt {
  color: #d97706;
}

.tone-gold::after {
  background: #d97706;
}

.tone-green .metric-icon,
.tone-green .metric-card dt {
  color: #059669;
}

.tone-green::after {
  background: #059669;
}

.tone-violet .metric-icon,
.tone-violet .metric-card dt {
  color: #7c3aed;
}

.tone-violet::after {
  background: #7c3aed;
}

.tone-ink .metric-icon,
.tone-ink .metric-card dt {
  color: #0f172a;
}

.tone-ink::after {
  background: #0f172a;
}

.tone-teal .metric-icon,
.tone-teal .metric-card dt {
  color: #0f766e;
}

.tone-teal::after {
  background: #0f766e;
}

.tone-sky .metric-icon,
.tone-sky .metric-card dt {
  color: #0284c7;
}

.tone-sky::after {
  background: #0284c7;
}

.platform-badge {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 6px var(--badge-glow);
}

.platform-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1100px) {
  .hero,
  .platform-summary,
  .video-grid,
  .viral-grid {
    grid-template-columns: 1fr;
  }

  .video-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .viral-card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1240px);
    padding-top: 18px;
  }

  .band-head,
  .library-head {
    display: grid;
    align-items: start;
  }

  .view-slider {
    width: 200%;
  }

  .view-page {
    padding-right: 10px;
  }

  .video-card {
    grid-template-columns: 1fr;
  }

  .cover-frame {
    max-width: 240px;
  }

  h3 {
    font-size: 22px;
  }

  .video-card h3 {
    min-height: auto;
  }

  .video-stats dd {
    font-size: 18px;
  }

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

  .ad-overview,
  .ad-metrics,
  .ad-video-row {
    grid-template-columns: 1fr;
  }

  .ad-card-head {
    display: grid;
  }
}
