/* ==========================================================
   VIDEOS871 - YouTube Copy Sin Anuncios & Más
   Modern YouTube Dark Aesthetic (2026 Edition)
   ========================================================== */

:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #181818;
  --bg-tertiary: #222222;
  --bg-card: #1e1e1e;
  --bg-hover: #272727;
  --bg-input: #121212;
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: #3ea6ff;
  
  --text-primary: #f1f1f1;
  --text-secondary: #aaaaaa;
  --text-muted: #717171;
  
  --brand-red: #ff0033;
  --brand-red-hover: #cc0029;
  --brand-glow: rgba(255, 0, 51, 0.35);
  --accent-blue: #3ea6ff;
  --accent-green: #2ba640;
  
  --header-height: 56px;
  --sidebar-width: 240px;
  --sidebar-mini-width: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

/* AMOLED Theme */
body.theme-amoled {
  --bg-primary: #000000;
  --bg-secondary: #080808;
  --bg-tertiary: #121212;
  --bg-card: #0d0d0d;
  --bg-hover: #1c1c1c;
  --bg-input: #050505;
  --border-color: rgba(255, 255, 255, 0.15);
}

/* Cyberpunk Neon Theme */
body.theme-cyber {
  --bg-primary: #080914;
  --bg-secondary: #0f1124;
  --bg-tertiary: #191c3d;
  --bg-card: #12152e;
  --bg-hover: #212552;
  --brand-red: #ff0055;
  --brand-glow: rgba(255, 0, 85, 0.55);
  --accent-blue: #00f0ff;
  --border-color: rgba(0, 240, 255, 0.2);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  color: inherit;
}

input, select {
  font-family: inherit;
  color: inherit;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* SVG icons default */
svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================================
   Top Navigation Bar (Navbar)
   ========================================================== */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition);
}

.icon-btn:hover {
  background-color: var(--bg-hover);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.logo-badge {
  width: 36px;
  height: 26px;
  background: linear-gradient(135deg, var(--brand-red), #e60026);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px var(--brand-glow);
  transition: transform 0.2s ease;
}

.brand-logo:hover .logo-badge {
  transform: scale(1.06);
}

.play-svg {
  width: 14px;
  height: 14px;
  fill: #ffffff;
  margin-left: 2px;
}

.brand-text {
  display: flex;
  align-items: center;
  letter-spacing: -0.5px;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}

.brand-num {
  font-size: 19px;
  font-weight: 900;
  color: var(--brand-red);
  margin-left: 2px;
}

.brand-pill {
  font-size: 10px;
  font-weight: 800;
  background-color: var(--brand-red);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Search bar center */
.nav-center {
  flex: 0 1 720px;
  margin: 0 20px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  padding: 0 16px;
  height: 40px;
  transition: border-color 0.2s;
}

.search-input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.search-icon-inside {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  margin-right: 10px;
}

.search-input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 15px;
  color: var(--text-primary);
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
}

.clear-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.search-submit-btn {
  width: 64px;
  height: 40px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.search-submit-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

/* Search Suggestions dropdown */
.search-suggestions {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  z-index: 1100;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}

.suggestion-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s;
}

.suggestion-item:hover {
  background-color: var(--bg-hover);
}

/* Nav Right Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
}

.action-btn.highlight-btn {
  background-color: rgba(255, 0, 51, 0.15);
  color: #ff3355;
  border: 1px solid rgba(255, 0, 51, 0.35);
}

.action-btn.highlight-btn:hover {
  background-color: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
  box-shadow: 0 2px 12px var(--brand-glow);
}

.action-btn.secondary-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.action-btn.secondary-btn:hover {
  background-color: var(--bg-hover);
}

/* ==========================================================
   App Layout (Sidebar + Main)
   ========================================================== */
.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.2, 0, 0, 1), transform 0.25s ease;
}

.sidebar.collapsed {
  width: var(--sidebar-mini-width);
}

.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .extra-sources,
.sidebar.collapsed .nav-item span {
  display: none !important;
}

.sidebar.collapsed .nav-item {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 14px 4px;
  height: auto;
  gap: 6px;
}

.sidebar.collapsed .nav-item svg {
  margin: 0;
}

.sidebar-nav {
  padding: 12px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background-color: var(--bg-hover);
}

