/* ==========================================================================
   HostTube Modern Stylesheet
   YouTube-Authentic Dark Theme & Studio Aesthetics
   ========================================================================== */

:root {
  --bg-primary: #0a0a0d;
  --bg-secondary: #121217;
  --bg-surface: #1e1e24;
  --bg-hover: #292932;
  --bg-active: #353542;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3ea6ff;
  --text-primary: #f4f4f7;
  --text-secondary: #a0a0ab;
  --text-muted: #6e6e7a;
  
  /* HostTube Brand Accent */
  --brand-red: #ff003f;
  --brand-red-hover: #e00037;
  --brand-gradient: linear-gradient(135deg, #ff003f 0%, #ff5252 100%);
  --yt-blue: #3ea6ff;
  --yt-blue-hover: #65b8ff;
  --success-green: #00e676;
  
  --navbar-height: 58px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 72px;
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #33333d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555566;
}

/* Base Icons & Buttons */
.icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.icon-btn:hover {
  background-color: var(--bg-hover);
}

/* ==========================================================================
   Header / Navbar & HostTube Brand Logo
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background-color: rgba(10, 10, 13, 0.96);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

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

/* HostTube Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.hosttube-icon-wrapper {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}
.brand-logo:hover .hosttube-icon-wrapper {
  transform: scale(1.08);
}

.hosttube-icon {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(255, 0, 63, 0.4));
}

.brand-text {
  display: flex;
  align-items: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.5px;
}

.brand-host {
  color: #ffffff;
}

.brand-tube {
  color: #ff2d55;
  margin-right: 4px;
}

.brand-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--brand-gradient);
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  vertical-align: top;
  margin-top: -10px;
}

/* Search Bar Area */
.nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 700px;
  justify-content: center;
  margin: 0 16px;
}

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

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input-wrapper input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 40px 0 0 40px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
  border-color: #3ea6ff;
  box-shadow: 0 0 0 1px #3ea6ff;
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: none;
}

.search-btn {
  height: 40px;
  width: 64px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0 40px 40px 0;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.search-btn:hover {
  background-color: var(--bg-hover);
}

.mic-btn {
  background-color: var(--bg-surface);
  width: 40px;
  height: 40px;
}

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

.create-video-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.create-video-btn:hover {
  background-color: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
}
.create-video-btn .icon {
  width: 18px;
  height: 18px;
  color: var(--brand-red);
}

.notification-btn {
  position: relative;
}
.mbn-item { position: relative; }
.mbn-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: #cc0000;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}
.mobile-notif-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: none;
  flex-direction: column;
}
.mobile-notif-screen.show { display: flex; }
.mobile-notif-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}
.mobile-notif-back {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.mobile-notif-back:hover { background: var(--hover-bg); }
.mobile-notif-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.mobile-notif-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}
.mobile-notif-tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
}
.mobile-notif-tab.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}
.mobile-notif-list { flex: 1; overflow-y: auto; }
.mobile-notif-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}
.mobile-notif-item .notif-thumb {
  width: 90px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}
.badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--brand-gradient);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

.login-header-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: var(--yt-blue);
  border: 1px solid rgba(62, 166, 255, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.login-header-btn:hover {
  background-color: rgba(62, 166, 255, 0.1);
  border-color: var(--yt-blue);
}

/* User Menu */
.user-menu-wrapper {
  position: relative;
}
.user-avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-smooth);
  overflow: hidden;
}
.user-avatar-btn:hover {
  border-color: var(--brand-red);
}
.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 45px;
  width: 240px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 1001;
}
.user-dropdown.show {
  display: block;
}
.dropdown-user-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}
.dropdown-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.dropdown-handle {
  font-size: 12px;
  color: var(--text-secondary);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background-color var(--transition-smooth);
}
.dropdown-item:hover {
  background-color: var(--bg-hover);
}
.dropdown-item.danger {
  color: #ff5252;
}

/* "Gerenciar conta" submenu */
.dropdown-item.has-submenu {
  justify-content: space-between;
}
.dropdown-caret {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-smooth);
}
.dropdown-item.has-submenu.open .dropdown-caret {
  transform: rotate(180deg);
}
.dropdown-submenu {
  display: none;
  background-color: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.dropdown-submenu.open {
  display: block;
}
.dropdown-submenu .dropdown-item {
  padding-left: 30px;
  font-size: 13px;
}
body.light-theme .dropdown-submenu {
  background-color: rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   Main Layout & Sidebar
   ========================================================================== */
.main-layout {
  display: flex;
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
}

.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  position: sticky;
  top: var(--navbar-height);
  background-color: var(--bg-primary);
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  transition: width 0.25s ease;
  border-right: 1px solid var(--border-color);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-heading .arrow {
  color: var(--text-secondary);
  font-size: 16px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  border-radius: 10px;
  transition: var(--transition-smooth);
}
.sidebar-item:hover {
  background-color: var(--bg-hover);
}
.sidebar-item.active {
  background-color: var(--bg-surface);
  font-weight: 600;
}
.sidebar-item.active .icon {
  fill: var(--brand-red);
}
.sidebar-item.studio-entry {
  font-weight: 500;
}
.sidebar-item.studio-entry .icon {
  fill: var(--brand-red);
}
.sidebar-item.studio-entry::after {
  content: "NOVO";
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--brand-red);
  border-radius: 4px;
  padding: 2px 5px;
}

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

.sub-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sub-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  border-radius: 10px;
  transition: var(--transition-smooth);
  cursor: pointer;
}
.sub-item:hover {
  background-color: var(--bg-hover);
}
.sub-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-footer {
  padding: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.sidebar-footer .copyright {
  margin-top: 8px;
}

/* Sidebar collapsed */
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  padding: 8px 4px;
}
body.sidebar-collapsed .sidebar-item {
  flex-direction: column;
  gap: 6px;
  padding: 14px 4px;
  text-align: center;
  font-size: 10px;
}
body.sidebar-collapsed .sidebar-item .icon {
  width: 22px;
  height: 22px;
}
body.sidebar-collapsed .sidebar-heading,
body.sidebar-collapsed .sidebar-divider,
body.sidebar-collapsed .sub-list,
body.sidebar-collapsed .sidebar-footer,
body.sidebar-collapsed .sidebar-section:nth-of-type(n+2) {
  display: none;
}

/* ==========================================================================
   Content Area & Category Chips
   ========================================================================== */
.content-area {
  flex: 1;
  padding: 12px 24px 48px;
  overflow-x: hidden;
}

/* Search filters (YouTube-like) */
.chips-row-wrapper { position: relative; }
.chip-filter {
  display: none;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-hover);
  border-color: transparent;
  font-weight: 600;
}
.chip-filter.show { display: inline-flex; }
.chip-filter .icon { width: 18px; height: 18px; fill: currentColor; }
.chip-filter.open { background-color: var(--text-primary); color: var(--bg-primary); }

.search-filters-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  width: min(680px, 92vw);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 18px 20px 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.filter-group { padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.filter-group:first-child { padding-top: 0; }
.filter-group-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text-primary); }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-opt {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: transparent;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.filter-opt:hover { background-color: var(--bg-hover); }
.filter-opt.active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: 600;
}
.filters-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; }
.filters-clear {
  background: transparent; border: none; color: var(--text-secondary);
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 12px;
}
.filters-apply {
  background: var(--brand-gradient); border: none; color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 9px 22px; border-radius: 999px;
}

/* Search results: channels row */
.search-channels { margin-bottom: 22px; }
.search-channels-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.search-channels-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.search-channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}
.search-channel-card:hover { background-color: var(--bg-hover); }
.search-channel-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.search-channel-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.search-channel-name { font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-channel-handle { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chips-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 4px 0 16px 0;
  position: sticky;
  top: var(--navbar-height);
  background-color: var(--bg-primary);
  z-index: 100;
}
.chips-container::-webkit-scrollbar {
  display: none;
}

.chip {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.chip:hover {
  background-color: var(--bg-hover);
}
.chip.active {
  background-color: #f4f4f7;
  color: #0a0a0d;
  font-weight: 600;
}

.search-feedback {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.clear-search-link {
  background: none;
  border: none;
  color: var(--yt-blue);
  cursor: pointer;
  text-decoration: underline;
}

/* ==========================================================================
   Video Grid & Cards
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px 16px;
}

.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.video-card:hover .thumbnail-img {
  transform: scale(1.04);
}

.thumbnail-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #1a1a22;
  border-radius: 12px;
  overflow: hidden;
}

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

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(10, 10, 14, 0.88);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.video-details {
  display: flex;
  gap: 12px;
  padding: 12px 2px 4px;
}

.channel-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.video-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.video-channel {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}
.video-channel .verified-channel-name {
  margin-right: 2px;
}
.video-channel .verified-channel-name {
  font-weight: 500;
}
.video-channel:hover {
  color: var(--text-primary);
}

.verified-icon {
  width: 32px;
  height: 32px;
  display: inline-block;
  vertical-align: -5px;
  margin-left: 4px;
  object-fit: contain;
}

.official-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 8px 1px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd23f, #ff9d00);
  color: #3a2600;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.7;
  vertical-align: middle;
  white-space: nowrap;
  flex-shrink: 0;
}
.official-badge .official-icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
}
.channel-headline .official-badge {
  font-size: 12px;
  padding: 3px 11px 3px 9px;
  line-height: 1.6;
}
.channel-headline .official-badge .official-icon {
  width: 13px;
  height: 13px;
}

.video-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   YouTube-Style Channel Page
   ========================================================================== */
.channel-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.channel-banner-container {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  background-color: #1a1a22;
}

.channel-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-header-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 4px 12px 16px;
}

.channel-avatar-huge {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 3px solid var(--bg-surface);
}

.channel-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-headline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
#channel-verified-icon {
  display: inline-flex;
  align-items: center;
}
#channel-verified-icon .verified-icon {
  width: 36px;
  height: 36px;
}

.channel-headline h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-headline h1.verified-channel-name,
.verified-channel-name {
  color: #3ea6ff;
}

body.light-theme .channel-headline h1.verified-channel-name,
body.light-theme .verified-channel-name {
  color: #ff0000 !important;
}

.channel-stats-line {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-bio-snippet {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.45;
}

.channel-action-row {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.channel-action-btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.channel-action-btn-secondary:hover {
  background-color: var(--bg-hover);
}

.channel-tabs-nav {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
}

.c-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 6px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}
.c-tab-btn:hover {
  color: var(--text-primary);
}
.c-tab-btn.active {
  color: var(--text-primary);
}
.c-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--text-primary);
}

.channel-tab-pane {
  padding-top: 16px;
}

.channel-posts-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 12px 32px;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feed-posts-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.posts-loading,
.posts-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 36px 20px;
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  background-color: var(--bg-secondary);
}
.posts-empty p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.posts-empty span {
  font-size: 13px;
}

.post-composer {
  display: none;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.post-composer-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-composer-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.post-composer-head-text strong {
  font-size: 14px;
  font-weight: 600;
}
.post-composer-head-text span {
  font-size: 12px;
  color: var(--text-secondary);
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--bg-hover);
  flex-shrink: 0;
}

