:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --panel: #202020;
  --panel-dark: #121212;
  --panel-soft: #272727;
  --line: #343434;
  --text: #f1f1f1;
  --muted: #aaa;
  --muted-2: #777;
  --pill: #272727;
  --pill-hover: #3f3f3f;
  --accent: #a979b5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  background: rgba(15, 15, 15, 0.98);
}

.brand-area,
.header-actions,
.search-bar,
.action-row,
.channel-row,
.filter-row {
  display: flex;
  align-items: center;
}

.brand-area {
  gap: 24px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
}

.icon-button:hover,
.round-more:hover,
.mic-button:hover,
.pill:hover,
.create-button:hover,
.chip:hover,
.next-chip:hover {
  background: var(--pill-hover);
}

.menu-button {
  width: 28px;
  height: 28px;
  gap: 5px;
}

.menu-button span {
  display: block;
  width: 21px;
  height: 2px;
  background: #f1f1f1;
  border-radius: 2px;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
}

.country {
  position: absolute;
  top: -8px;
  right: -19px;
  color: #bdbdbd;
  font-size: 11px;
  font-weight: 500;
}

.search-bar {
  justify-self: center;
  width: min(100%, 740px);
  gap: 14px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 1px solid #303030;
  border-right: 0;
  border-radius: 25px 0 0 25px;
  background: #121212;
}

.search-input-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 54px 0 18px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 17px;
}

.search-input-wrap input::placeholder {
  color: #7f7f7f;
}

.keyboard-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 24px;
  height: 14px;
  transform: translateY(-50%);
  opacity: .75;
  background:
    linear-gradient(#aaa, #aaa) 0 0 / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, #aaa 0 2px, transparent 2px 4px) 0 4px / 100% 5px no-repeat,
    linear-gradient(#aaa, #aaa) 4px 11px / 16px 2px no-repeat;
}

.search-button {
  width: 72px;
  height: 46px;
  margin-left: -14px;
  display: grid;
  place-items: center;
  border: 1px solid #303030;
  border-radius: 0 25px 25px 0;
  background: #222;
}

svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.mic-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #222;
}

.header-actions {
  justify-self: end;
  gap: 14px;
}

.create-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 22px;
  background: #222;
  font-weight: 700;
}

.notification {
  position: relative;
}

.badge {
  position: absolute;
  top: 3px;
  right: -2px;
  min-width: 22px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid var(--bg);
  border-radius: 10px;
  background: #cc0033;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #3e7a25;
  color: #e9f1e2;
  font-size: 19px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(620px, 1244px) minmax(360px, 454px);
  gap: 18px;
  max-width: 1720px;
  margin: 13px auto 40px;
  padding: 0 14px;
}

.search-sidebar,
.search-results-page {
  display: none;
}

body.results-mode .layout {
  display: none;
}

body.results-mode .search-sidebar {
  position: fixed;
  left: 0;
  top: 64px;
  bottom: 0;
  z-index: 5;
  display: grid;
  align-content: start;
  gap: 22px;
  width: 84px;
  padding-top: 14px;
  background: var(--bg);
}

.side-link {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #f1f1f1;
  text-decoration: none;
  font-size: 12px;
}

.side-link svg {
  width: 27px;
  height: 27px;
}

body.results-mode .search-results-page {
  display: block;
  max-width: 1030px;
  margin: 0 0 48px 274px;
  padding: 12px 0 0;
}

.results-list {
  display: grid;
  gap: 16px;
}

.result-card {
  display: grid;
  grid-template-columns: 472px minmax(0, 1fr) 32px;
  gap: 18px;
  min-height: 266px;
  color: #f1f1f1;
  text-align: left;
  background: transparent;
}

.result-thumb {
  position: relative;
  overflow: hidden;
  width: 472px;
  height: 266px;
  border-radius: 8px;
  background-color: #202020;
  background-size: cover;
  background-position: center;
}

.result-thumb::after {
  content: "▶";
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 32px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(0, 0, 0, .78);
  font-size: 13px;
  font-weight: 700;
}

.result-copy {
  padding-top: 4px;
  min-width: 0;
}

.result-copy h2 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 7px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 500;
}

.result-meta,
.result-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.result-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

