/* Aplikasi YouTube */

.yt {
  background: var(--bg);
  --ytsub: #606060;
}
.screen.dark .yt {
  --ytsub: #aaa;
}
.yt.dark {
  background: #000;
  color: #fff;
}

/* Header & chip */
.yt-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px 12px 6px;
  background: var(--bg);
}
.yt-logo {
  display: flex;
  align-items: center;
  gap: 3px;
}
.yt-logo svg {
  width: 30px;
  height: 21px;
}
.yt-logo b {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 21px;
  letter-spacing: -1px;
}
.yt-head-r {
  display: flex;
  align-items: center;
  gap: 18px;
}
.yt-head-r svg {
  width: 23px;
  height: 23px;
  display: block;
}
.yt-bell {
  position: relative;
}
.yt-bell em {
  position: absolute;
  top: -6px;
  right: -9px;
  padding: 0 4px;
  border-radius: 8px;
  background: #cc0000;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 15px;
}
.yt-chips {
  flex: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 12px 10px;
  scrollbar-width: none;
}
.yt-chips::-webkit-scrollbar {
  display: none;
}
.yt-chips button {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--fill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.yt-chips button.on {
  background: var(--text);
  color: var(--bg);
}

/* Kartu video */
.yt-card {
  margin-bottom: 18px;
  cursor: pointer;
}
.yt-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #222;
  overflow: hidden;
}
.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-dur {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.yt-info {
  display: flex;
  gap: 12px;
  padding: 10px 12px 0;
}
.yt-info .av {
  width: 36px;
  height: 36px;
}
.yt-info > div {
  flex: 1;
  min-width: 0;
}
.yt-info b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}
.yt-info small,
.yt-wtitle small {
  display: block;
  margin-top: 3px;
  color: var(--ytsub);
  font-size: 12px;
}
.yt-dots {
  color: var(--text);
}
.yt-dots svg {
  width: 18px;
  height: 18px;
}

/* Rak Shorts */
.yt-shelf {
  padding: 4px 0 18px;
  border-top: 6px solid var(--fill2);
  border-bottom: 6px solid var(--fill2);
  margin-bottom: 18px;
}
.yt-shelf h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 12px;
  font-size: 18px;
}
.yt-shelf h3 svg {
  width: 26px;
  height: 26px;
}
.yt-shorts-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 12px;
  scrollbar-width: none;
}
.yt-shorts-row::-webkit-scrollbar {
  display: none;
}
.yt-short-card {
  position: relative;
  flex: none;
  width: 170px;
  height: 290px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  text-align: left;
}
.yt-short-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-short-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 8px 8px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}
.yt-short-card b {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.yt-short-card small {
  font-size: 12px;
  opacity: 0.85;
}

/* Halaman tonton */
.yt-watch {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(#000 44px, var(--bg) 44px);
}
.yt-player {
  position: relative;
  flex: none;
  margin-top: 44px;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}
.yt-player > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.yt-player.playing > img {
  animation: ytZoom 12s ease-in-out infinite alternate;
}
@keyframes ytZoom {
  to {
    transform: scale(1.06);
  }
}
.yt-down {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #fff;
}
.yt-down svg {
  width: 26px;
  height: 26px;
}
.yt-pbtn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: grid;
  place-items: center;
  transition: opacity 0.3s;
}
.yt-pbtn svg {
  width: 30px;
  height: 30px;
}
.yt-player.playing .yt-pbtn {
  opacity: 0;
}
.yt-player.playing:hover .yt-pbtn {
  opacity: 1;
}
.yt-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
}
.yt-progress i {
  display: block;
  height: 100%;
  width: 4%;
  background: #f00;
}
.yt-player.playing .yt-progress i {
  animation: ytProgress 220s linear forwards;
}
@keyframes ytProgress {
  to {
    width: 100%;
  }
}
.yt-time {
  position: absolute;
  left: 10px;
  bottom: 8px;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.yt-wtitle {
  padding: 12px 12px 4px;
}
.yt-wtitle h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.yt-wtitle small b {
  color: var(--text);
}
.yt-chan {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.yt-chan .av {
  width: 36px;
  height: 36px;
}
.yt-chan small {
  flex: 1;
  color: var(--ytsub);
  font-size: 12px;
}
.yt-subbtn {
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.yt-subbtn.on {
  background: var(--fill);
  color: var(--text);
}
.yt-subbtn svg {
  width: 18px;
  height: 18px;
}
.yt-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 12px 10px;
  scrollbar-width: none;
}
.yt-actions::-webkit-scrollbar {
  display: none;
}
.yt-actions > button,
.yt-like {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--fill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.yt-like {
  padding: 0;
}
.yt-like button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
}
.yt-like button + button {
  border-left: 1px solid var(--sep);
}
.yt-actions svg {
  width: 20px;
  height: 20px;
}
.yt-desc {
  margin: 0 12px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fill2);
  font-size: 14px;
}
.yt-comments {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fill2);
  text-align: left;
}
.yt-comments b {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}
.yt-comments b small {
  color: var(--ytsub);
  font-weight: 400;
}
.yt-comments span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.yt-comments .av {
  width: 24px;
  height: 24px;
}