.post-composer-text {
  width: 100%;
  min-height: 64px;
  max-height: 240px;
  resize: vertical;
  background-color: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.post-composer-text::placeholder {
  color: var(--text-muted);
}

.post-composer-image {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  max-height: 360px;
}
.post-composer-image img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}
.post-composer-image button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.post-composer-image button:hover {
  background-color: #000;
}

.post-poll-builder {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
}
.post-poll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.post-poll-head > span {
  font-size: 13px;
  font-weight: 600;
}
.post-poll-head button {
  background: none;
  border: none;
  color: var(--yt-blue);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.post-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-poll-option-input {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.post-poll-option-input:focus {
  border-color: var(--border-focus);
}
.post-poll-add {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--yt-blue);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.post-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}
.post-composer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.post-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  border-radius: 18px;
  padding: 7px 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.post-tool-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}
.post-tool-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.post-theme-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}
.post-category-select {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 18px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.post-category-select:focus {
  border-color: var(--border-focus);
}
.post-composer-submit {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.post-composer-submit .yt-blue-btn {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 18px;
}
.post-composer-submit .yt-blue-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.post-compose-error {
  color: #ff6b6b;
  font-size: 12px;
  max-width: 260px;
  text-align: right;
}

.post-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
}
.post-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.post-head-info {
  flex: 1;
  min-width: 0;
}
.post-channel-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.post-channel-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  flex-wrap: wrap;
}
.post-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  white-space: nowrap;
}
.post-category-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.9;
}
.post-category-programacao {
  color: #c58cff;
  background-color: rgba(155, 89, 255, 0.14);
  border-color: rgba(155, 89, 255, 0.42);
}
.post-category-tecnologia {
  color: #65b8ff;
  background-color: rgba(62, 166, 255, 0.14);
  border-color: rgba(62, 166, 255, 0.42);
}
.post-category-jogos {
  color: #67e8a5;
  background-color: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.4);
}
.post-category-ao-vivo {
  color: #ff7b8f;
  background-color: rgba(255, 0, 63, 0.14);
  border-color: rgba(255, 0, 63, 0.42);
}
.post-category-design {
  color: #ff8fc7;
  background-color: rgba(255, 64, 160, 0.14);
  border-color: rgba(255, 64, 160, 0.42);
}
.post-category-geral {
  color: #c4c4cf;
  background-color: rgba(160, 160, 171, 0.12);
  border-color: rgba(160, 160, 171, 0.38);
}
.post-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}
.post-delete-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.post-delete-btn:hover {
  color: #ff6b6b;
  background-color: var(--bg-hover);
}
.post-text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-image {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background-color: #000;
  border-radius: 12px;
  margin-top: 12px;
}
.post-poll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.post-poll-option {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.post-poll-option:hover {
  border-color: var(--text-muted);
}
.post-poll-option.selected {
  border-color: var(--yt-blue);
}
.post-poll-bar {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.post-poll-bar > span {
  display: block;
  height: 100%;
  background-color: rgba(62, 166, 255, 0.18);
  transition: width 0.25s ease;
}
.post-poll-option.selected .post-poll-bar > span {
  background-color: rgba(62, 166, 255, 0.3);
}
.post-poll-option-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
}
.post-poll-option-text {
  font-weight: 500;
  word-break: break-word;
}
.post-poll-check {
  color: var(--yt-blue);
  margin-left: 6px;
  font-weight: 700;
}
.post-poll-option-count {
  color: var(--text-secondary);
  font-size: 12px;
  flex-shrink: 0;
}
.post-poll-total {
  color: var(--text-secondary);
  font-size: 12px;
  padding-left: 2px;
}

/* Channel Shorts tab */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 22px 16px;
  padding: 4px 12px 8px;
}
.short-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}
.short-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-surface);
}
.short-card-thumb img,
.short-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.short-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.short-card-views {
  font-size: 12px;
  color: var(--text-secondary);
}
.shorts-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.shorts-empty-state p {
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .channel-tabs-nav {
    gap: 4px;
    overflow-x: auto;
    padding: 0 6px;
    scrollbar-width: none;
  }
  .channel-tabs-nav::-webkit-scrollbar {
    display: none;
  }
  .c-tab-btn {
    font-size: 14px;
    padding: 12px 10px;
    white-space: nowrap;
  }
  .shorts-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 16px 12px;
    padding: 4px 8px 8px;
  }
  .short-card-title {
    font-size: 13px;
  }
}


.channel-about-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding: 12px;
}

.about-desc-card,
.about-details-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}

.about-desc-card h3,
.about-details-card h3 {
  font-size: 17px;
  margin-bottom: 14px;
}

.about-desc-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.detail-label {
  color: var(--text-muted);
}
.detail-row-link {
  align-items: center;
  gap: 12px;
}
.about-channel-link-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 72%;
}
.about-channel-link {
  color: var(--yt-blue);
  font-size: 13px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.about-channel-link:hover {
  text-decoration: underline;
}
.about-copy-link-btn {
  flex-shrink: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.about-copy-link-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

/* ==========================================================================
   Featured Video Spotlight (channel page)
   ========================================================================== */
.channel-featured-wrap {
  padding: 0 12px;
}
.featured-heading {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.featured-video-card {
  display: flex;
  gap: 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.featured-video-card:hover {
  background-color: var(--bg-hover);
}
.featured-thumb-wrap {
  position: relative;
  width: 380px;
  max-width: 45%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background-color: #1a1a22;
}
.featured-thumb-wrap .thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-info {
  flex: 1;
  padding: 14px 16px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.featured-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Channel Customization (YouTube Studio-style dialog)
   ========================================================================== */
.studio-dialog {
  position: relative;
  width: 96%;
  max-width: 1080px;
  height: 88vh;
  max-height: 760px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  z-index: 10;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  flex-shrink: 0;
}
.studio-topbar h3 {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.studio-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.studio-save-status {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.studio-topbar .yt-blue-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.studio-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.studio-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 230px;
  flex-shrink: 0;
  padding: 16px 8px;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.studio-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}
.studio-tab:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}
.studio-tab.active {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
}
.studio-tab .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.studio-side-nav .studio-tab.active {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--yt-blue);
}

.studio-panes {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  background-color: var(--bg-secondary);
}

.studio-pane {
  display: none;
  flex-direction: column;
  gap: 18px;
}
.studio-pane.active {
  display: flex;
}

.studio-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.studio-card-head h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.studio-card-head p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.studio-url-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.studio-url-label {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.studio-url-value {
  font-size: 13px;
  color: var(--yt-blue);
  word-break: break-all;
}

.branding-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.branding-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.branding-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.branding-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background-color: var(--bg-primary);
}
.branding-banner-preview {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 2048 / 423;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
}

.preview-orientation-tag {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
}
.preview-orientation-tag.vertical {
  background-color: rgba(0, 230, 118, 0.14);
  color: var(--success-green);
}
.preview-orientation-tag.horizontal {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* ==========================================================================
   Collapsible video description (watch modal)
   ========================================================================== */
.modal-description-box #watch-description-text,
.modal-description-box #modal-description-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.modal-description-box.expanded #watch-description-text,
.modal-description-box.expanded #modal-description-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.desc-toggle-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0 0;
  margin-top: 4px;
}
.desc-toggle-btn:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   YouTube-Style Video Player Modal
   ========================================================================== */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.video-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 94%;
  max-width: 1040px;
  max-height: 92vh;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  z-index: 10;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.modal-close-btn:hover {
  background-color: var(--brand-red);
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
}
.player-wrapper video,
.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-info {
  padding: 20px 24px;
}

.modal-info h2 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-channel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.channel-info .channel-name {
  font-weight: 600;
  font-size: 15px;
}
.channel-info .channel-subs {
  font-size: 12px;
  color: var(--text-secondary);
}

.subscribe-btn {
  background-color: #ffffff;
  color: #0a0a0d;
  border: none;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 8px;
  transition: var(--transition-smooth);
}
.subscribe-btn:hover {
  opacity: 0.9;
}
.subscribe-btn.subscribed {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.like-dislike-pill {
  display: flex;
  background-color: var(--bg-surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.pill-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.pill-btn:hover {
  background-color: var(--bg-hover);
}
.pill-btn.active {
  color: var(--yt-blue);
}
.pill-separator {
  width: 1px;
  background-color: var(--border-color);
  margin: 6px 0;
}

.action-pill-btn {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.action-pill-btn:hover {
  background-color: var(--bg-hover);
}

.modal-description-box {
  background-color: var(--bg-surface);
  padding: 16px 18px;
  border-radius: 12px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--border-color);
}
.modal-description-box .meta-row {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
}

/* ==========================================================================
   YouTube-Identical Comments Section
   ========================================================================== */
.comments-top-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
}
.comments-top-bar h3 {
  font-size: 19px;
  font-weight: 700;
}
.sort-comments-wrapper {
  position: relative;
}
.sort-comments-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 18px;
  transition: var(--transition-smooth);
}
.sort-comments-btn:hover {
  background-color: var(--bg-hover);
}
.sort-comments-menu {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  min-width: 230px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 30;
}
.sort-comments-menu.open {
  display: block;
}
.sort-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color var(--transition-smooth);
}
.sort-option:hover {
  background-color: var(--bg-hover);
}
.sort-option.active {
  color: var(--yt-blue);
  font-weight: 600;
}

.user-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.no-comments-msg {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 10px;
}

.comment-input-actions.hidden {
  display: none;
}

.add-comment-container {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}
.comment-input-block {
  flex: 1;
}
.comment-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 0;
  font-size: 14px;
  outline: none;
  transition: border-bottom-color var(--transition-smooth);
}
.comment-input:focus {
  border-bottom-color: var(--text-primary);
}

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

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 18px;
  cursor: pointer;
}
.btn-text:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.btn-primary {
  background-color: var(--yt-blue);
  color: #0a0a0d;
  border: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 18px;
  cursor: pointer;
  transition: opacity var(--transition-smooth);
}
.btn-primary:hover {
  opacity: 0.9;
}

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

.comment-item {
  display: flex;
  gap: 16px;
}
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}
.comment-body {
  flex: 1;
}
.comment-author-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.comment-author-row .verified-icon {
  margin-left: -1px;
  margin-right: 0;
}
.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.comment-author.verified-channel-name {
  color: #3ea6ff !important;
}
body.light-theme .comment-author.verified-channel-name {
  color: #ff0000 !important;
}
.comment-author:hover {
  color: var(--yt-blue);
}
.comment-author.member-named,
.shorts-comment-name.member-named {
  color: var(--member-color, #ffd600) !important;
}
.member-selo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--member-color, #ffd600);
}
.member-selo .icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.member-selo-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.comment-time {
  font-size: 12px;
  color: var(--text-muted);
}
.comment-text {
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.comment-action-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}
.c-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 12px;
  transition: var(--transition-smooth);
}
.c-action-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}
.c-action-btn.active {
  color: var(--yt-blue);
}
.c-action-btn .icon {
  width: 16px;
  height: 16px;
}

.yt-replies-toggle-btn {
  background: none;
  border: none;
  color: var(--yt-blue);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  margin-top: 6px;
  transition: background-color var(--transition-smooth);
}
.yt-replies-toggle-btn:hover {
  background-color: rgba(62, 166, 255, 0.12);
}

