* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #050505;
  color: #f2f2f2;
  min-height: 100vh;
  line-height: 1.5;
}

.site-header {
  text-align: center;
  padding: 22px 20px 0;
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #fe2c55;
}

.topnav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 18px 20px;
  border-bottom: 1px solid #1e1e1e;
}

.nav-link {
  background: none;
  border: none;
  color: #6b6b6b;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.nav-link.active,
.nav-link:hover {
  color: #ffffff;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

.hidden {
  display: none !important;
}

.search-view {
  max-width: 520px;
  margin: 70px auto 0;
  text-align: center;
}

.search-form {
  display: flex;
  border: 1px solid #2b2b2b;
  background: #0c0c0c;
}

.search-form:focus-within {
  border-color: #fe2c55;
}

.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 0.85rem;
}

.search-form button {
  background: #fe2c55;
  border: none;
  color: #fff;
  padding: 0 22px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.search-form button:hover {
  background: #e0244a;
}

.hint {
  margin-top: 12px;
  color: #666;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.history-box {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.history-item {
  display: inline-flex;
  align-items: center;
  background: #0c0c0c;
  border: 1px solid #262626;
  font-size: 0.74rem;
}

.history-item:hover {
  border-color: #fe2c55;
}

.history-user {
  background: none;
  border: none;
  color: #e6e6e6;
  font-family: inherit;
  font-size: 0.74rem;
  padding: 6px 10px;
  cursor: pointer;
}

.history-remove {
  background: none;
  border: none;
  border-left: 1px solid #222;
  color: #777;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 6px 9px;
  cursor: pointer;
}

.history-remove:hover {
  color: #fe2c55;
}

.status {
  text-align: center;
  margin: 24px 0;
  color: #a0a0a0;
  font-size: 0.82rem;
}

.back-btn {
  background: none;
  border: none;
  color: #777;
  font-family: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  margin-bottom: 18px;
}

.back-btn:hover {
  color: #fff;
}

.box {
  background: #0c0c0c;
  border: 1px solid #222;
  margin-bottom: 16px;
}

.profile-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1px solid #333;
  background: #0a0a0a;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.display-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.handle {
  color: #fe2c55;
  font-size: 0.82rem;
  margin-top: 2px;
}

.bio {
  color: #8f8f8f;
  font-size: 0.78rem;
  margin-top: 6px;
  white-space: pre-line;
  max-width: 480px;
}

.bio a,
.bio-link {
  display: inline-block;
  margin-top: 6px;
  color: #fe2c55;
  font-size: 0.78rem;
  text-decoration: none;
  word-break: break-all;
}

.bio a:hover,
.bio-link:hover {
  text-decoration: underline;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pill {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border: 1px solid #2b2b2b;
  background: #171717;
  color: #b5b5b5;
}

.profile-right {
  display: flex;
  gap: 28px;
}

.top-stat {
  text-align: center;
}

.top-stat strong {
  display: block;
  font-size: 1.1rem;
  color: #fff;
}

.top-stat span {
  font-size: 0.68rem;
  color: #6f6f6f;
  letter-spacing: 0.08em;
}

.analytics-header {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.analytics-body {
  border-top: 1px solid #222;
  padding: 18px;
}

.section-label {
  color: #fe2c55;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding-bottom: 8px;
  border-bottom: 1px solid #222;
  margin: 18px 0 12px;
}

.section-label:first-child {
  margin-top: 0;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #161616;
  border: 1px solid #222;
}

.metric-cell {
  padding: 14px;
  border-right: 1px solid #222;
}

.metric-cell:last-child {
  border-right: none;
}

.metric-cell strong {
  display: block;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 4px;
}

.metric-cell span {
  display: block;
  font-size: 0.66rem;
  color: #777;
  letter-spacing: 0.06em;
}

.metric-cell small {
  display: block;
  font-size: 0.66rem;
  color: #555;
  margin-top: 4px;
}

.eng-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 2px solid #333;
  color: #777;
  font-size: 0.74rem;
}

.tabs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #262626;
  background: #121212;
  margin-bottom: 20px;
}

.tab-btn {
  background: none;
  border: none;
  border-right: 1px solid #262626;
  border-bottom: 1px solid #262626;
  color: #6b6b6b;
  font-family: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  padding: 13px 10px;
  cursor: pointer;
}

.tab-btn:nth-child(3n) {
  border-right: none;
}

.tab-btn:nth-child(n + 4) {
  border-bottom: none;
}

.tab-btn.active {
  color: #fe2c55;
  background: #14080b;
  box-shadow: inset 0 -2px 0 #fe2c55;
}

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

.video-card {
  background: #0c0c0c;
  border: 1px solid #222;
  cursor: pointer;
}

.video-card:hover {
  border-color: #fe2c55;
}

.video-thumb {
  height: 240px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: cover;
  background-position: center;
  font-size: 0.74rem;
  text-shadow: 0 1px 4px #000;
}

.video-meta {
  padding: 10px;
  font-size: 0.76rem;
  color: #ccc;
}

.video-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.68rem;
  color: #8a8a8a;
}