/* Shorts */
.yt-shorts {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.yt-shorts::-webkit-scrollbar {
  display: none;
}
.yt-short {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  overflow: hidden;
}
.yt-sblur {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  object-fit: cover;
  filter: blur(22px) brightness(0.5);
}
.yt-simg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.yt-shorts-head {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  color: #fff;
  pointer-events: none;
}
.yt-shorts-head span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 19px;
}
.yt-shorts-head svg {
  width: 26px;
  height: 26px;
}
.yt-shorts-head button {
  color: #fff;
  pointer-events: auto;
}
.yt-srail {
  position: absolute;
  right: 8px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.yt-srail button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.yt-srail svg {
  width: 30px;
  height: 30px;
}
.yt-scap {
  position: absolute;
  left: 12px;
  right: 80px;
  bottom: 24px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.yt-scap div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yt-scap .av {
  width: 32px;
  height: 32px;
}
.yt-scap button {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 600;
}
.yt-scap p {
  margin: 8px 0 0;
  font-size: 15px;
}

/* Subscription & Anda */
.yt-subrow {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 12px;
  scrollbar-width: none;
}
.yt-subrow::-webkit-scrollbar {
  display: none;
}
.yt-subrow button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: none;
  font-size: 11px;
}
.yt-subrow .av {
  width: 56px;
  height: 56px;
}
.yt-all {
  align-self: center;
  color: #065fd4;
  font-weight: 600;
  font-size: 14px !important;
}
.yt-me {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 12px 10px;
}
.yt-me .av {
  width: 72px;
  height: 72px;
}
.yt-me h2 {
  margin: 0;
  font-size: 22px;
}
.yt-me small {
  color: var(--ytsub);
}
.yt-me small b {
  color: var(--text);
  font-weight: 500;
}
.yt-sec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
}
.yt-sec b {
  font-size: 19px;
}
.yt-sec button {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid var(--sep);
  font-size: 13px;
  font-weight: 500;
}
.yt-hrow {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 12px 6px;
  scrollbar-width: none;
}
.yt-hrow::-webkit-scrollbar {
  display: none;
}
.yt-hcard {
  flex: none;
  width: 160px;
  text-align: left;
  padding: 0;
}
.yt-hcard .yt-thumb {
  border-radius: 10px;
}
.yt-hcard b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
}
.yt-hcard small {
  color: var(--ytsub);
  font-size: 12px;
}
.yt-list {
  margin-top: 8px;
  border-top: 0.5px solid var(--sep);
}
.yt-li {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 13px 16px;
  font-size: 15px;
}
.yt-li svg {
  width: 22px;
  height: 22px;
}

/* Navigasi bawah */
.yt-nav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 4px 26px;
  background: var(--bg);
  border-top: 0.5px solid var(--sep);
}
.yt.dark .yt-nav {
  background: #0f0f0f;
  border-top-color: #272727;
}
.yt-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text);
  opacity: 0.75;
}
.yt.dark .yt-nav button {
  color: #fff;
}
.yt-nav button.on {
  opacity: 1;
  font-weight: 600;
}
.yt-nav svg {
  width: 24px;
  height: 24px;
}
.yt-nav .av {
  width: 24px;
  height: 24px;
}
.yt-nav button.on .av {
  box-shadow: 0 0 0 2px var(--text);
}
.yt-add {
  opacity: 1 !important;
}
.yt-add svg {
  width: 40px;
  height: 40px;
  padding: 7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