/* Threaded replies */
.nested-reply-box {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reply-input-actions {
  display: none;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.nested-reply-box:focus-within .reply-input-actions {
  display: flex;
}
.replies-thread {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--border-color);
}
.reply-item {
  display: flex;
  gap: 12px;
}
.reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.yt-replies-toggle-btn .chevron {
  transition: transform 0.2s ease;
}
.yt-replies-toggle-btn.open .chevron {
  transform: rotate(180deg);
}

/* Comment owner "more" menu */
.comment-menu-wrapper {
  position: relative;
  margin-left: auto;
}
.comment-more-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 32px;
  min-width: 140px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 40;
}
.more-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  cursor: pointer;
  transition: background-color var(--transition-smooth);
}
.more-menu-item:hover {
  background-color: var(--bg-hover);
}
.more-menu-item.danger {
  color: #ff5252;
}

/* ==========================================================================
   YouTube comment model extras (owner badge, creator heart, edit, "…mais")
   ========================================================================== */
textarea.comment-input {
  resize: none;
  overflow-y: hidden;
  line-height: 1.45;
  min-height: 36px;
  font-family: inherit;
  display: block;
}

/* Collapsed comments preview: mobile-only (YouTube app style), enabled in the 768px media query */
.comments-preview {
  display: none;
  position: relative;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0 32px 2px 0;
  cursor: pointer;
  color: var(--text-primary);
}
.comments-preview:focus-visible {
  outline: 2px solid var(--yt-blue);
  outline-offset: 4px;
  border-radius: 6px;
}
.comments-preview-count {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.comments-preview-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.comments-preview-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.comments-preview-text {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.comments-preview-name {
  color: var(--text-primary);
  font-weight: 600;
}
.comments-preview-input {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}
.comments-preview-chevron {
  position: absolute;
  top: 1px;
  right: 0;
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
  transition: transform 0.2s ease;
}
.comments-section.expanded .comments-preview-chevron {
  transform: rotate(180deg);
}

.comment-author-row {
  flex-wrap: wrap;
}

.comment-owner-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-hover);
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.comment-edited {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.comment-heart-badge {
  display: inline-flex;
  align-items: center;
  color: var(--brand-red);
}
.comment-heart-badge .icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.c-action-btn.heart-btn .icon {
  fill: currentColor;
  transition: transform 0.15s ease;
}
.c-action-btn.heart-btn:hover {
  color: var(--brand-red);
}
.c-action-btn.heart-btn:hover .icon {
  transform: scale(1.12);
}
.c-action-btn.heart-btn.hearted {
  color: var(--brand-red);
}

.comment-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comment-see-more {
  display: block;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin: -2px 0 8px;
  transition: color var(--transition-smooth);
}
.comment-see-more:hover {
  color: var(--text-primary);
}

.comment-edit-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.comment-edit-box .comment-input-actions {
  display: flex;
}

/* ==========================================================================
   YouTube Studio-Style Upload Dialog (Direct File Picker, Zero URL Needed!)
   ========================================================================== */
.yt-upload-dialog {
  --dlg-bg: #212121;
  --dlg-text: #f1f1f1;
  --dlg-text-2: #aaaaaa;
  --dlg-border: rgba(255, 255, 255, 0.12);
  --dlg-field: rgba(255, 255, 255, 0.07);
  --dlg-field-hover: rgba(255, 255, 255, 0.14);
  position: relative;
  width: 94%;
  max-width: 1040px;
  background-color: var(--dlg-bg);
  color: var(--dlg-text);
  border: 1px solid var(--dlg-border);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  z-index: 10;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.light-theme .yt-upload-dialog {
  --dlg-bg: #ffffff;
  --dlg-text: #0f0f0f;
  --dlg-text-2: #606060;
  --dlg-border: #d3d3d3;
  --dlg-field: #ffffff;
  --dlg-field-hover: #f2f2f2;
}

.yt-upload-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--dlg-border);
  flex-shrink: 0;
}
.yt-upload-dialog-header h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--dlg-text);
}

.yt-dialog-close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--dlg-text);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.yt-dialog-close:hover {
  background-color: var(--dlg-field-hover);
}
.yt-dialog-close .icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.modal-close-btn-subtle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}
.modal-close-btn-subtle:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

/* Step 1: Dropzone */
.yt-dropzone-screen {
  padding: 40px 32px 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.yt-drop-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  width: 100%;
  max-width: 660px;
  padding: 46px 32px;
  border: 2px dashed var(--dlg-border);
  border-radius: 10px;
  transition: var(--transition-smooth);
}
.yt-drop-target:hover {
  border-color: var(--yt-blue);
  background-color: rgba(62, 166, 255, 0.06);
}

.yt-upload-circle-icon {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background-color: var(--dlg-field);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform 0.25s ease;
}
.yt-drop-target:hover .yt-upload-circle-icon {
  transform: scale(1.05);
}

.yt-arrow-svg {
  width: 46px;
  height: 46px;
  fill: var(--dlg-text-2);
}

.yt-drop-target h4 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--dlg-text);
}

.yt-drop-subtitle {
  font-size: 13px;
  color: var(--dlg-text-2);
  margin-bottom: 26px;
}

.yt-blue-btn {
  background-color: var(--yt-blue);
  color: #060608;
  border: none;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: 24px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color var(--transition-smooth);
}
.yt-blue-btn:hover {
  background-color: var(--yt-blue-hover);
}

.yt-drop-terms {
  margin-top: 36px;
  font-size: 12px;
  color: var(--dlg-text-2);
}

/* Step 2: Details & Publish Form */
.yt-details-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.yt-details-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

.yt-details-top {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.yt-thumb-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.yt-thumb-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.preview-film-icon {
  width: 44px;
  height: 44px;
  fill: #3d3d3d;
}
.yt-thumb-caption {
  font-size: 12px;
  color: var(--dlg-text-2);
  word-break: break-all;
  line-height: 1.4;
}

.yt-details-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.yt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.yt-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dlg-text);
}
.yt-field input,
.yt-field textarea,
.yt-field select {
  width: 100%;
  background-color: var(--dlg-field);
  border: 1px solid var(--dlg-border);
  border-radius: 6px;
  padding: 11px 13px;
  color: var(--dlg-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-smooth);
}
.yt-field textarea {
  min-height: 112px;
  resize: vertical;
}
.yt-field select {
  cursor: pointer;
}
.yt-field input:focus,
.yt-field textarea:focus,
.yt-field select:focus {
  border-color: var(--yt-blue);
}

.yt-ad-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--dlg-border);
  border-radius: 8px;
  background-color: var(--dlg-field);
  cursor: pointer;
}
.yt-field .yt-ad-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--yt-blue);
  cursor: pointer;
}
.yt-ad-option-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.yt-ad-option-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--dlg-text);
}
.yt-ad-option-text small {
  font-size: 12px;
  line-height: 1.45;
  color: var(--dlg-muted, var(--text-secondary));
}
.yt-ad-option:has(input:checked) {
  border-color: var(--yt-blue);
}

.yt-input-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}
.yt-input-wrap input {
  padding-right: 56px;
}
.yt-counter {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--dlg-text-2);
  pointer-events: none;
}
.yt-input-wrap input + .yt-counter {
  top: 50%;
  transform: translateY(-50%);
}
.yt-input-wrap textarea + .yt-counter {
  bottom: 10px;
}

.yt-input-hint {
  font-size: 12px;
  color: var(--dlg-text-2);
}

.thumb-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.thumb-browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  border: 1px solid var(--dlg-border);
  border-radius: 18px;
  color: var(--dlg-text);
  padding: 9px 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition-smooth);
}
.thumb-browse-btn .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.thumb-browse-btn:hover {
  background-color: var(--dlg-field-hover);
  border-color: var(--yt-blue);
}
.file-name-indicator {
  font-size: 13px;
  color: var(--success-green);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

/* Lower two-column section */
.yt-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--dlg-border);
}
.yt-details-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.yt-block-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dlg-text);
}

.preview-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success-green);
  font-weight: 600;
}

.yt-upload-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--dlg-border);
  flex-shrink: 0;
}

.upload-ready-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dlg-text-2);
}
.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success-green);
  border-radius: 50%;
}
.upload-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-error-banner {
  flex-shrink: 0;
  margin: 12px 24px 0;
  padding: 12px 16px;
  border-radius: 10px;
  background-color: rgba(255, 0, 63, 0.14);
  border: 1px solid rgba(255, 0, 63, 0.5);
  color: #ff8fa3;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
body.light-theme .upload-error-banner {
  background-color: rgba(255, 0, 63, 0.08);
  border-color: rgba(209, 0, 52, 0.4);
  color: #c10034;
}

/* ==========================================================================
   Modals Base
   ========================================================================== */
.custom-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  align-items: center;
  justify-content: center;
}
.custom-modal.active {
  display: flex;
}

.auth-modal-card {
  position: relative;
  width: 90%;
  max-width: 460px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  z-index: 10;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.auth-tab.active {
  color: var(--brand-red);
  border-bottom-color: var(--brand-red);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.auth-form.active {
  display: flex;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: -8px;
  margin-bottom: 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-group input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-smooth);
}
.form-group input:focus {
  border-color: var(--brand-red);
}

.submit-auth-btn {
  background: var(--brand-gradient);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity var(--transition-smooth);
}
.submit-auth-btn:hover {
  opacity: 0.92;
}

/* Google Sign-In */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

.google-login-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.google-login-area #google-signin-btn,
.google-login-area iframe {
  max-width: 100%;
}
.google-login-hint {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .sidebar {
    width: var(--sidebar-collapsed-width);
    padding: 8px 4px;
  }
  .sidebar-item {
    flex-direction: column;
    gap: 6px;
    padding: 14px 4px;
    text-align: center;
    font-size: 10px;
  }
  .sidebar-item .icon {
    width: 22px;
    height: 22px;
  }
  .sidebar-heading,
  .sidebar-divider,
  .sub-list,
  .sidebar-footer,
  .sidebar-section:nth-of-type(n+2) {
    display: none;
  }
  .yt-details-top {
    grid-template-columns: 1fr;
  }
  .yt-thumb-preview {
    max-width: 320px;
  }
  .yt-details-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .channel-header-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .channel-stats-line {
    justify-content: center;
  }
  .channel-action-row {
    justify-content: center;
  }
  .channel-about-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .sidebar {
    display: none;
  }
  .content-area {
    padding: 12px 10px 48px;
  }
  .create-video-btn span {
    display: none;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .channel-banner-container {
    height: 140px;
  }
}

/* ==========================================================================
   Watch Page (YouTube-style layout)
   ========================================================================== */
.watch-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px 8px 8px;
  border-radius: 20px;
  margin-bottom: 14px;
  transition: var(--transition-smooth);
}
.watch-back-btn:hover {
  background-color: var(--bg-hover);
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 402px;
  gap: 24px;
  align-items: start;
}

.watch-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.video-watermark {
  position: absolute;
  max-width: 160px;
  max-height: 90px;
  width: auto;
  height: auto;
  pointer-events: none !important;
  user-select: none;
  z-index: 2147483647 !important;
  opacity: 0.9;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7));
}
.video-watermark.pos-br { bottom: 56px; right: 16px; }

