:root {
  font-family: Onest, sans-serif;
  color: #161823;
  --pink: #fe2c55;
  --cyan: #25f4ee;
  --line: #e5e5e7;
  --muted: #73747b;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: white; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 21px; height: 21px; stroke-width: 2.1; }
.placeholder { background: linear-gradient(135deg, #879e8b, #dfc9aa); color: #3d4c43; font-weight: 700; }

.topbar {
  position: fixed;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 240px minmax(240px, 520px) 1fr;
  align-items: center;
  gap: 18px;
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 97%);
}

.brand { color: #161823; font-size: 25px; font-weight: 800; text-decoration: none; }
.music-mark { position: relative; margin-right: 5px; color: #111; text-shadow: -2px 0 var(--cyan), 2px 0 var(--pink); }
.search { display: flex; height: 46px; align-items: center; padding: 0 13px 0 16px; border-radius: 23px; background: #f1f1f2; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.search svg { padding-left: 12px; border-left: 1px solid #d8d8db; color: var(--muted); box-sizing: content-box; }
.topbar nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.upload { display: flex; height: 36px; align-items: center; gap: 7px; padding: 0 16px; border: 1px solid #d7d7d9; background: white; font-weight: 600; }
.topbar .icon-button { border: 0; background: transparent; }
.nav-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; font-size: 10px; }

.sidebar { position: fixed; z-index: 4; top: 60px; bottom: 0; left: 0; width: 240px; padding: 20px 12px; border-right: 1px solid #f0f0f1; background: white; overflow-y: auto; }
.sidebar > nav { display: grid; gap: 4px; }
.sidebar > nav button { display: flex; height: 48px; align-items: center; gap: 13px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; font-size: 17px; font-weight: 600; }
.sidebar > nav button:hover { background: #f8f8f8; }
.sidebar > nav button.active { color: var(--pink); }
.sidebar > nav svg { width: 25px; height: 25px; }
.suggested { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.suggested h2 { margin: 0 8px 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.suggested-account { display: flex; align-items: center; gap: 9px; padding: 8px; }
.suggested-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; font-size: 9px; }
.suggested-account div { display: grid; min-width: 0; }
.suggested-account strong, .suggested-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggested-account strong { font-size: 13px; }
.suggested-account span { color: var(--muted); font-size: 11px; }
.sidebar footer { margin-top: 20px; padding: 15px 8px; border-top: 1px solid var(--line); color: #a3a3a7; font-size: 11px; line-height: 1.45; }

main { width: min(calc(100% - 288px), 920px); margin: 60px auto 70px; padding-top: 34px; transform: translateX(120px); }
.profile { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: start; padding: 0 8px 26px; }
.profile-avatar { display: grid; width: 116px; height: 116px; grid-row: span 2; place-items: center; border-radius: 50%; }
.profile-copy { min-width: 0; }
.profile-title { display: flex; align-items: center; gap: 7px; }
.profile-title h1 { margin: 3px 0 0; font-size: 30px; line-height: 1.1; overflow-wrap: anywhere; }
.profile-title svg { color: #20a9e0; fill: #20a9e0; stroke: white; }
.profile-copy h2 { margin: 7px 0 13px; font-size: 17px; font-weight: 600; }
.profile-actions { display: flex; gap: 8px; }
.profile-actions button { min-height: 38px; padding: 0 18px; border-radius: 4px; font-weight: 700; }
.follow { min-width: 150px; border: 0; background: var(--pink); color: white; }
.message { border: 1px solid #d8d8db; background: white; }
.profile-actions .icon-button { display: grid; width: 40px; padding: 0; place-items: center; border: 1px solid #d8d8db; background: white; }
.metrics { display: flex; grid-column: 1 / -1; gap: 24px; margin: 22px 0 10px; }
.metrics div { display: flex; gap: 5px; }
.metrics dt { font-weight: 700; }
.metrics dd { margin: 0; color: var(--muted); }
.bio { grid-column: 1 / -1; max-width: 640px; margin: 0 0 8px; line-height: 1.45; }
.website { display: flex; grid-column: 1 / -1; align-items: center; gap: 5px; color: #161823; font-weight: 700; text-decoration: none; }
.website svg { width: 17px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.tabs button { display: flex; height: 48px; align-items: center; justify-content: center; gap: 7px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 600; }
.tabs button[aria-selected="true"] { border-bottom-color: #161823; color: #161823; }
.tabs svg { width: 17px; height: 17px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding-top: 4px; }
.video-card { position: relative; display: grid; min-width: 0; aspect-ratio: 9 / 13.4; align-items: end; padding: 0; overflow: hidden; border: 0; text-align: left; }
.video-card::after { position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgb(0 0 0 / 64%)); content: ""; }
.video-card > span { position: relative; z-index: 1; padding: 11px; color: white; font-size: 13px; font-weight: 600; line-height: 1.3; }
.video-stats { position: absolute !important; z-index: 2 !important; right: 9px; top: 9px; display: flex; align-items: center; gap: 4px; padding: 4px 7px !important; border-radius: 4px; background: rgb(0 0 0 / 42%); font-size: 11px !important; }
.video-stats svg { width: 13px; height: 13px; fill: white; }
.tone-0 { background: linear-gradient(155deg, #779685, #d8c7a9); }
.tone-1 { background: linear-gradient(155deg, #bd7254, #efd0b4); }
.tone-2 { background: linear-gradient(155deg, #6f92a3, #d6e1e5); }
.tone-3 { background: linear-gradient(155deg, #ac8e55, #e6d9b3); }
.tone-4 { background: linear-gradient(155deg, #785a70, #ddcad4); }
.tone-5 { background: linear-gradient(155deg, #a86b76, #ead0d3); }
.mobile-nav { display: none; }

dialog { width: min(480px, calc(100% - 24px)); height: min(820px, calc(100vh - 24px)); padding: 0; overflow: visible; border: 0; border-radius: 8px; background: transparent; color: white; }
dialog::backdrop { background: rgb(0 0 0 / 90%); }
.video-stage { position: relative; display: grid; width: 100%; height: 100%; place-items: center; overflow: hidden; border-radius: 8px; }
#video-player { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-stage::after { position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgb(0 0 0 / 72%)); content: ""; }
.video-label { position: relative; z-index: 1; font-size: 20px; }
.play-button { position: absolute; z-index: 3; display: grid; width: 68px; height: 68px; place-items: center; border: 0; border-radius: 50%; background: rgb(0 0 0 / 42%); color: white; }
.play-button svg { width: 32px; height: 32px; fill: white; }
.video-overlay { position: absolute; z-index: 3; right: 18px; bottom: 20px; left: 18px; }
.video-overlay p { margin: 6px 0; line-height: 1.4; }
.video-overlay span { font-size: 13px; }
.dialog-close { position: fixed; top: 18px; right: 18px; z-index: 5; display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 50%; background: #323238; color: white; }
.video-arrow { position: fixed; right: 20px; z-index: 5; display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 50%; background: #323238; color: white; }
.video-arrow.previous { top: calc(50% - 54px); }
.video-arrow.next { top: calc(50% + 8px); }
.engagement { position: absolute; right: -76px; bottom: 18px; display: grid; justify-items: center; gap: 13px; }
.engagement > button { display: grid; justify-items: center; gap: 3px; border: 0; background: transparent; color: white; font-size: 11px; }
.engagement > button svg { display: grid; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: #323238; }
.dialog-avatar { display: grid; width: 44px; height: 44px; place-items: center; border: 2px solid white; border-radius: 50%; font-size: 10px; }

@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; height: 52px; padding: 0 14px; }
  .brand { font-size: 22px; }
  .search, .topbar .upload, .topbar .icon-button:first-of-type { display: none; }
  .topbar nav { gap: 10px; }
  .sidebar { display: none; }
  main { width: 100%; margin: 52px 0 64px; padding-top: 18px; transform: none; }
  .profile { grid-template-columns: 92px 1fr; column-gap: 12px; padding: 0 14px 20px; }
  .profile-avatar { width: 84px; height: 84px; }
  .profile-title h1 { font-size: 22px; }
  .profile-copy h2 { margin: 5px 0 9px; font-size: 14px; }
  .profile-actions { flex-wrap: wrap; }
  .profile-actions button { min-height: 34px; padding-inline: 12px; }
  .follow { min-width: 92px; }
  .profile-actions .icon-button:last-child { display: none; }
  .metrics { justify-content: space-around; gap: 7px; margin-top: 18px; }
  .metrics div { display: grid; justify-items: center; gap: 1px; }
  .metrics dd { font-size: 11px; }
  .bio, .website { font-size: 13px; }
  .tabs button { font-size: 0; }
  .tabs svg { width: 23px; height: 23px; }
  .video-grid { gap: 2px; padding-top: 2px; }
  .video-card > span { padding: 7px; font-size: 10px; }
  .video-stats { top: 5px; right: 5px; padding: 3px 5px !important; }
  .mobile-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: flex; height: 58px; align-items: center; justify-content: space-around; border-top: 1px solid var(--line); background: white; }
  .mobile-nav button { display: grid; min-width: 54px; justify-items: center; gap: 2px; border: 0; background: transparent; font-size: 9px; }
  .mobile-nav .create { position: relative; width: 46px; height: 30px; min-width: 46px; place-items: center; border-radius: 8px; background: linear-gradient(90deg, var(--cyan) 0 48%, var(--pink) 48%); }
  .mobile-nav .create::after { position: absolute; inset: 0 4px; z-index: -1; border-radius: 6px; background: #161823; content: ""; }
  .mobile-nav .create svg { color: white; }
  dialog { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; }
  .video-stage { border-radius: 0; }
  .dialog-close { position: absolute; top: 10px; right: 10px; }
  .video-arrow { right: 8px; }
  .engagement { right: 8px; bottom: 110px; z-index: 4; }
  .video-overlay { right: 72px; bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