.nav-item.active {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: #ffffff;
}

.nav-item.active svg {
  fill: var(--brand-red);
}

.nav-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 10px 0;
}

.nav-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 14px 4px;
  letter-spacing: 0.5px;
}

.extra-sources {
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.source-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.red { background-color: var(--brand-red); box-shadow: 0 0 6px var(--brand-red); }
.dot.blue { background-color: #00adef; }
.dot.orange { background-color: #ff7700; }
.dot.purple { background-color: #9146ff; }
.dot.green { background-color: var(--accent-green); }

.sidebar-footer {
  padding: 18px 14px 10px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================
   Main Content Area
   ========================================================== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 40px;
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
}

/* Chips Bar */
.chips-container {
  position: sticky;
  top: 0;
  background-color: var(--bg-primary);
  padding: 12px 0 16px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  z-index: 90;
  scrollbar-width: none;
}

.chips-container::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 7px 14px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-primary);
  transition: var(--transition);
}

.chip:hover {
  background-color: var(--bg-hover);
}

.chip.active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: 600;
}

/* Hero AdBlock Banner */
.hero-adblock-banner {
  background: linear-gradient(135deg, rgba(255, 0, 51, 0.12), rgba(62, 166, 255, 0.08));
  border: 1px solid rgba(255, 0, 51, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 0, 51, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-red);
  flex-shrink: 0;
}

.hero-icon svg {
  width: 24px;
  height: 24px;
}

.hero-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.hero-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hero-btn {
  background-color: var(--brand-red);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.hero-btn:hover {
  background-color: var(--brand-red-hover);
  box-shadow: 0 2px 10px var(--brand-glow);
}

.hero-close-btn {
  font-size: 22px;
  color: var(--text-secondary);
  padding: 4px;
  line-height: 1;
}

.hero-close-btn:hover {
  color: #fff;
}

/* ==========================================================
   Feed Header & Video Cards Grid
   ========================================================== */
.feed-header {
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.feed-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

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

/* Video Card */
.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: transparent;
}

.video-card:hover {
  transform: translateY(-3px);
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .thumbnail-wrapper img {
  transform: scale(1.03);
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.source-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.source-badge.yt { border-left: 3px solid var(--brand-red); }
.source-badge.vimeo { border-left: 3px solid #00adef; }
.source-badge.local { border-left: 3px solid var(--accent-green); }

/* Card Info */
.card-details {
  display: flex;
  gap: 12px;
  padding: 10px 4px 4px;
}

.card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-meta {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-channel {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified-icon {
  width: 13px;
  height: 13px;
  fill: var(--text-muted);
}

.card-stats {
  font-size: 12px;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 54px;
  margin-bottom: 14px;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.primary-btn {
  background-color: var(--brand-red);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.primary-btn:hover {
  background-color: var(--brand-red-hover);
  box-shadow: 0 2px 14px var(--brand-glow);
}

/* ==========================================================
   Watch Page View (YouTube Player Clone)
   ========================================================== */
.watch-view {
  padding-top: 10px;
}

.watch-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 24px;
  max-width: 1750px;
  margin: 0 auto;
}

/* Player Wrapper & 16:9 Aspect Ratio */
.player-wrapper {
  width: 100%;
  background-color: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  aspect-ratio: 16 / 9;
  position: relative;
}

.player-container {
  width: 100%;
  height: 100%;
}

.player-container iframe,
.player-container video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background-color: #000;
}

.player-loading {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 14px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Player Pro Toolbar */
.player-pro-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-top: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.pro-tools-left,
.pro-tools-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-dropdown,
.tool-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.tool-select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.tool-btn:hover {
  background-color: var(--bg-hover);
}

.tool-btn.active {
  background-color: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

.tool-btn.download-highlight {
  background: linear-gradient(135deg, rgba(62, 166, 255, 0.2), rgba(62, 166, 255, 0.05));
  border-color: rgba(62, 166, 255, 0.4);
  color: var(--accent-blue);
}

.tool-btn.download-highlight:hover {
  background-color: var(--accent-blue);
  color: #000;
}

/* Video Information & Actions */
.video-info-box {
  margin-top: 14px;
}

.video-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.video-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.channel-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff0033, #7b1fa2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.channel-text {
  display: flex;
  flex-direction: column;
}

.channel-name {
  font-size: 15px;
  font-weight: 700;
}

.channel-subs {
  font-size: 12px;
  color: var(--text-muted);
}

.sub-btn {
  background-color: #ffffff;
  color: #0f0f0f;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  margin-left: 8px;
  transition: var(--transition);
}

.sub-btn:hover {
  background-color: #d9d9d9;
}

.sub-btn.subscribed {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.engagement-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-group {
  display: flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.btn-group .action-pill {
  background: transparent;
  border: none;
  border-radius: 0;
}

.pill-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border-color);
}

.action-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
}

.action-pill:hover {
  background-color: var(--bg-hover);
}

.action-pill.active {
  color: var(--brand-red);
}

/* Description Box */
.video-description-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.desc-stats {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.adfree-tag {
  color: #00e676;
  font-weight: 700;
  margin-left: 4px;
}

.desc-body {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 70px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.desc-body.expanded {
  max-height: 1000px;
}

.desc-expand-btn {
  margin-top: 8px;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 13px;
}

.desc-expand-btn:hover {
  color: #fff;
}

/* Comments Section */
.comments-section {
  margin-top: 24px;
}

.comments-header {
  margin-bottom: 20px;
}

.comments-header h3 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-count-badge {
  font-size: 14px;
  color: var(--text-muted);
}

.comment-input-row {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.user-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--brand-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.comment-input-box {
  flex: 1;
}

.comment-input-box input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.comment-input-box input:focus {
  border-color: #ffffff;
}

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

.btn-text {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
}

.btn-text:hover {
  background-color: var(--bg-hover);
  color: #fff;
}

.btn-primary {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background-color: var(--accent-blue);
  color: #0f0f0f;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: #65b8ff;
}

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

.comment-card {
  display: flex;
  gap: 14px;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

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

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

.comment-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.comment-actions button {
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-actions button:hover {
  color: var(--text-primary);
}

/* Related Column */
.related-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.related-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.related-card:hover {
  background-color: var(--bg-secondary);
}

.related-thumb {
  position: relative;
  width: 150px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-tertiary);
  flex-shrink: 0;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-meta {
  flex: 1;
  min-width: 0;
}

.related-title-text {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-channel-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.related-stats-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================
   Modals
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  animation: modalIn 0.25s cubic-bezier(0.2, 0, 0, 1);
  overflow: hidden;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.close-modal-btn {
  font-size: 24px;
  line-height: 1;
  color: var(--text-secondary);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal-btn:hover {
  background-color: var(--bg-hover);
  color: #fff;
}

.modal-body {
  padding: 20px;
}

.modal-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.modal-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.modal-input:focus {
  border-color: var(--border-focus);
}

.paste-clipboard-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.paste-clipboard-btn:hover {
  background-color: var(--bg-hover);
}

.quick-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.example-tag {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.example-tag:hover {
  background-color: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-secondary);
}

/* Settings Items */
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item strong {
  font-size: 14px;
  display: block;
}

.setting-item p {
  font-size: 12px;
  color: var(--text-secondary);
}

.modal-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
}

.btn-danger {
  background-color: rgba(255, 0, 51, 0.2);
  color: #ff4d6a;
  border: 1px solid rgba(255, 0, 51, 0.4);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.btn-danger:hover {
  background-color: var(--brand-red);
  color: #ffffff;
}

/* Playlist modal items */
.playlist-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.playlist-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.playlist-option-item:hover {
  background-color: var(--bg-hover);
}

.new-playlist-creator {
  display: flex;
  gap: 8px;
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #282828;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 3000;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Cinema Mode Active Styles */
body.cinema-mode-active .watch-layout {
  grid-template-columns: 1fr;
  max-width: 1400px;
}

body.cinema-mode-active .player-wrapper {
  max-height: 78vh;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.95);
}

body.cinema-mode-active .related-column {
  margin-top: 30px;
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */
@media (max-width: 1200px) {
  .watch-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.6);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .nav-center {
    margin: 0 10px;
  }
}

@media (max-width: 650px) {
  .brand-pill {
    display: none;
  }
  
  .action-btn span {
    display: none;
  }

  .main-content {
    padding: 0 12px 30px;
  }

  .hero-adblock-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