:fullscreen .video-watermark,
:-webkit-full-screen .video-watermark,
:-moz-full-screen .video-watermark {
  z-index: 2147483647 !important;
  pointer-events: none !important;
}
.video-watermark.pos-bl { bottom: 52px; left: 12px; }
.video-watermark.pos-tr { top: 12px; right: 12px; }
.video-watermark.pos-tl { top: 12px; left: 12px; }
.watch-player-wrapper video,
.watch-player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.watch-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.watch-channel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.watch-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.watch-channel-info .channel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.watch-channel-text {
  min-width: 0;
}
.watch-channel-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.watch-channel-name-row .channel-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0;
}
.watch-channel-name-row .channel-name .verified-channel-name {
  margin-right: 2px;
}
.watch-channel-name-row .channel-name .verified-channel-name {
  font-weight: 600;
}
.watch-channel-name-row .channel-name .verified-icon,
.video-channel .verified-icon,
.upnext-channel .verified-icon {
  margin-left: 0;
}
.watch-channel-name-row .channel-name:hover {
  color: var(--yt-blue);
}
.watch-channel-subs {
  font-size: 12px;
  color: var(--text-secondary);
}

.watch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.action-pill-btn.saved {
  background-color: var(--bg-active);
  color: var(--yt-blue);
}

.comments-section {
  margin-top: 28px;
}

/* Up Next sidebar */
.watch-sidebar {
  position: sticky;
  top: calc(var(--navbar-height) + 12px);
}
.upnext-bar {
  margin-bottom: 10px;
}
.upnext-header {
  font-size: 15px;
  font-weight: 700;
}
.upnext-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upnext-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: 10px;
  padding: 4px;
  transition: var(--transition-smooth);
}
.upnext-card:hover {
  background-color: var(--bg-hover);
}
.upnext-thumb {
  position: relative;
  width: 168px;
  min-width: 168px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-surface);
}
.upnext-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.upnext-info {
  min-width: 0;
}
.upnext-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.upnext-channel {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2px;
}
.upnext-channel .verified-channel-name {
  margin-right: 2px;
}
.upnext-channel .verified-icon {
  width: 32px;
  height: 32px;
}
.upnext-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Watch progress bar on thumbnails */
.thumb-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  z-index: 3;
}
.thumb-progress span {
  display: block;
  height: 100%;
  background-color: var(--brand-red);
}

/* Pinned comment badge */
.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background-color: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ==========================================================================
   Navbar Dropdowns (Criar & Notificações)
   ========================================================================== */
.nav-dropdown-wrapper {
  position: relative;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  padding: 8px 0;
  display: none;
  z-index: 1200;
}
.nav-dropdown.show {
  display: block;
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}
.nav-dropdown-item:hover {
  background-color: var(--bg-hover);
}
.nav-dropdown-item .icon {
  width: 20px;
  height: 20px;
}

.notif-dropdown {
  width: 420px;
  max-height: 480px;
  overflow-y: auto;
  padding: 0;
}
.notif-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.notif-empty p {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.notif-empty span {
  font-size: 13px;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.notif-item:hover {
  background-color: var(--bg-hover);
}
.notif-thumb {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background-color: var(--bg-primary);
}
.notif-icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 230, 118, 0.15);
  color: var(--success-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.notif-body {
  min-width: 0;
}
.notif-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
}
.notif-text strong {
  margin-right: 0;
}
.notif-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Sidebar Theme Toggle
   ========================================================================== */
.sidebar-theme-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
}
.sidebar-theme-btn:hover {
  background-color: var(--bg-hover);
}

/* ==========================================================================
   Shorts Player (fullscreen vertical feed)
   ========================================================================== */
.shorts-overlay {
  position: fixed;
  inset: 0;
  background-color: #0f0f0f;
  z-index: 1500;
  display: none;
  flex-direction: column;
}
.shorts-top-bar {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #fff;
}
.shorts-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.shorts-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 9px;
  filter: drop-shadow(0 3px 8px rgba(255, 43, 84, 0.5));
}
.shorts-logo-text {
  background: linear-gradient(90deg, #ff2b54, #ff0080);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff2b54;
}
.shorts-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 1560;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shorts-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.24);
}
.shorts-stage {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
}
.shorts-feed {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.shorts-feed::-webkit-scrollbar {
  display: none;
}
.shorts-item {
  position: relative;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 16px 22px;
  box-sizing: border-box;
}
.shorts-frame {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-height: 100%;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
}
.shorts-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
  cursor: pointer;
  display: block;
}
.shorts-overlay-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  z-index: 2;
  pointer-events: none;
}
.shorts-overlay-info * {
  pointer-events: auto;
}
.shorts-channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.shorts-channel-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  flex: 0 0 auto;
}
.shorts-channel-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.shorts-channel-name .verified-channel-name {
  font-weight: 600;
  margin-right: 2px;
}
.shorts-sub-btn {
  margin-left: 4px;
  font-size: 12px;
  padding: 6px 12px;
}
.shorts-title {
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shorts-action-rail {
  flex: 0 0 auto;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
  z-index: 3;
}
.shorts-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.shorts-rail-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}
.shorts-rail-btn:hover .shorts-rail-icon {
  background-color: rgba(255, 255, 255, 0.24);
}
.shorts-rail-btn.active .shorts-rail-icon {
  color: #ff2d55;
}
.shorts-rail-btn.active .shorts-rail-icon .icon {
  fill: #ff2d55;
}
.shorts-rail-btn.active .shorts-rail-count {
  color: #ff2d55;
}
.shorts-rail-icon .icon {
  width: 24px;
  height: 24px;
}
.shorts-rail-count {
  font-size: 12px;
  line-height: 1;
}
.shorts-nav-buttons {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1550;
}
.shorts-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shorts-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.24);
}
.shorts-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 24px;
  gap: 8px;
}
.shorts-empty h3 {
  font-size: 20px;
}
.shorts-empty p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 12px;
}
@media (max-width: 768px) {
  .shorts-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    height: 52px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
  }
  .shorts-logo {
    font-size: 22px;
  }
  .shorts-logo-img {
    width: 30px;
    height: 30px;
  }
  .shorts-close-btn {
    top: 6px;
    right: 8px;
    width: 38px;
    height: 38px;
    background-color: transparent;
  }
  .shorts-item {
    gap: 0;
    padding: 0;
  }
  .shorts-frame {
    height: 100%;
    width: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
  }
  .shorts-video {
    object-fit: contain;
  }
  .shorts-action-rail {
    position: absolute;
    right: 4px;
    bottom: 70px;
    padding-bottom: 0;
    gap: 10px;
    z-index: 10;
  }
  .shorts-rail-icon {
    background-color: transparent;
    width: 42px;
    height: 42px;
  }
  .shorts-rail-icon .icon {
    width: 22px;
    height: 22px;
  }
  .shorts-rail-count {
    font-size: 11px;
  }
  .shorts-overlay-info {
    padding: 70px 80px 20px 14px;
  }
  .shorts-nav-buttons {
    display: none;
  }
}

/* Shorts comments sheet */
.shorts-comments-sheet,
.shorts-desc-sheet {
  display: none !important;
}
.shorts-comments-sheet.open,
.shorts-desc-sheet.open {
  display: block !important;
  pointer-events: auto !important;
}
.shorts-comments-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.shorts-comments-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  height: min(70vh, 560px);
  background-color: var(--bg-secondary);
  border-radius: 18px 18px 0 0;
  border: 1px solid var(--border-color);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  animation: shortsDescUp 0.22s ease;
}
.shorts-comments-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--border-color);
  margin: 8px auto 6px;
}
.shorts-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 10px;
  font-size: 15px;
  font-weight: 700;
}
.shorts-comments-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shorts-comments-empty {
  color: var(--text-secondary);
  text-align: center;
  margin-top: 40px;
}
.shorts-comment-item {
  display: flex;
  gap: 10px;
}
.shorts-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.shorts-comment-main {
  flex: 1;
  min-width: 0;
}
.shorts-comment-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.shorts-comment-meta .verified-icon {
  width: 24px;
  height: 24px;
  vertical-align: -4px;
  margin-left: -1px;
  margin-right: 0;
}
.shorts-comment-name {
  font-weight: 600;
  font-size: 13px;
}
.shorts-comment-name.verified-channel-name {
  color: #3ea6ff !important;
}
body.light-theme .shorts-comment-name.verified-channel-name {
  color: #ff0000 !important;
}
.shorts-comment-time {
  font-size: 12px;
  color: var(--text-secondary);
}
.shorts-comment-text {
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.shorts-comment-reply-toggle {
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.shorts-comment-reply-toggle:hover {
  color: var(--text-primary);
}
.shorts-comment-edited {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}
.shorts-comment-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.shorts-comment-toolbar .shorts-comment-reply-toggle {
  margin-top: 0;
}
.shorts-comment-replies-toggle {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: #3ea6ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.shorts-comment-replies-toggle:hover {
  text-decoration: underline;
}
.shorts-comment-action {
  padding: 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.shorts-comment-action:hover {
  color: var(--text-primary);
}
.shorts-comment-delete:hover {
  color: #ff6b6b;
}
.shorts-comment-report:hover {
  color: #ff6b6b;
}
.shorts-comment-edit-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.shorts-comment-edit-input {
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 12px;
}
.shorts-comment-edit-save,
.shorts-comment-edit-cancel {
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  flex: 0 0 auto;
}
.shorts-comment-edit-save {
  background: #3ea6ff;
  color: #fff;
}
.shorts-comment-edit-cancel {
  background: transparent;
  color: var(--text-secondary);
}
.shorts-comment-edit-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.shorts-comment-node {
  display: flex;
  flex-direction: column;
}
.shorts-comment-children {
  margin-top: 12px;
  margin-left: 15px;
  padding-left: 13px;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shorts-comment-replies {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shorts-comment-reply .shorts-comment-avatar {
  width: 26px;
  height: 26px;
}
.shorts-comment-reply-form {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.shorts-comment-reply-input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 7px 12px;
  font-size: 12px;
}
.shorts-comment-reply-send {
  border: none;
  border-radius: 999px;
  background: #3ea6ff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  flex: 0 0 auto;
}
.shorts-comment-reply-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.shorts-comments-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
}
.shorts-comments-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: 13px;
}
.shorts-comments-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #3ea6ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.shorts-comments-input:disabled {
  opacity: 0.6;
}
.shorts-comments-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shorts-comments-sheet,
.shorts-desc-sheet {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: none;
  pointer-events: none;
}
.shorts-desc-sheet.open { display: block; pointer-events: auto; }
.shorts-desc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.shorts-desc-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  max-height: 70vh;
  background-color: var(--bg-secondary);
  border-radius: 18px 18px 0 0;
  border: 1px solid var(--border-color);
  border-bottom: none;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  animation: shortsDescUp 0.22s ease;
}
@keyframes shortsDescUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}
.shorts-desc-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--border-color);
  margin: 6px auto 10px;
}
.shorts-desc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.shorts-desc-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.shorts-desc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.shorts-desc-channel-info {
  display: flex;
  flex-direction: column;
}
.shorts-desc-channel-name {
  font-weight: 600;
  font-size: 14px;
}
.shorts-desc-channel-name.verified-channel-name {
  font-weight: 600;
}
.shorts-desc-stats {
  font-size: 12px;
  color: var(--text-secondary);
}
.shorts-desc-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}
.shorts-desc-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  margin: 0 0 12px;
}
.shorts-desc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.shorts-desc-tag {
  font-size: 13px;
  color: #3ea6ff;
}


