* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f7f8fa;
  color: #0f0f0f;
  font-family: Arial, Helvetica, sans-serif;
}
button { font: inherit; cursor: pointer; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
  padding: 0 22px;
  border-bottom: 1px solid #e7e9ee;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
}
.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
}
.icon-button:hover, .create:hover, .actions button:hover { background: #f2f2f2; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  font-size: 18px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 20px;
  border-radius: 6px;
  background: #246bfe;
  color: #fff;
  font-size: 12px;
}
.brand sup { color: #606060; font-size: 10px; font-weight: 400; }
.search {
  display: flex;
  flex: 1;
  max-width: 600px;
  height: 40px;
  margin: 0 auto;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d7dbe3;
  border-right: 0;
  border-radius: 22px 0 0 22px;
  padding: 0 18px;
  font-size: 16px;
}
.search button {
  width: 64px;
  border: 1px solid #d7dbe3;
  border-radius: 0 22px 22px 0;
  background: #f8f8f8;
  font-size: 26px;
}
.spacer { flex: .35; }
.create {
  min-height: 40px;
  border: 0;
  border-radius: 22px;
  padding: 0 18px;
  background: #edf2ff;
  color: #174ea6;
  font-weight: 700;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #174ea6;
  color: #fff;
  font-weight: 700;
}
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 20px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px 18px 36px;
}
.watch { min-width: 0; }
.player {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #dfe3ea;
  box-shadow: 0 18px 40px rgba(21, 32, 54, .14);
}
#player-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-shade {
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(transparent, rgba(0, 0, 0, .5));
  pointer-events: none;
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, .03);
  color: #fff;
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 800;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .75);
}
.play-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 22px;
  background: rgba(15, 23, 42, .82);
}
.play-overlay.loading span::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.play-overlay:disabled { cursor: not-allowed; }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 58px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .32);
  pointer-events: none;
}
#progress {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #246bfe;
}
.controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: center;
  pointer-events: none;
  gap: 18px;
  color: #fff;
  font-weight: 700;
}
.grow { flex: 1; }
h1 {
  margin: 18px 0 12px;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.25;
  letter-spacing: 0;
}
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.channel {
  display: flex;
  align-items: center;
  gap: 12px;
}
.channel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #174ea6, #34a853);
}
.channel small, article small { display: block; color: #606060; margin-top: 4px; }
.subscribe {
  min-height: 40px;
  border: 0;
  border-radius: 22px;
  padding: 0 18px;
  background: #174ea6;
  color: #fff;
  font-weight: 700;
}
.subscribe:disabled { opacity: .5; cursor: not-allowed; }
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button {
  min-height: 40px;
  border: 0;
  border-radius: 22px;
  padding: 0 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e4e7ee;
  font-weight: 700;
}
.notice {
  margin-top: 16px;
  border: 1px solid #dbe5ff;
  border-radius: 14px;
  padding: 16px 18px;
  background: #eef4ff;
}
.notice p { margin: 0; line-height: 1.45; }
#body { font-weight: 700; }
#status { margin-top: 8px; color: #40516f; min-height: 1.45em; }
.rail {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}
.chips {
  display: flex;
  gap: 8px;
  overflow: hidden;
}
.chips button {
  white-space: nowrap;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  font-weight: 700;
}
.chips button:first-child { background: #174ea6; color: #fff; }
article {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eceff5;
}
article img {
  width: 156px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  background: #eee;
}
article strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.3;
}
@media (max-width: 1100px) {
  .page { grid-template-columns: 1fr; }
  .rail { display: none; }
  .spacer, .topbar .icon-button:nth-last-of-type(-n+2), .create { display: none; }
}
@media (max-width: 640px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .brand { min-width: auto; font-size: 16px; }
  .brand strong { display: none; }
  .search { max-width: none; }
  .page { padding: 0 0 24px; }
  .player { border-radius: 0; }
  h1, .meta-row, .notice { margin-left: 12px; margin-right: 12px; }
  .controls { gap: 10px; font-size: 13px; }
}