.result-channel img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.result-badges {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.result-badges span {
  padding: 3px 5px;
  border-radius: 2px;
  background: #333;
  color: #d0d0d0;
  font-size: 12px;
  font-weight: 700;
}

.result-menu {
  align-self: start;
  background: transparent;
  color: #f1f1f1;
  font-size: 27px;
}

.results-empty {
  padding-top: 64px;
  color: var(--muted);
  font-size: 18px;
}

.watch-column {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background: #050505;
}

.video-frame,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-frame {
  z-index: 1;
  border: 0;
}

.player-poster {
  z-index: 3;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background-image: url("modelo.jpg");
  background-size: 152.86% auto;
  background-position: 14.6% 38.8%;
  background-repeat: no-repeat;
}

.player-poster.support-poster {
  background-size: cover;
  background-position: center;
}

.player-poster::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: rgba(255, 0, 0, .94);
  opacity: 0;
  transition: opacity .16s ease;
}

.player-poster::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-38%, -50%);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
  opacity: 0;
  transition: opacity .16s ease;
}

.player-shell.video-loaded .player-poster {
  opacity: 0;
  pointer-events: none;
}

.player-poster:hover::after,
.player-poster:hover::before {
  opacity: 1;
}

h1 {
  margin: 14px 0 13px;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.45px;
}

.watch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.channel-row {
  min-width: 360px;
  gap: 12px;
}

.channel-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #151515;
}

.channel-logo img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.channel-copy {
  display: grid;
  gap: 3px;
}

.channel-copy strong {
  font-size: 18px;
}

.channel-copy span {
  color: var(--muted);
  font-size: 14px;
}

.subscribe-button {
  height: 42px;
  margin-left: 12px;
  padding: 0 21px;
  border-radius: 22px;
  background: #f1f1f1;
  color: #111;
  font-weight: 700;
}

.action-row {
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.pill,
.round-more {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 22px;
  background: var(--pill);
  font-weight: 700;
  white-space: nowrap;
}

.pill {
  padding: 0 15px;
}

.pill svg {
  width: 25px;
  height: 25px;
}

.split-left {
  margin-right: -8px;
  padding-right: 19px;
  border-radius: 22px 0 0 22px;
}

.split-right {
  position: relative;
  width: 58px;
  padding: 0;
  border-radius: 0 22px 22px 0;
}

.split-right::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #4a4a4a;
}

.round-more {
  width: 42px;
  padding-bottom: 7px;
  letter-spacing: 2px;
}

.mix-panel {
  min-width: 0;
}

.mix-card {
  overflow: hidden;
  height: 698px;
  border: 1px solid #383838;
  border-radius: 10px;
  background: #111;
}

.mix-header {
  position: relative;
  min-height: 111px;
  padding: 18px 58px 16px 18px;
  background: #212121;
}

.mix-header h2 {
  overflow: hidden;
  margin: 0 0 7px;
  font-size: 23px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mix-header p {
  overflow: hidden;
  margin: 0;
  color: #c5c5c5;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-button {
  position: absolute;
  right: 14px;
  top: 21px;
}

.mix-menu {
  position: absolute;
  right: 15px;
  bottom: 10px;
  color: #e9e9e9;
  font-size: 30px;
}

.playlist {
  height: calc(100% - 111px);
  overflow-y: auto;
  padding: 8px 8px 10px 0;
  scrollbar-color: #9f9f9f transparent;
  scrollbar-width: thin;
}

.playlist::-webkit-scrollbar {
  width: 12px;
}

.playlist::-webkit-scrollbar-thumb {
  border: 3px solid #111;
  border-radius: 12px;
  background: #9f9f9f;
}

.video-item {
  position: relative;
  display: grid;
  grid-template-columns: 19px 112px 1fr 28px;
  gap: 10px;
  min-height: 78px;
  padding: 5px 4px 5px 9px;
  color: #fff;
}

.video-item.active {
  background: #322532;
}

.video-item.active::before {
  content: "";
  align-self: center;
  justify-self: center;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #c48acc;
}

.video-item:not(.active)::before {
  content: "";
}

.thumb {
  position: relative;
  overflow: hidden;
  width: 112px;
  height: 63px;
  border-radius: 6px;
  background-color: #202020;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.thumb::after {
  content: attr(data-time);
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .78);
  font-size: 13px;
  font-weight: 700;
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .18));
}