.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}
.subs-channels-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 10px;
}
.subs-channel-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-width: 96px;
}
.subs-channel-chip img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.subs-channel-chip span {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 96px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subs-empty-hint {
  color: var(--text-muted);
  font-size: 14px;
  padding: 10px 0 16px;
}

/* ==========================================================================
   Generic List View (Histórico / Salvos / Gostei / Trending)
   ========================================================================== */
.list-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.list-view-header .page-title {
  margin-bottom: 0;
}
.empty-list-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}
.empty-list-state h3 {
  color: var(--text-primary);
  font-size: 20px;
  margin-bottom: 10px;
}
.empty-list-state p {
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ==========================================================================
   Channel Page additions (sort + home sections)
   ========================================================================== */
.channel-sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.channel-sort-label {
  font-size: 16px;
  font-weight: 700;
}
.channel-sort-select {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.channel-section {
  margin-bottom: 28px;
}
.channel-section .featured-heading {
  margin-bottom: 14px;
}

/* ==========================================================================
   Light Theme (body.light-theme)
   ========================================================================== */
body.light-theme {
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9f9;
  --bg-surface: #f2f2f2;
  --bg-hover: #e5e5e5;
  --bg-active: #d9d9d9;
  --border-color: rgba(0, 0, 0, 0.12);
  --text-primary: #0f0f0f;
  --text-secondary: #606060;
  --text-muted: #909090;
}
body.light-theme .navbar {
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .video-grid .video-title,
body.light-theme .watch-title {
  color: #0f0f0f;
}
body.light-theme .subscribe-btn {
  background-color: #0f0f0f;
  color: #ffffff;
}
body.light-theme .subscribe-btn.subscribed {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
body.light-theme .nav-dropdown,
body.light-theme .user-dropdown {
  background-color: #ffffff;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.15);
}
body.light-theme .create-video-btn,
body.light-theme .search-btn {
  background-color: var(--bg-surface);
}
body.light-theme .yt-upload-dialog {
  background-color: #ffffff;
  color: #0f0f0f;
}
body.light-theme .yt-upload-dialog-header h3 {
  color: #0f0f0f;
}
body.light-theme .yt-dialog-close {
  color: #0f0f0f;
}
body.light-theme .yt-dialog-close:hover {
  background-color: #f2f2f2;
}
body.light-theme .studio-dialog {
  background-color: #ffffff;
  color: #0f0f0f;
}
body.light-theme .studio-topbar,
body.light-theme .studio-panes {
  background-color: #f9f9f9;
}
body.light-theme .studio-card,
body.light-theme .studio-side-nav .studio-tab.active {
  background-color: #ffffff;
}
body.light-theme .yt-drop-target {
  background-color: rgba(0, 0, 0, 0.02);
  border-color: #d3d3d3;
}
body.light-theme .yt-upload-circle-icon {
  background-color: #f2f2f2;
}
body.light-theme .yt-arrow-svg {
  fill: #606060;
}
body.light-theme .yt-drop-target h4,
body.light-theme .yt-block-title,
body.light-theme .yt-field label {
  color: #0f0f0f;
}
body.light-theme .yt-drop-subtitle,
body.light-theme .yt-input-hint,
body.light-theme .yt-thumb-caption,
body.light-theme .upload-ready-indicator,
body.light-theme .yt-counter {
  color: #606060;
}
body.light-theme .yt-field input,
body.light-theme .yt-field textarea,
body.light-theme .yt-field select {
  background-color: #ffffff;
  color: #0f0f0f;
  border-color: #d3d3d3;
}
body.light-theme .thumb-browse-btn {
  background-color: #ffffff;
  border-color: #d3d3d3;
  color: #0f0f0f;
}
body.light-theme .thumb-browse-btn:hover {
  background-color: #f2f2f2;
}
body.light-theme .yt-upload-footer {
  border-top-color: #d3d3d3;
}
body.light-theme ::-webkit-scrollbar-thumb {
  background: #c4c4cc;
}

@media (max-width: 1100px) {
  .watch-grid {
    grid-template-columns: 1fr;
  }
  .watch-sidebar {
    position: static;
  }
}

/* ==========================================================================
   Voice Search (mic button listening state)
   ========================================================================== */
.mic-btn {
  transition: var(--transition-smooth);
}
.mic-btn.listening {
  color: #fff;
  background-color: #ff0033;
  animation: micPulse 1.4s ease-in-out infinite;
}
.mic-btn.listening .icon {
  fill: #fff;
}
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 0, 51, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(255, 0, 51, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 0, 51, 0); }
}

/* ==========================================================================
   Toast notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  max-width: 90vw;
  padding: 12px 18px;
  border-radius: 10px;
  background-color: #272727;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
body.light-theme .toast {
  background-color: #0f0f0f;
  color: #fff;
}

/* ==========================================================================
   Watch player: quality / speed / subtitles settings menu
   ========================================================================== */
.player-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Pre-roll advertisement */
.preroll-ad {
  position: absolute;
  inset: 0;
  z-index: 40;
  background-color: #000;
  overflow: hidden;
}
.preroll-ad video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
}
.preroll-ad-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}
.preroll-ad-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: none;
}
.preroll-ad-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 4px;
  background-color: #ffd600;
  color: #0f0f0f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.preroll-ad-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.preroll-ad-info strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preroll-ad-info span {
  font-size: 12px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preroll-ad-skip-wrap {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.preroll-ad-countdown {
  padding: 8px 12px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.preroll-ad-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  background-color: rgba(15, 15, 15, 0.85);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.preroll-ad-skip:hover {
  background-color: rgba(40, 40, 40, 0.95);
}

.player-gear-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0.92;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.player-gear-btn .icon {
  width: 22px;
  height: 22px;
  fill: #fff;
}
.player-shell:hover .player-gear-btn,
.player-gear-btn:focus-visible {
  opacity: 1;
}
.player-gear-btn:hover {
  background-color: rgba(0, 0, 0, 0.78);
}
.player-settings-menu {
  position: absolute;
  top: 54px;
  right: 10px;
  z-index: 6;
  width: 240px;
  max-height: 70%;
  overflow-y: auto;
  background-color: rgba(28, 28, 28, 0.98);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
}
.psm-title {
  padding: 8px 12px 10px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 6px;
}
.psm-title--sub {
  display: flex;
  align-items: center;
  gap: 8px;
}
.psm-back {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.psm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.psm-row:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.psm-row.selected {
  font-weight: 600;
}
.psm-row .psm-value {
  color: #aaa;
  font-size: 12px;
}
.psm-check {
  width: 18px;
  height: 18px;
  fill: #fff;
  flex: 0 0 auto;
}
.psm-empty {
  padding: 10px 12px;
  color: #999;
  font-size: 12px;
}

/* ==========================================================================
   Playlists (cards, create modal, save popover)
   ========================================================================== */
.video-grid.playlist-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.playlist-card {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: 12px;
  padding: 6px;
  transition: background-color 0.15s ease;
}
.playlist-card:hover {
  background-color: var(--bg-hover);
}
.playlist-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.playlist-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.playlist-cover-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
}
.playlist-cover-empty .icon {
  width: 40px;
  height: 40px;
  fill: var(--text-muted);
}
.playlist-card-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.playlist-card-count .icon {
  width: 16px;
  height: 16px;
  fill: #fff;
}
.playlist-card-menu {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.playlist-card-menu .icon {
  width: 16px;
  height: 16px;
  fill: #fff;
}
.playlist-card:hover .playlist-card-menu {
  opacity: 1;
}
.playlist-card-menu:hover {
  background-color: var(--brand-red);
}
/* Touch devices have no hover: keep the delete affordance visible */
@media (hover: none) {
  .playlist-card-menu {
    opacity: 1;
  }
}
.playlist-card-title {
  margin: 10px 4px 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.playlist-card-meta {
  margin: 0 4px 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Create playlist modal */
.playlist-modal-card {
  position: relative;
  width: 90%;
  max-width: 420px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  z-index: 10;
}
.playlist-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}
.playlist-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

/* Save-to-playlist popover */
.save-popover {
  z-index: 3000;
  width: 280px;
  max-height: 60vh;
  overflow-y: auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}
.save-popover-title {
  padding: 8px 12px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.save-popover-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.save-popover-row:hover {
  background-color: var(--bg-hover);
}
.save-popover-check {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1;
  color: #fff;
}
.save-popover-check.checked {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}
.save-popover-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.save-popover-new {
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  margin-top: 4px;
  padding-top: 12px;
}

/* ==========================================================================
   Mobile Interface (phones & tablets) — second layout
   ========================================================================== */
.mobile-bottom-nav { display: none; }
.mobile-back-btn { display: none; }
.mobile-you-sheet { display: none; }
.mobile-search-toggle { display: none; }
.mobile-search-back { display: none; }
body.sheet-open { overflow: hidden; }

/* Default (desktop): the mobile navigation drawer stays hidden */
.mobile-nav-drawer { display: none; }

@media (max-width: 768px) {
  /* Replace the desktop sidebar with a bottom navigation bar */
  .sidebar { display: none !important; }
  .main-layout { display: block; }
  .content-area { padding: 10px 8px calc(84px + env(safe-area-inset-bottom)); }

  /* Navbar compaction */
  .navbar { padding: 0 10px; }
  .nav-left { gap: 8px; flex-shrink: 0; }
  .brand-text { display: none; }
  .create-video-btn { display: none; }
  .nav-right { gap: 6px; flex-shrink: 0; }

  /* Search: hidden until the search icon is tapped (YouTube-style) */
  .nav-center { display: none; min-width: 0; margin: 0; }
  .mobile-search-toggle { display: inline-flex; }

  .navbar.search-open .nav-left,
  .navbar.search-open .nav-right { display: none; }
  .navbar.search-open .nav-center {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
    gap: 6px;
  }
  .navbar.search-open .mobile-search-back {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
  }
  .navbar.search-open .mobile-search-back .icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }

  .search-form { max-width: none; min-width: 0; width: 100%; }
  .search-input-wrapper { min-width: 0; }
  .search-input-wrapper input { font-size: 16px; }
  .search-btn { width: 44px; }
  .mic-btn { display: none; }

  /* Notifications: bell always visible, dropdown fits the screen */
  .notification-btn { display: inline-flex; }
  .notif-dropdown {
    position: fixed;
    top: calc(var(--navbar-height) + 6px);
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    max-height: 72vh;
    border-radius: 14px;
  }
  .notif-item { padding: 10px 12px; gap: 10px; }
  .notif-thumb { width: 92px; min-width: 92px; }

  /* Feed */
  .chips-container { padding-bottom: 12px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 12px; }

  /* Watch page: player edge-to-edge */
  .watch-back-btn { display: none; }
  .watch-player-wrapper {
    border-radius: 0;
    margin-left: -8px;
    margin-right: -8px;
    width: calc(100% + 16px);
    margin-bottom: 10px;
  }
  .watch-title { font-size: 17px; }

  /* Comments: collapsed preview under the description (YouTube app style) */
  .comments-section { margin-top: 18px; }
  .comments-preview { display: block; }
  .comments-section:not(.expanded) .comments-top-bar,
  .comments-section:not(.expanded) .comments-full {
    display: none;
  }
  .comments-section.expanded .comments-preview-body,
  .comments-section.expanded .comments-preview-input {
    display: none;
  }
  .comments-section.expanded .comments-preview-count {
    margin-bottom: 0;
  }
  .comments-section.expanded .comments-top-bar {
    gap: 8px;
    margin: 10px 0 14px;
    justify-content: flex-end;
  }
  .comments-section.expanded .comments-top-bar h3 {
    display: none;
  }

  /* Floating back button for non-feed views */
  .mobile-back-btn {
    position: fixed;
    top: calc(var(--navbar-height) + 10px);
    left: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    backdrop-filter: blur(4px);
    transition: var(--transition-smooth);
  }
  .mobile-back-btn.show { display: inline-flex; }
  .mobile-back-btn:active { transform: scale(0.92); }
  .mobile-back-btn .icon { width: 22px; height: 22px; fill: currentColor; }
  body.light-theme .mobile-back-btn { background-color: rgba(255, 255, 255, 0.9); color: var(--text-primary); border: 1px solid var(--border-color); }

  /* Modals fill the screen on phones */
  .yt-upload-dialog,
  .studio-dialog,
  .auth-modal-card,
  .playlist-modal-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
  }

  /* Channel customization (Studio): stack the tab bar above the panels */
  .studio-topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .studio-topbar h3 { font-size: 16px; }
  .studio-topbar-actions {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
  }
  .studio-save-status { flex: 1 1 100%; text-align: right; }
  .studio-body {
    flex-direction: column;
    overflow-y: auto;
  }
  .studio-side-nav {
    flex-direction: row;
    width: 100%;
    flex-shrink: 0;
    gap: 6px;
    padding: 8px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .studio-tab {
    flex-shrink: 0;
    padding: 9px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .studio-side-nav .studio-tab.active {
    box-shadow: inset 0 -3px 0 var(--yt-blue);
    border-radius: 10px;
  }
  .studio-panes {
    flex: 1;
    padding: 16px 14px calc(24px + env(safe-area-inset-bottom));
    overflow-y: visible;
  }
  .studio-card { padding: 16px; }
  .studio-url-row { flex-wrap: wrap; gap: 6px; }
  .branding-banner-preview { max-width: 100%; }
  .upload-error-banner { margin: 10px 14px 0; }

  /* ---- Bottom navigation ---- */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom);
    background-color: rgba(10, 10, 13, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
  }
  .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    transition: var(--transition-smooth);
  }
  .mbn-item .icon { width: 24px; height: 24px; fill: currentColor; }
  .mbn-item.active { color: var(--text-primary); }
  .mbn-item.active .icon { fill: var(--brand-red); }
  .mbn-plus {
    width: 30px; height: 30px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
  }
  .mbn-plus .icon { width: 20px; height: 20px; }
  .mbn-icon-wrap { position: relative; display: inline-flex; }
  .mbn-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  /* ---- "You" bottom sheet ---- */
  .mobile-you-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s;
  }
  .mobile-you-sheet.open { visibility: visible; opacity: 1; }
  .mobile-you-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
  .mobile-you-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    padding: 6px 8px calc(20px + env(safe-area-inset-bottom));
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.22s ease;
  }
  .mobile-you-sheet.open .mobile-you-panel { transform: translateY(0); }
  .mobile-you-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; font-size: 15px; font-weight: 700; color: var(--text-primary);
  }  .mobile-you-links { display: flex; flex-direction: column; gap: 2px; }
  .mobile-you-link {
    display: flex; align-items: center; gap: 18px;
    background: none; border: none; color: var(--text-primary);
    font-family: inherit; font-size: 14px; text-align: left;
    padding: 13px 14px; border-radius: 10px; cursor: pointer;
  }
  .mobile-you-link:hover { background-color: var(--bg-hover); }
  .mobile-you-link:hover { background-color: var(--bg-hover); }
  .mobile-you-link .icon { width: 22px; height: 22px; fill: currentColor; }
  .you-notif-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 8px;
    border-radius: 9px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    vertical-align: middle;
  }

  /* Mobile navigation drawer (hamburger, slides in from the left) */
  .mobile-nav-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2100;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s;
  }
  .mobile-nav-drawer.open { visibility: visible; opacity: 1; }
  .mobile-nav-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
  .mobile-nav-panel {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: min(80vw, 320px);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    border-radius: 0 16px 16px 0;
    padding: 12px 8px calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
  }
  .mobile-nav-drawer.open .mobile-nav-panel { transform: translateX(0); }
  .mobile-nav-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px 14px;
  }
  .mobile-nav-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 800; color: var(--text-primary);
  }
  .mobile-nav-links { display: flex; flex-direction: column; gap: 2px; }
  .mobile-nav-link {
    display: flex; align-items: center; gap: 20px;
    background: none; border: none; color: var(--text-primary);
    font-family: inherit; font-size: 14px; text-align: left;
    padding: 12px 14px; border-radius: 10px; cursor: pointer;
  }
  .mobile-nav-link:hover, .mobile-nav-link.active { background-color: var(--bg-hover); }
  .mobile-nav-link .icon { width: 22px; height: 22px; fill: currentColor; flex: none; }
  .mobile-nav-divider {
    height: 1px; margin: 6px 12px;
    background-color: var(--border-color);
  }
}