.video-sound {
  margin-top: 5px;
  font-size: 0.68rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.modal-stat {
  background: #181818;
  border: 1px solid #262626;
  padding: 8px;
  text-align: center;
  font-size: 0.68rem;
  color: #777;
}

.modal-stat strong {
  display: block;
  font-size: 0.9rem;
  color: #fff;
}

.user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #121212;
  border: 1px solid #262626;
  padding: 12px;
  cursor: pointer;
}

.user-row:hover {
  border-color: #444;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1d1d1d;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.empty-msg {
  padding: 28px;
  border: 1px solid #222;
  background: #121212;
  color: #777;
  font-size: 0.8rem;
  text-align: center;
}

.load-more-wrap {
  margin-top: 18px;
  text-align: center;
}

.load-more-btn {
  background: #0c0c0c;
  border: 1px solid #fe2c55;
  color: #fe2c55;
  padding: 11px 26px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.load-more-btn:hover {
  background: #fe2c55;
  color: #fff;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  background: #121212;
  border: 1px solid #262626;
  padding: 14px;
  font-size: 0.8rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #121212;
  border: 1px solid #2d2d2d;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #333;
  color: #fff;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.modal-video {
  width: 100%;
  max-height: 440px;
  background: #000;
  display: block;
}

.modal-info {
  padding: 14px;
  font-size: 0.8rem;
}

@media (max-width: 680px) {
  .container {
    padding: 20px 14px 60px;
  }
  .search-view {
    margin-top: 32px;
  }
  .search-form input {
    font-size: 16px;
    padding: 12px 14px;
  }
  .search-form button {
    padding: 0 16px;
    min-height: 44px;
  }
  .profile-box {
    padding: 16px;
    gap: 16px;
  }
  .profile-left {
    width: 100%;
    align-items: flex-start;
  }
  .avatar {
    width: 58px;
    height: 58px;
  }
  .profile-right {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    border-top: 1px solid #1f1f1f;
    padding-top: 14px;
  }
  .top-stat strong {
    font-size: 0.98rem;
  }
  .metric-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-cell {
    border-bottom: 1px solid #222;
  }
  .metric-cell:nth-child(2n) {
    border-right: none;
  }
  .metric-cell:nth-last-child(-n + 2) {
    border-bottom: none;
  }
  .tabs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tab-btn:nth-child(3n) {
    border-right: 1px solid #262626;
  }
  .tab-btn:nth-child(2n) {
    border-right: none;
  }
  .tab-btn:nth-child(n + 4) {
    border-bottom: 1px solid #262626;
  }
  .tab-btn:nth-last-child(-n + 2) {
    border-bottom: none;
  }
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .video-thumb {
    height: 185px;
  }
  .user-list {
    grid-template-columns: 1fr;
  }
  .modal-box {
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-video {
    max-height: 320px;
  }
}