.load-error {
  padding: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

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

.video-copy strong {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 7px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.24;
}

.video-copy span {
  display: block;
  overflow: hidden;
  color: #aaa;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-menu {
  align-self: start;
  width: 26px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: #e8e8e8;
  font-size: 27px;
  line-height: 24px;
}

.filter-row {
  gap: 8px;
  margin-top: 18px;
}

.chip,
.next-chip {
  height: 38px;
  border-radius: 9px;
  background: var(--pill);
  font-weight: 700;
}

.chip {
  padding: 0 17px;
}

.chip.active {
  background: #fff;
  color: #111;
}

.next-chip {
  width: 38px;
  display: grid;
  place-items: center;
  margin-left: auto;
  background: transparent;
}

.suggestion-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.suggestion-card {
  display: grid;
  grid-template-columns: 190px 1fr 26px;
  gap: 12px;
  min-height: 106px;
  color: inherit;
  text-align: left;
  background: transparent;
}

.suggestion-thumb {
  position: relative;
  overflow: hidden;
  height: 106px;
  border-radius: 8px;
  background-color: #202020;
  background-size: cover;
  background-position: center;
}

.suggestion-thumb::after {
  content: "▶";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 24px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(0, 0, 0, .78);
  font-size: 12px;
  line-height: 1;
}

.suggestion-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.25;
}

.suggestion-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.suggestion-card button {
  align-self: start;
  background: transparent;
  color: #eee;
  font-size: 25px;
}

.comments-section {
  max-width: 100%;
  padding: 24px 0 32px;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
}

.comments-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #f1f1f1;
  font-size: 14px;
  font-weight: 700;
}

.sort-button svg {
  width: 22px;
  height: 22px;
}

.comment-form,
.comment-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
}

.comment-form {
  margin-bottom: 26px;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-color, #3e7a25);
  color: #fff;
  font-weight: 700;
}

.comment-input-wrap {
  min-width: 0;
}

.comment-input-wrap input {
  width: 100%;
  height: 34px;
  border: 0;
  border-bottom: 1px solid #444;
  outline: 0;
  background: transparent;
  color: #f1f1f1;
  font-size: 15px;
}

.comment-input-wrap input:focus {
  border-bottom-color: #f1f1f1;
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.cancel-comment,
.send-comment {
  height: 36px;
  padding: 0 15px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 700;
}

.cancel-comment {
  background: transparent;
  color: #f1f1f1;
}

.send-comment {
  background: #3ea6ff;
  color: #07111a;
}

.comments-list {
  display: grid;
  gap: 22px;
}

.comment-copy {
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.comment-author {
  font-size: 13px;
  font-weight: 700;
}

.comment-time {
  color: var(--muted);
  font-size: 12px;
}

.comment-text {
  margin: 0 0 8px;
  color: #f1f1f1;
  font-size: 14px;
  line-height: 1.45;
}

.comment-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #d6d6d6;
  font-size: 13px;
}

.comment-tools button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: 700;
}

.comment-tools svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    padding-inline: 18px;
  }

  .brand-text,
  .country {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
    max-width: 960px;
  }

  body.results-mode .search-results-page {
    max-width: calc(100% - 108px);
    margin-left: 100px;
    padding-right: 14px;
  }

  .result-card {
    grid-template-columns: 320px minmax(0, 1fr) 28px;
    min-height: 180px;
  }

  .result-thumb {
    width: 320px;
    height: 180px;
  }

  .comments-section {
    grid-column: 1;
  }

  .mix-card {
    height: 520px;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .brand-area {
    gap: 14px;
  }

  .search-bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .header-actions {
    gap: 6px;
  }

  .create-button {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .layout {
    padding-inline: 8px;
  }

  body.results-mode .search-sidebar {
    display: none;
  }

  body.results-mode .search-results-page {
    max-width: none;
    margin: 0;
    padding: 10px 8px 32px;
  }

  .result-card {
    grid-template-columns: 1fr 28px;
    gap: 10px;
    min-height: 0;
  }

  .result-thumb {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  h1 {
    font-size: 18px;
  }

  .watch-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .channel-row {
    min-width: 0;
  }

  .action-row {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .mix-card {
    height: 470px;
  }

  .suggestion-card {
    grid-template-columns: 140px 1fr 22px;
  }

  .suggestion-thumb {
    height: 79px;
  }
}