body.light-theme .mobile-bottom-nav { background-color: rgba(255, 255, 255, 0.98); }


/* ==========================================================================
   Channel notification bell (subscribe)
   ========================================================================== */
.subscribe-bell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 0, 63, 0.14);
  color: var(--brand-red);
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}
.subscribe-bell-btn:hover { background-color: rgba(255, 0, 63, 0.26); }
.subscribe-bell-btn .icon { width: 20px; height: 20px; fill: currentColor; }
.subscribe-bell-btn.pulse .icon { animation: bell-pop 0.45s ease; }
@keyframes bell-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(-8deg); }
  70% { transform: scale(0.92) rotate(6deg); }
  100% { transform: scale(1); }
}
.subscribe-bell-btn .bell-outline,
.subscribe-bell-btn .bell-slash { display: none; }
.subscribe-bell-btn .bell-slash { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.subscribe-bell-btn.muted { background-color: var(--bg-hover); color: var(--text-secondary); }
.subscribe-bell-btn.muted:hover { background-color: var(--border-color); }
.subscribe-bell-btn.muted .bell-filled { display: none; }
.subscribe-bell-btn.muted .bell-outline { display: inline; }
.subscribe-bell-btn.muted .bell-slash { display: inline; }

.sub-bell-menu {
  position: absolute;
  z-index: 2000;
  width: 300px;
  padding: 8px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.sub-bell-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.sub-bell-opt:hover { background-color: var(--bg-hover); }
.sub-bell-opt.active { background-color: var(--bg-hover); }
.sub-bell-opt .sbo-bell { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; color: var(--text-secondary); }
.sub-bell-opt.active .sbo-bell { color: var(--brand-red); }
.sub-bell-opt .sbo-bell.muted { color: var(--text-secondary); }
.sub-bell-opt .sbo-bell .icon { width: 22px; height: 22px; fill: currentColor; }
.sub-bell-opt .sbo-bell .bell-outline,
.sub-bell-opt .sbo-bell .bell-slash { display: none; }
.sub-bell-opt .sbo-bell .bell-slash { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sub-bell-opt .sbo-bell.muted .bell-filled { display: none; }
.sub-bell-opt .sbo-bell.muted .bell-outline { display: inline; }
.sub-bell-opt .sbo-bell.muted .bell-slash { display: inline; }
.sub-bell-opt .sbo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sub-bell-opt .sbo-text strong { font-size: 14px; font-weight: 600; }
.sub-bell-opt .sbo-text small { font-size: 12px; color: var(--text-secondary); }
.sub-bell-opt.active .sbo-text strong::after { content: " ✓"; color: var(--brand-red); }
.sub-bell-unsub {
  margin-top: 6px;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  padding-top: 12px;
}
.sub-bell-unsub .sbo-text strong { color: #ff5252; }
.sub-bell-unsub:hover { background-color: rgba(255, 82, 82, 0.12); }

/* ==========================================================================
   Unavailable / Error States (vídeo ou canal removido)
   ========================================================================== */
.watch-unavailable {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 72px 24px;
  min-height: 340px;
  animation: unavailableFade 0.25s ease;
}
@keyframes unavailableFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.watch-unavailable .unavailable-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 8px;
}
.watch-unavailable h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}
.watch-unavailable p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 460px;
  line-height: 1.5;
}
.watch-unavailable .yt-blue-btn {
  margin-top: 14px;
}

#channel-view.channel-error > *:not(#channel-unavailable) {
  display: none !important;
}

/* ==========================================================================
   Video visibility badge + owner edit modal
   ========================================================================== */
.visibility-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.78);
}
.visibility-badge.private { background-color: #b3261e; }
.visibility-badge.unlisted { background-color: #6b6b73; }

.ad-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #0f0f0f;
  background-color: #ffd600;
}

.thumbnail-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  color: var(--text-muted);
}
.thumbnail-fallback svg {
  width: 44px;
  height: 44px;
  fill: currentColor;
  opacity: .6;
}

body.modal-open { overflow: hidden; }

.video-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}
.video-edit-modal.open { display: block; }
.video-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.video-edit-dialog {
  position: relative;
  margin: 5vh auto;
  width: min(560px, calc(100% - 32px));
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}
.video-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}
.video-edit-head h2 { font-size: 18px; margin: 0; color: var(--text-primary); }
.video-edit-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.video-edit-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.video-edit-input,
.video-edit-textarea {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  padding: 11px 13px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
.video-edit-textarea { resize: vertical; min-height: 90px; }
.video-edit-input:focus,
.video-edit-textarea:focus {
  outline: none;
  border-color: var(--yt-blue);
}
.video-edit-hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
}
.video-schedule-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
  color-scheme: dark;
}
.video-schedule-input:focus { outline: none; border-color: var(--yt-blue); }

