:root {
  --bg: #1f2020;
  --panel: #292a2a;
  --panel-2: #242525;
  --line: #3a3b3b;
  --text: #f3f5f7;
  --muted: #aeb4bd;
  --card: #ffffff;
  --card-text: #242424;
  --orange: #ff6900;
  --cyan: #00c9ff;
  --pink: #fe2b54;
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  font-family: "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.gate-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, #282929, #1c1d1d);
  box-shadow: var(--shadow);
  padding: 36px;
}

.gate-card h1,
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
}

.gate-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.gate-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  color: var(--text);
  padding: 14px 16px;
}

.gate-row button,
.tab.active,
.ghost-button:hover {
  background: var(--orange);
  color: #fff;
}

.gate-row button,
.ghost-button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  padding: 14px 18px;
}

.error {
  color: #ff8585;
}

.app {
  width: min(1840px, calc(100% - 64px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

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

.eyebrow {
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin: 0 0 20px;
  padding-bottom: 12px;
}

.sub-tabs {
  border: 0;
  margin-bottom: 32px;
}

.tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 18px;
  white-space: nowrap;
}

.section-title {
  margin: 32px 0 18px;
  font-size: clamp(28px, 3vw, 42px);
}

.metric-layout {
  display: grid;
  grid-template-columns: 1.12fr 1.1fr 1.02fr 0.72fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 34px;
}

.metric-stack {
  display: grid;
  gap: 22px;
}

.metric-stack.three {
  grid-template-rows: repeat(3, 1fr);
}

.metric-card,
.profile-card,
.summary-card {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--card-text);
}

.metric-card {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 18px 20px;
  text-align: center;
}

.metric-card.large {
  min-height: 412px;
}

.metric-card .label,
.summary-card .label {
  font-size: clamp(17px, 1.2vw, 24px);
  font-weight: 900;
}

.metric-card .value,
.summary-card .value {
  font-size: clamp(42px, 4.7vw, 78px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.metric-stack.three .value {
  font-size: clamp(28px, 2.3vw, 46px);
}

.profile-card {
  display: flex;
  min-height: 412px;
  overflow: hidden;
}

.profile-card img {
  width: 100%;
  object-fit: cover;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 18px;
  margin: 18px 0 34px;
}

.summary-card {
  padding: 28px;
  text-align: center;
}

.summary-card .value {
  color: #202020;
  font-size: clamp(34px, 3vw, 58px);
}

.profile-growth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 22px;
  margin: 8px 0 34px;
}

.profile-growth-card,
.profile-growth-summary {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--card-text);
  overflow: hidden;
}

.profile-growth-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.profile-growth-header {
  border-bottom: 1px solid #ececec;
  padding: 16px 18px 10px;
}

.profile-growth-header h3 {
  font-size: 24px;
  line-height: 1.05;
  margin: 0;
}

.profile-growth-header p {
  color: #666;
  font-weight: 800;
  margin: 6px 0 0;
}

.profile-growth-image {
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 0;
}

.profile-growth-image img {
  display: block;
  height: 430px;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.profile-growth-summary {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  padding: 28px 18px;
  text-align: center;
}

.profile-growth-summary .label {
  font-size: 17px;
  font-weight: 950;
  margin-bottom: 18px;
}

.growth-number {
  font-size: clamp(54px, 5vw, 88px);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin-bottom: 16px;
}

.growth-flow {
  color: var(--orange);
  font-size: 24px;
  font-weight: 950;
  margin-bottom: 14px;
}

.profile-growth-summary p {
  color: #555;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.chart-card,
.table-card,
.insight-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin: 18px 0 34px;
  padding: 22px;
}

.content-comments-summary {
  align-items: center;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: #242424;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 22px;
  padding: 24px 30px;
}

.content-comments-summary .label {
  font-size: 18px;
  font-weight: 950;
  margin-bottom: 6px;
}

.content-comments-summary .value {
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.content-comments-summary p {
  color: #555;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  max-width: 460px;
}

.chart {
  min-height: 640px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(92px, 1fr));
  gap: 18px;
  margin: 18px 0 34px;
}

.thumb-card {
  min-width: 0;
}

.thumb-frame {
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-caption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 8px;
  text-align: center;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.table-toolbar input {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #151616;
  color: var(--text);
  padding: 12px 14px;
}

.table-scroll {
  max-height: 980px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #191a1a;
  color: var(--text);
  cursor: pointer;
}

td {
  color: #eef1f5;
}

.table-thumb {
  width: 92px;
  height: 132px;
  border-radius: 8px;
  object-fit: cover;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 22px;
}

.insight-card h3 {
  margin: 0 0 8px;
}

.mini-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  overflow-x: auto;
}

.mini-thumb-card {
  flex: 0 0 92px;
}

.mini-thumb-card img {
  width: 92px;
  height: 144px;
  border-radius: 8px;
  object-fit: cover;
}

.mini-thumb-stats {
  color: var(--muted);
  display: grid;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 6px;
}

.comment-table td:nth-child(2),
.comment-table td:nth-child(3) {
  min-width: 260px;
}

@media (max-width: 1280px) {
  .metric-layout {
    grid-template-columns: 1fr 1fr;
  }

  .profile-growth-grid {
    grid-template-columns: 1fr;
  }

  .content-comments-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .thumb-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 28px, 1840px);
    padding-top: 22px;
  }

  .hero,
  .gate-row {
    flex-direction: column;
  }

  .metric-layout,
  .stat-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

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