html, body {
  margin: 0;
  padding: 0;
  background: #0f0f0f;
  color: #fff;
  font-family: Roboto, Arial, sans-serif;
}

/* ── HEADER ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  border-bottom: 1px solid #272727;
}

.header-left, .header-right { display: flex; align-items: center; gap: 8px; }
.header-center { flex: 1; display: flex; justify-content: center; max-width: 640px; margin: 0 auto; }

.logo {
  display: flex; align-items: center; gap: 6px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.search-wrap { display: flex; width: 100%; }

.search-input {
  width: 100%;
  background: #121212;
  border: 1px solid #303030;
  border-right: none;
  border-radius: 20px 0 0 20px;
  padding: 8px 16px;
  color: #fff;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.search-input:focus { border-color: #3ea6ff; }

.search-btn {
  background: #222;
  border: 1px solid #303030;
  border-radius: 0 20px 20px 0;
  padding: 8px 20px;
  cursor: pointer;
}
.search-btn:hover { background: #333; }

.yt-link {
  display: flex; align-items: center;
  padding: 6px; border-radius: 50%;
  text-decoration: none;
}
.yt-link:hover { background: #272727; }

/* ── CONTENT ── */
.content {
  margin-top: 56px;
  padding: 24px;
}

/* ── VIDEO GRID ── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ── VIDEO CARD ── */
.video-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.card-dur {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 5px;
  border-radius: 4px;
}

.card-info {
  display: flex;
  gap: 12px;
  padding: 12px 0 0 0;
}

.card-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #333;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.card-text { flex: 1; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-channel { font-size: 13px; color: #aaa; margin-top: 2px; }
.card-meta { font-size: 13px; color: #aaa; }

/* ── EMPTY STATE / LOADING ── */
.empty-state {
  display: none;
  text-align: center;
  padding: 80px 20px;
  color: #555;
}
.empty-state svg { margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

.loading, .error {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: #aaa;
}
.error { color: #f44; }

/* ── WATCH LAYOUT ── */
.watch-layout {
  margin-top: 56px;
  display: flex;
  max-width: 1800px;
  margin-left: auto;
  margin-right: auto;
}

.watch-main { flex: 1; padding: 24px; max-width: 1280px; }

.player-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.player-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── VIDEO INFO ── */
.info { padding: 16px 0; }

.info-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
}

.info-meta { font-size: 14px; color: #aaa; margin-bottom: 16px; }
.info-dot { margin: 0 6px; }

.info-channel {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #272727;
  border-bottom: 1px solid #272727;
}

.channel-info { flex: 1; }
.channel-name { font-size: 15px; font-weight: 600; }

.subscribe-btn {
  background: #fff; color: #000;
  border: none; border-radius: 18px;
  padding: 9px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.subscribe-btn:hover { background: #e5e5e5; }

.info-actions {
  display: flex; gap: 8px;
  padding: 12px 0;
}

.action-btn {
  display: flex; align-items: center; gap: 6px;
  background: #272727; color: #fff;
  border: none; border-radius: 18px;
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.action-btn:hover { background: #3f3f3f; }

.info-desc {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #ddd;
  white-space: pre-wrap;
  margin-top: 12px;
}

/* ── SIDEBAR ── */
.watch-sidebar {
  width: 400px; flex-shrink: 0;
  padding: 24px 16px 24px 24px;
}
.sidebar-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .watch-layout { flex-direction: column; }
  .watch-sidebar { width: 100%; padding: 16px 24px; }
}

@media (max-width: 768px) {
  .video-grid { grid-template-columns: 1fr; }
  .header-center { display: none; }
  .content, .watch-main { padding: 12px; }
}