/* Tags */
.tags-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag-chip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
}
.watch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.watch-tag {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--yt-blue, #3ea6ff);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.watch-tag:hover { background-color: var(--bg-hover); }
.watch-schedule-badge {
  margin-left: 8px;
  background-color: rgba(255, 176, 0, 0.15);
  border: 1px solid rgba(255, 176, 0, 0.5);
  color: #ffb000;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
}
.visibility-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.visibility-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.visibility-option:hover { background-color: var(--bg-hover); }
.visibility-option input { position: absolute; opacity: 0; pointer-events: none; }
.visibility-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  flex-shrink: 0;
  position: relative;
}
.visibility-option input:checked + .visibility-radio { border-color: var(--yt-blue); }
.visibility-option input:checked + .visibility-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background-color: var(--yt-blue);
}
.visibility-text { display: flex; flex-direction: column; }
.visibility-text strong { font-size: 14px; color: var(--text-primary); }
.visibility-text small { font-size: 12px; color: var(--text-secondary); }
.video-edit-error {
  padding: 10px 12px;
  border-radius: 8px;
  background-color: rgba(255, 0, 63, 0.12);
  border: 1px solid rgba(255, 0, 63, 0.4);
  color: #ff6b8a;
  font-size: 13px;
}
.video-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--border-color);
}
.video-edit-actions-right { display: flex; gap: 10px; }
.video-edit-delete {
  background: none;
  border: none;
  color: var(--brand-red);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
}
.video-edit-delete:hover { text-decoration: underline; }
.video-edit-cancel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 20px;
  cursor: pointer;
}
.video-edit-cancel:hover { background-color: var(--bg-hover); }

@media (max-width: 768px) {
  .video-edit-dialog {
    margin: 0;
    width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
  }
}

/* ==========================================================================
   Video card kebab menu (YouTube-style "Save to playlist")
   ========================================================================== */
.video-card-kebab {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.78);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.video-card-kebab svg { width: 20px; height: 20px; fill: currentColor; }
.video-card:hover .video-card-kebab,
.video-card-kebab:focus-visible { opacity: 1; }
.video-card-kebab:hover { background-color: rgba(0, 0, 0, 0.92); }
@media (hover: none) {
  .video-card-kebab { opacity: 1; }
}

.video-card-menu {
  position: fixed;
  z-index: 3000;
  min-width: 240px;
  padding: 8px 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.video-card-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.video-card-menu-item:hover { background-color: var(--bg-hover); }
.video-card-menu-item svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.video-card-menu-item.danger { color: #f28b82; }
.video-card-menu-item.danger:hover { background-color: rgba(242, 139, 130, 0.12); }

/* ==========================================================================
   Playlist hero header (capa + Reproduzir tudo / Embaralhar)
   ========================================================================== */
#list-view.playlist-detail .list-view-header { display: none; }

.playlist-hero {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.playlist-hero-cover {
  flex: 0 0 auto;
  width: 260px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.playlist-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.playlist-hero-cover svg {
  width: 46px;
  height: 46px;
  fill: var(--text-muted);
}
.playlist-hero-info {
  flex: 1;
  min-width: 0;
}
.playlist-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.playlist-hero-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.playlist-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.playlist-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.playlist-hero-btn svg { width: 20px; height: 20px; fill: currentColor; }
.playlist-hero-secondary {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.playlist-hero-secondary:hover { background-color: var(--bg-hover); }
.playlist-hero-kebab {
  width: 38px;
  height: 38px;
  background-color: var(--bg-hover);
  color: var(--text-primary);
}
.playlist-hero-kebab:hover { background-color: var(--bg-active); }
.playlist-hero-kebab svg { width: 20px; height: 20px; fill: currentColor; }

@media (max-width: 768px) {
  .playlist-hero {
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
  }
  .playlist-hero-cover { width: 100%; }
  .playlist-hero-title { font-size: 20px; }
}

/* Playlist privacy selector (create / rename modal) */
.playlist-privacy-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.playlist-privacy-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.playlist-privacy-select {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}
.playlist-privacy-select:focus { border-color: var(--border-focus); }




/* HostMail Google-style Auth */
.auth-modal-card { max-width: 450px; padding: 48px 40px 36px; }
.hostmail-auth-header { text-align: center; margin-bottom: 32px; }
.hostmail-logo { font-family: "Plus Jakarta Sans", "Roboto", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.hostmail-logo span { color: var(--primary-red); }
.hostmail-title { font-size: 24px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.hostmail-subtitle { color: var(--text-secondary); font-size: 16px; }
.hostmail-subtitle-muted { color: var(--text-secondary); font-size: 14px; margin-top: -4px; margin-bottom: 20px; text-align: center; }
.hostmail-form { display: block; }
.hostmail-step { display: flex; flex-direction: column; gap: 20px; }
.hostmail-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.hostmail-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; }
.hostmail-actions-spread { justify-content: space-between; }
.hostmail-link-btn { background: transparent; border: none; color: #8ab4f8; font-weight: 500; cursor: pointer; font-size: 14px; padding: 8px 0; }
.hostmail-primary-btn { background: #8ab4f8; color: #1f1f1f; border: none; border-radius: 100px; padding: 10px 24px; font-weight: 600; cursor: pointer; }
.hostmail-primary-btn:hover { background: #aecbfa; }
.hostmail-email-row { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.hostmail-email-row input { border: none; flex: 1; border-radius: 0; }
.hostmail-domain { padding: 12px 16px; background: rgba(255,255,255,0.04); color: var(--text-secondary); font-size: 14px; border-left: 1px solid var(--border-color); }
.hostmail-identity { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 100px; }
.hostmail-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #ff0033, #ff6b6b); display: flex; align-items: center; justify-content: center; font-weight: 600; color: white; font-size: 12px; }
.hostmail-identity-text { flex: 1; min-width: 0; }
.hostmail-identity-email { font-size: 14px; color: var(--text-primary); }
.hostmail-identity-name { font-size: 12px; color: var(--text-secondary); }

/* Google-like HostMail login */
.auth-modal-card { max-width: 448px; padding: 48px 40px 48px; border-radius: 8px; }
.hostmail-auth-header { text-align: center; margin-bottom: 36px; }
.hostmail-logo { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.hostmail-logo span { color: var(--primary-red); }
.hostmail-title { font-size: 24px; font-weight: 400; margin-bottom: 8px; }
.hostmail-subtitle { font-size: 16px; color: var(--text-primary); }
.hostmail-form { display: flex; flex-direction: column; gap: 0; }
.hostmail-step { display: flex; flex-direction: column; gap: 16px; }
.hostmail-step .form-group { display: flex; flex-direction: column; gap: 8px; }
.hostmail-step input { padding: 13px 15px; border-radius: 4px; border: 1px solid #5f6368; background: transparent; color: var(--text-primary); font-size: 16px; }
.hostmail-step label { font-size: 14px; color: var(--text-primary); }
.hostmail-small-link { margin-top: -4px; }
.hostmail-info-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.hostmail-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 40px; }
.hostmail-link-btn { background: transparent; border: none; color: #8ab4f8; font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px 0; }
.hostmail-primary-btn { background: #8ab4f8; color: #202124; border: none; border-radius: 4px; padding: 9px 24px; font-weight: 500; font-size: 14px; cursor: pointer; }
.hostmail-primary-btn:hover { background: #a8c7fa; }
.hostmail-user-chip { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #5f6368; border-radius: 100px; padding: 6px 12px 6px 6px; align-self: flex-start; cursor: pointer; }
.hostmail-chip-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff0033, #ff6b6b); display: flex; align-items: center; justify-content: center; color: white; font-size: 12px; font-weight: 600; }
.hostmail-chip-email { font-size: 14px; }
.hostmail-chip-arrow { width: 18px; height: 18px; fill: var(--text-secondary); }
.hostmail-checkbox { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-primary); }
.hostmail-checkbox input { width: 18px; height: 18px; }

/* Google-style HostMail */
.auth-modal-card { max-width: 450px; width: 90vw; padding: 0; border-radius: 8px; border: 1px solid #dadce0; background: #fff; box-sizing: border-box; overflow: hidden; }
.hostmail-google-form { display: flex; flex-direction: column; }
.hostmail-google-screen { display: flex; flex-direction: column; gap: 0; width: 100%; }
.hostmail-google-logo { align-self: center; margin-bottom: 16px; }
.hostmail-google-title { font-size: 24px; font-weight: 400; text-align: center; margin-bottom: 8px; color: #e8eaed; }
.hostmail-google-subtitle { font-size: 16px; text-align: center; color: #e8eaed; margin-bottom: 32px; }
.hostmail-google-field { position: relative; margin-bottom: 8px; }
.hostmail-google-field input { width: 100%; padding: 16px 15px 14px; border: 1px solid #5f6368; border-radius: 4px; background: transparent; color: #e8eaed; font-size: 16px; }
.hostmail-google-field label { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9aa0a6; font-size: 16px; pointer-events: none; transition: all 150ms ease; background: #202124; padding: 0 4px; }
.hostmail-google-field input:focus { outline: none; border-color: #8ab4f8; }
.hostmail-google-field input:focus + label,
.hostmail-google-field input:not(:placeholder-shown) + label { top: 0; font-size: 12px; color: #8ab4f8; }
.hostmail-google-links { margin: 8px 0 24px; }
.hostmail-google-link { background: transparent; border: none; color: #8ab4f8; font-size: 14px; font-weight: 500; cursor: pointer; padding: 6px 0; }
.hostmail-google-text { font-size: 14px; color: #9aa0a6; line-height: 1.5; margin-bottom: 32px; }
.hostmail-google-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; }
.hostmail-google-actions-end { justify-content: space-between; }
.hostmail-google-textbtn { background: transparent; border: none; color: #8ab4f8; font-weight: 500; font-size: 14px; cursor: pointer; padding: 8px 8px; }
.hostmail-google-next { background: #8ab4f8; color: #202124; border: none; border-radius: 4px; padding: 9px 24px; font-size: 14px; font-weight: 500; cursor: pointer; }
.hostmail-google-next:hover { background: #aecbfa; }
.hostmail-google-account { display: inline-flex; align-items: center; gap: 10px; align-self: center; border: 1px solid #5f6368; border-radius: 100px; padding: 4px 10px 4px 4px; background: transparent; color: #e8eaed; margin-bottom: 24px; cursor: pointer; }
.hostmail-google-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff0033, #ff6b6b); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.hostmail-google-show { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #e8eaed; margin-top: 12px; }
.hostmail-google-show input { width: 18px; height: 18px; }

/* Google auth mobile fix */
@media (max-width: 600px) {
  .auth-modal-card { width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; border: none; padding: 32px 24px 24px; overflow-y: auto; }
  .custom-modal.active .auth-modal-card { top: 0; left: 0; transform: none; }
  .modal-backdrop { display: none; }
  .hostmail-google-actions { margin-top: auto; padding-top: 40px; }
}

/* Google clean HostMail */
.gm-form { width: 100%; }
.gm-card { width: 100%; max-width: 450px; padding: 48px 40px 36px; display: flex; flex-direction: column; align-items: stretch; background: #202124; border-radius: 8px; box-sizing: border-box; }
.gm-logo { width: 40px; height: 40px; align-self: center; margin-bottom: 16px; }
.gm-title { text-align: center; font-size: 24px; font-weight: 400; margin: 0 0 8px; color: #e8eaed; }
.gm-subtitle { text-align: center; font-size: 16px; color: #e8eaed; margin: 0 0 32px; }
.gm-field { position: relative; margin-bottom: 8px; }
.gm-field input { width: 100%; padding: 13px 15px; font-size: 16px; border: 1px solid #5f6368; border-radius: 4px; background: transparent; color: #e8eaed; outline: none; }
.gm-field input:focus { border: 2px solid #8ab4f8; padding: 12px 14px; }
.gm-field label { position: absolute; left: 15px; top: 13px; font-size: 16px; color: #9aa0a6; background: #202124; padding: 0 4px; pointer-events: none; transition: 0.15s ease all; }
.gm-field input:focus + label,
.gm-field input:not(:placeholder-shown) + label { top: -9px; font-size: 12px; color: #8ab4f8; }
.gm-link { display: inline-block; background: transparent; border: none; color: #8ab4f8; font-size: 14px; font-weight: 500; text-decoration: none; padding: 0; margin: 4px 0 24px; cursor: pointer; }
.gm-link:hover { text-decoration: underline; }
.gm-text { font-size: 14px; color: #9aa0a6; line-height: 1.5; margin: 0 0 36px; }
.gm-actions { display: flex; justify-content: space-between; align-items: center; }
.gm-create { background: transparent; border: none; color: #8ab4f8; font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px 0; }
.gm-create:hover { text-decoration: underline; }
.gm-next { background: #8ab4f8; color: #202124; border: none; border-radius: 4px; padding: 9px 24px; font-size: 14px; font-weight: 500; cursor: pointer; }
.gm-next:hover { background: #aecbfa; }
.gm-account { display: inline-flex; align-items: center; gap: 10px; align-self: center; border: 1px solid #5f6368; border-radius: 100px; background: transparent; color: #e8eaed; padding: 4px 12px 4px 4px; margin: 0 auto 24px; cursor: pointer; }
.gm-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff0033, #ff6b6b); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
@media (max-width: 600px) {
  .auth-modal-card { width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; border: none; }
  .custom-modal.active .auth-modal-card { top: 0; left: 0; transform: none; }
  .modal-backdrop { display: none; }
  .gm-card { height: 100vh; max-width: 100%; border-radius: 0; padding: 40px 24px 24px; justify-content: flex-start; }
  .gm-actions { margin-top: auto; padding-top: 40px; }
}

/* Google style light */
.gm-wrapper { width: 100%; }
.gm-card { width: 100%; max-width: 450px; padding: 48px 40px 36px; display: flex; flex-direction: column; align-items: stretch; background: #fff; border-radius: 8px; box-sizing: border-box; border: 1px solid #dadce0; }
.gm-logo { width: 40px; height: 40px; align-self: center; margin-bottom: 16px; }
.gm-title { text-align: center; font-size: 24px; font-weight: 400; margin: 0 0 8px; color: #202124; }
.gm-subtitle { text-align: center; font-size: 16px; color: #202124; margin: 0 0 24px; }
.gm-field { position: relative; margin-bottom: 28px; }
.gm-field input { width: 100%; padding: 13px 15px; font-size: 16px; border: 1px solid #dadce0; border-radius: 4px; outline: none; background: transparent; color: #202124; }
.gm-field input:focus { border: 2px solid #1a73e8; padding: 12px 14px; }
.gm-field label { position: absolute; left: 15px; top: 13px; font-size: 16px; color: #5f6368; background: #fff; padding: 0 4px; pointer-events: none; transition: 0.15s ease all; }
.gm-field input:focus + label,
.gm-field input:not(:placeholder-shown) + label { top: -9px; font-size: 12px; color: #1a73e8; }
.gm-forgot { display: inline-block; background: transparent; border: none; color: #1a73e8; font-size: 14px; font-weight: 500; text-decoration: none; margin-bottom: 36px; cursor: pointer; }
.gm-forgot:hover { text-decoration: underline; }
.gm-info { font-size: 14px; color: #5f6368; line-height: 1.5; margin: 0 0 36px; }
.gm-learn { background: transparent; border: none; color: #1a73e8; font-weight: 500; cursor: pointer; padding: 0; }
.gm-bottom { display: flex; justify-content: space-between; align-items: center; }
.gm-bottom-right { justify-content: flex-end; }
.gm-create { background: transparent; border: none; color: #1a73e8; font-size: 14px; font-weight: 500; cursor: pointer; }
.gm-create:hover { text-decoration: underline; }
.gm-btn { background: #1a73e8; color: #fff; border: none; border-radius: 4px; padding: 10px 24px; font-size: 14px; font-weight: 500; cursor: pointer; }
.gm-btn:hover { background: #1765cc; }
.gm-user { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; border: 1px solid #dadce0; border-radius: 100px; background: transparent; padding: 4px 12px 4px 4px; margin-bottom: 24px; cursor: pointer; }
.gm-user-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff0033, #ff6b6b); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; }
#login-form { display: none; }
#login-form.active { display: flex; }
#register-form { display: none; }
#register-form.active { display: flex; }

@media (max-width: 600px) {
  .auth-modal-card { width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; border: none; }
  .custom-modal.active .auth-modal-card { top: 0; left: 0; transform: none; }
  .modal-backdrop { display: none; }
  .gm-card { height: 100vh; max-width: 100%; border-radius: 0; padding: 40px 24px 24px; border: none; }
  .gm-bottom { margin-top: auto; padding-top: 40px; }
}

/* Login theme (dark by default) */
:root {
  --login-card-bg: #1e1e24;
  --login-card-border: rgba(255, 255, 255, 0.12);
  --login-text: #f4f4f7;
  --login-text-muted: #a0a0ab;
  --login-accent: #3ea6ff;
  --login-accent-hover: #65b8ff;
  --login-accent-contrast: #0a0a0d;
  --login-input-border: rgba(255, 255, 255, 0.18);
}

body.light-theme {
  --login-card-bg: #ffffff;
  --login-card-border: #dadce0;
  --login-text: #202124;
  --login-text-muted: #5f6368;
  --login-accent: #1a73e8;
  --login-accent-hover: #1765cc;
  --login-accent-contrast: #ffffff;
  --login-input-border: #dadce0;
}

.auth-modal-card,
#login-form.gm-card {
  background: var(--login-card-bg);
  border-color: var(--login-card-border);
  color: var(--login-text);
}

#login-form .gm-title { color: var(--login-text); }
#login-form .gm-subtitle { color: var(--login-text-muted); }

#login-form .gm-field input {
  border-color: var(--login-input-border);
  color: var(--login-text);
  caret-color: var(--login-accent);
}

#login-form .gm-field input:focus { border-color: var(--login-accent); }

#login-form .gm-field label {
  color: var(--login-text-muted);
  background: var(--login-card-bg);
}

#login-form .gm-field input:focus + label,
#login-form .gm-field input:not(:placeholder-shown) + label { color: var(--login-accent); }

#login-form .gm-forgot,
#login-form .gm-create { color: var(--login-accent); }

#login-form .gm-btn {
  background: var(--login-accent);
  color: var(--login-accent-contrast);
}

#login-form .gm-btn:hover { background: var(--login-accent-hover); }

#login-form .gm-logo circle { stroke: var(--login-accent); }
#login-form .gm-logo text { fill: var(--login-accent); }

/* ==========================================================================
   Seja membro (memberships de canais monetizados)
   ========================================================================== */
.membership-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid rgba(62, 166, 255, 0.55);
  background: rgba(62, 166, 255, 0.12);
  color: #3ea6ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.membership-btn:hover { background: rgba(62, 166, 255, 0.22); }
.channel-action-row .membership-btn { height: 36px; }

.membership-modal-card {
  position: relative;
  width: 92%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  z-index: 10;
}
.membership-modal-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  padding-right: 32px;
  color: var(--text-primary);
}
.membership-modal-sub {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}
.membership-tiers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.membership-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.membership-tier:hover { border-color: rgba(62, 166, 255, 0.5); }
.membership-tier.selected { border-color: var(--brand-red); background: rgba(255, 0, 63, 0.08); }
.membership-tier .tier-name { font-size: 14px; font-weight: 700; }
.membership-tier .tier-price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.membership-tier .tier-price small { font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.membership-tier .tier-benefits {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}
.membership-field { margin-bottom: 12px; }
.membership-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.membership-field input,
.membership-field select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.membership-field input:focus,
.membership-field select:focus { border-color: var(--brand-red); }
.membership-error { min-height: 18px; color: #ff5252; font-size: 12px; margin-bottom: 8px; }
.membership-submit { width: 100%; }
.membership-success { font-size: 14px; line-height: 1.5; margin: 0 0 12px; color: var(--text-primary); }
.membership-hint { font-size: 13px; color: var(--text-secondary); margin: 0 0 10px; }
.membership-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.membership-payload { display: flex; flex-direction: column; gap: 8px; }
.membership-payload code {
  display: block;
  word-break: break-all;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
}
.membership-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.membership-actions .yt-blue-btn { text-decoration: none; }
.membership-cancel-btn { margin-right: auto; color: #ff5252; }
.membership-cancel-btn:hover { color: #ff1744; text-decoration: underline; }
.membership-btn.membership-active {
  border-color: rgba(0, 230, 118, 0.55);
  background: rgba(0, 230, 118, 0.14);
  color: #00e676;
}
.membership-btn.membership-active:hover { background: rgba(0, 230, 118, 0.22); }
.membership-tier-static { cursor: default; }

/* Report modal */
.report-modal-card {
  position: relative;
  width: 92%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  z-index: 10;
}
.report-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
  padding-right: 32px;
}
.report-modal-sub {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.report-details-input {
  width: 100%;
  min-height: 84px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}
.report-details-input:focus { border-color: var(--brand-red); }
.report-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.membership-tier-static:hover { border-color: var(--border-color); }

body.light-theme .post-category-programacao {
  color: #6f2bd1;
  background-color: rgba(111, 43, 209, 0.1);
  border-color: rgba(111, 43, 209, 0.35);
}
body.light-theme .post-category-tecnologia {
  color: #0969b8;
  background-color: rgba(9, 105, 184, 0.1);
  border-color: rgba(9, 105, 184, 0.35);
}
body.light-theme .post-category-jogos {
  color: #087a45;
  background-color: rgba(8, 122, 69, 0.1);
  border-color: rgba(8, 122, 69, 0.35);
}
body.light-theme .post-category-ao-vivo {
  color: #c2183c;
  background-color: rgba(194, 24, 60, 0.1);
  border-color: rgba(194, 24, 60, 0.35);
}
body.light-theme .post-category-design {
  color: #b3206d;
  background-color: rgba(179, 32, 109, 0.1);
  border-color: rgba(179, 32, 109, 0.35);
}
body.light-theme .post-category-geral {
  color: #606060;
  background-color: rgba(96, 96, 96, 0.08);
  border-color: rgba(96, 96, 96, 0.28);
}

@media (max-width: 768px) {
  .feed-posts-list { padding-left: 0; padding-right: 0; }
  .channel-posts-wrap { padding: 0 4px 24px; }
  .post-composer,
  .post-card { padding: 13px; border-radius: 13px; }
  .post-composer-submit { width: 100%; justify-content: flex-end; margin-left: 0; }
  .post-compose-error { flex: 1; max-width: none; text-align: left; }
  .post-composer-tools { width: 100%; }
  .post-image { max-height: 380px; }
  .post-poll-option-top { font-size: 12px; }
  .post-head { gap: 9px; }
  .post-head-actions { gap: 3px; }
  .post-category-badge { padding: 3px 8px; font-size: 10.5px; }
}
