:root {
  --bg-cosmic: #05070f;
  --bg-sidebar: rgba(10, 15, 29, 0.7);
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(0, 242, 254, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #00f2fe;
  --accent-purple: #4facfe;
  --accent-violet: #7928ca;
  --accent-green: #10b981;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 240px;
  --player-h: 74px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-cosmic);
  background-image: 
    radial-gradient(at 0% 0%, rgba(121, 40, 202, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Sidebar (Desktop) */
.sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 28px;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(79, 172, 254, 0.1));
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header & Search */
.header-bar {
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(5, 7, 15, 0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 5;
}

.search-box {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  padding: 10px 20px 10px 44px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
  background: rgba(15, 23, 42, 0.85);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Views & Pages */
.content-area {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  padding-bottom: 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 242, 254, 0.3) transparent;
}

.content-area::-webkit-scrollbar {
  width: 4px;
}

.content-area::-webkit-scrollbar-track {
  background: transparent;
}

.content-area::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 254, 0.3);
  border-radius: 99px;
}

.content-area::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.55);
}

/* Watch page: sem padding lateral extra, scroll permitido */
.content-area.watch-active-no-scroll {
  padding: 0;
}

.view-section {
  display: none !important;
}

.view-section.active {
  display: block !important;
}

/* Watch page precisa de flex quando ativa */
#view-watch.active {
  display: flex !important;
  flex-direction: column;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Video Grid (Exatamente 3 Cards por Linha no Desktop como no YouTube) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.video-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 12px 30px -10px rgba(0, 242, 254, 0.15);
}

.thumb-container {
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  background: #0f172a;
}

.thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
}

.card-info {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-main);
  transition: color 0.2s ease;
}

.video-card:hover .card-title {
  color: var(--accent-cyan);
}

.card-channel {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-card-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-action:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Floating Bottom Player */
.bottom-player {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-h);
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 20;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 280px;
}

.player-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #1e293b;
}

.player-meta {
  overflow: hidden;
}

.player-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 500px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ctrl-btn:hover {
  color: var(--text-main);
}

.ctrl-btn-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #05070f;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

.progress-bar-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  width: 35%;
  height: 100%;
  background: var(--accent-cyan);
  border-radius: 9999px;
  position: relative;
}

.player-right {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 200px;
  justify-content: flex-end;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .header-bar {
    padding: 12px 16px;
  }
  .content-area {
    padding: 16px;
    padding-bottom: calc(var(--player-h) + 70px);
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .bottom-player {
    bottom: 60px;
    height: 60px;
  }
  .mobile-nav {
    display: flex !important;
  }
}

/* Mobile Bottom Navigation Bar */
.mobile-nav {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  align-items: center;
  justify-content: space-around;
  z-index: 25;
}

.mob-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
}

.mob-item.active {
  color: var(--accent-cyan);
}

/* =========================================
   Theater Modal - ReproduÃ§Ã£o Sem AnÃºncios
   ========================================= */
.video-theater-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-theater-modal.active {
  opacity: 1;
  visibility: visible;
}

.theater-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.theater-card {
  position: relative;
  z-index: 2;
  width: 92%;
  max-width: 980px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 242, 254, 0.15);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-theater-modal.active .theater-card {
  transform: scale(1);
}

/* Modo Miniatura Picture-in-Picture */
.video-theater-modal.pip-mode {
  pointer-events: none;
}

.video-theater-modal.pip-mode .theater-backdrop {
  display: none;
}

.video-theater-modal.pip-mode .theater-card {
  pointer-events: auto;
  position: fixed;
  bottom: 85px;
  right: 24px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 242, 254, 0.3);
  z-index: 105;
}

.theater-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(5, 7, 15, 0.6);
}

.theater-title-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  margin-right: 12px;
}

.theater-badge-clean {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(0, 242, 254, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
}

.theater-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.theater-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theater-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theater-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  border-color: rgba(0, 242, 254, 0.3);
}

/* Frame do player: cresce para preencher o espaÃ§o disponÃ­vel, respeitando o aspect ratio 16:9 */
.theater-frame-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  position: relative;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

/* Fallback: garante aspect ratio mÃ­nimo mesmo sem conteÃºdo */
.theater-frame-wrap::before {
  content: '';
  display: block;
  padding-top: 56.25%;
  position: absolute;
  width: 100%;
  pointer-events: none;
}

#theater-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.theater-loading-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #040508;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  z-index: 5;
  transition: opacity 0.4s ease;
}

.theater-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 242, 254, 0.15);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* =========================================
   PÃ­lulas de Categorias YouTube
   ========================================= */
.explore-header-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 900px) {
  .explore-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: rgba(0, 242, 254, 0.3);
}

.cat-pill.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #05070f;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.4);
  border-color: transparent;
}

/* =========================================
   YouTube UI Clone Styling (Barra de Busca, Header e Playlists)
   ========================================= */
.yt-header {
  padding: 12px 24px;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.yt-header-left {
  display: flex;
  align-items: center;
}

.mobile-brand-show {
  display: none;
  padding: 0;
  font-size: 18px;
}

.yt-search-box {
  display: flex;
  align-items: center;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.yt-search-input-wrap {
  flex: 1;
  position: relative;
}

.yt-input {
  width: 100%;
  height: 40px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-right: none;
  border-radius: 40px 0 0 40px;
  padding: 0 18px;
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.yt-input:focus {
  border-color: #1c62b9;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  background: rgba(18, 24, 38, 0.95);
}

.yt-search-btn {
  height: 40px;
  width: 64px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0 40px 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.yt-search-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.yt-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.yt-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Playlist Hero Banner */
.playlist-hero-banner {
  background: linear-gradient(135deg, rgba(20, 27, 45, 0.7), rgba(12, 17, 30, 0.9));
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
}

.playlist-presets-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.playlist-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-preset-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-chip:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Header de Playlist Carregada */
.playlist-header-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 14px;
  margin-bottom: 20px;
}

.playlist-header-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.playlist-header-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.playlist-header-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Card Badge de Playlist */
.playlist-idx-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 2;
}

@media (max-width: 768px) {
  .mobile-brand-show {
    display: flex !important;
  }
  .yt-header {
    padding: 10px 14px;
  }
}

/* =========================================
   YouTube Watch Page View (#view-watch)
   PÃ¡gina de ReproduÃ§Ã£o Dedicada sem Modal
   ========================================= */
#view-watch {
  padding: 0;
  width: 100%;
  height: 100%;
  /* display gerenciado por .view-section e .view-section.active */
}

.yt-watch-page-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 16px;
  overflow: hidden;
}

.yt-watch-top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.btn-yt-back {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-yt-back:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateX(-2px);
}

.yt-watch-body {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.yt-watch-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
  min-height: 0;
}

.yt-watch-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0; /* Nunca comprime â€” sempre visÃ­vel abaixo do player */
}

.yt-watch-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-channel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-violet));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-channel-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.yt-video-views {
  font-size: 12px;
  color: var(--text-muted);
}

.yt-watch-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.btn-yt-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-yt-action:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* Sidebar de Playlist e Fila */
.yt-watch-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  overflow: hidden;
  height: 100%;
  max-height: 100%;
}

.yt-sidebar-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(12, 17, 30, 0.6);
}

.yt-sidebar-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
  display: block;
}

.yt-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.btn-download-all-pl {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.2));
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: 9999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-download-all-pl:hover {
  background: var(--accent-cyan);
  color: #05070f;
}

.yt-related-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 242, 254, 0.3) transparent;
}

.yt-related-list::-webkit-scrollbar {
  width: 4px;
}

.yt-related-list::-webkit-scrollbar-track {
  background: transparent;
}

.yt-related-list::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 254, 0.3);
  border-radius: 99px;
}

.yt-related-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  gap: 12px;
  color: var(--accent-cyan);
  font-size: 13px;
}

.yt-related-item {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  align-items: center;
}

.yt-related-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 242, 254, 0.2);
  transform: translateX(2px);
}

.yt-related-item.playing-now {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
}

/* Thumbnail compacto (16:9 fixo em 80x45px) */
.yt-rel-thumb-wrap {
  width: 80px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #000;
}

.yt-rel-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-rel-duration {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1.3;
}

.yt-rel-idx {
  position: absolute;
  top: 2px;
  left: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1.3;
}

.yt-rel-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.yt-rel-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-rel-channel {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* BotÃµes de download aparecem sÃ³ no hover do item (economiza espaÃ§o vertical) */
.yt-rel-actions {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.yt-related-item:hover .yt-rel-actions,
.yt-related-item.playing-now .yt-rel-actions {
  opacity: 1;
  pointer-events: auto;
}

.btn-rel-download {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-rel-download:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

@media (max-width: 992px) {
  .yt-watch-body {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
  .yt-watch-main {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
  .yt-watch-card {
    height: 94vh !important;
  }
}

/* =========================================
   Sistema de Downloads â€” Fila, Toast e HistÃ³rico
   ========================================= */

/* Badge de contagem no tÃ­tulo da seÃ§Ã£o */
.dl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #05070f;
  font-size: 10px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  margin-left: 8px;
}

/* Badge no item do menu lateral */
.nav-dl-badge {
  margin-left: auto;
  background: var(--accent-cyan);
  color: #05070f;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: pulse-badge 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.9); }
}

/* Item da fila de downloads ativos */
.dl-queue-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 14px;
  transition: opacity 0.4s ease;
}

.dl-queue-item.dl-done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.dl-qi-thumb {
  width: 72px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #0f172a;
}

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

.dl-qi-type {
  position: absolute;
  bottom: 3px;
  right: 3px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.4;
}

.dl-qi-type.mp3 { background: rgba(0, 242, 254, 0.9); color: #000; }
.dl-qi-type.mp4 { background: rgba(121, 40, 202, 0.9); color: #fff; }

.dl-qi-info { flex: 1; min-width: 0; }

.dl-qi-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.dl-qi-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.dl-done .dl-qi-status { color: #10b981; }

/* Spinner inline para o item da fila */
.dl-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 242, 254, 0.25);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Barra de progresso */
.dl-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.dl-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 9999px;
  transition: width 0.8s ease;
}

/* Item do histÃ³rico de downloads */
.dl-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: background 0.2s ease;
}

.dl-history-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 242, 254, 0.2);
}

.dl-hi-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dl-hi-icon.audio { background: rgba(0, 242, 254, 0.15); color: var(--accent-cyan); }
.dl-hi-icon.video { background: rgba(121, 40, 202, 0.2); color: #a78bfa; }

.dl-hi-info { flex: 1; min-width: 0; }

.dl-hi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dl-hi-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dl-hi-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Toast de notificaÃ§Ã£o de download iniciado */
.dl-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--text-main);
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 242, 254, 0.1);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.dl-toast svg { color: var(--accent-cyan); flex-shrink: 0; }

/* Empty state da aba Downloads */
.dl-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

.dl-empty-state svg {
  opacity: 0.3;
}

.dl-empty-state p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.7;
}

/* AÃ§Ãµes do item de histÃ³rico */
.dl-hi-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* BotÃ£o assistir no YouTube */
.btn-dl-watch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 60, 60, 0.3);
  border-radius: 9999px;
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-dl-watch:hover {
  background: rgba(255, 0, 0, 0.22);
  border-color: rgba(255, 60, 60, 0.6);
  color: #fca5a5;
  transform: translateY(-1px);
}


.dl-toast-show {
  transform: translateY(0);
  opacity: 1;
}

/* =========================================
   MOBILE FIX — Watch Page Responsiva
   ========================================= */
@media (max-width: 860px) {
  .yt-watch-body {
    grid-template-columns: 1fr !important;
    overflow-y: auto;
    height: auto;
  }
  .yt-watch-page-container {
    overflow-y: auto !important;
    height: 100%;
  }
  .yt-watch-main {
    padding: 10px;
  }
  .theater-frame-wrap {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-top: 56.25% !important;
    flex: none !important;
    min-height: unset !important;
  }
  .theater-frame-wrap::before { display: none; }
  #theater-iframe {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
  }
  .yt-watch-sidebar {
    height: auto;
    max-height: 50vh;
  }
  .yt-watch-actions-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .yt-watch-buttons {
    width: 100%;
    flex-wrap: wrap;
  }
  .btn-yt-action {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 7px 10px;
  }
  .yt-watch-top-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .theater-title {
    font-size: 12px;
  }
}

/* =========================================
   Modal de Login — Glassmorphism
   ========================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 242, 254, 0.1);
  margin: 16px;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--text-main);
  margin-bottom: 6px;
}

.login-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12);
}

select.login-input { cursor: pointer; }
select.login-input option { background: #0f172a; color: var(--text-main); }

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  border-radius: 12px;
  color: #05070f;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.2s;
}

.login-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-error {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fca5a5;
}

/* =========================================
   Avatar do Usuário no Header
   ========================================= */
.user-avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #05070f;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(0, 242, 254, 0.4);
  transition: border-color 0.2s, transform 0.2s;
}

.user-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar-btn:hover .user-avatar {
  border-color: var(--accent-cyan);
  transform: scale(1.05);
}

/* =========================================
   Dropdown de Perfil
   ========================================= */
.profile-dropdown {
  position: fixed;
  top: 68px;
  right: 20px;
  width: 240px;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 9997;
  overflow: hidden;
  animation: fadeDown 0.2s ease;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.pd-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #05070f;
  font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}

.pd-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.pd-name { font-size: 14px; font-weight: 700; color: var(--text-main); }

.pd-role {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pd-role.role-admin  { background: rgba(249,115,22,0.2);  color: #fb923c; border: 1px solid rgba(249,115,22,0.4); }
.pd-role.role-guest  { background: rgba(0,242,254,0.12);  color: var(--accent-cyan); border: 1px solid rgba(0,242,254,0.3); }
.pd-role.role-kids   { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.4); }

.pd-divider { height: 1px; background: var(--glass-border); }

.pd-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.pd-item:hover { background: rgba(255,255,255,0.06); color: var(--text-main); }
.pd-logout:hover { background: rgba(248,113,113,0.1); color: #f87171; }

/* =========================================
   Badge de Role na table de membros
   ========================================= */
.role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.role-badge.admin { background: rgba(249,115,22,.2); color:#fb923c; border:1px solid rgba(249,115,22,.4); }
.role-badge.guest { background: rgba(0,242,254,.12); color:var(--accent-cyan); border:1px solid rgba(0,242,254,.3); }
.role-badge.kids  { background: rgba(16,185,129,.15); color:#34d399; border:1px solid rgba(16,185,129,.4); }

/* =========================================
   Tabela de Membros
   ========================================= */
.members-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.members-table th {
  padding: 13px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 15, 30, 0.5);
}

.members-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.members-table tr:last-child td { border-bottom: none; }

.members-table tr:hover td { background: rgba(255,255,255,0.025); }

.member-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-mini-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-violet));
  color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.member-mini-avatar img { width:100%;height:100%;object-fit:cover;border-radius:50%; }
.member-username { font-weight: 600; color: var(--text-main); }
.member-display  { font-size: 11px; color: var(--text-muted); }

.btn-member-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(0,242,254,.15), rgba(79,172,254,.12));
  border: 1px solid rgba(0,242,254,.35);
  border-radius: 12px;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-member-new:hover {
  background: linear-gradient(135deg, rgba(0,242,254,.25), rgba(79,172,254,.2));
  transform: translateY(-1px);
}

.btn-member-action {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-right: 4px;
}

.btn-member-action.edit:hover  { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.btn-member-action.del:hover   { border-color: #f87171; color: #f87171; }

/* =========================================
   Modal de Membro
   ========================================= */
.member-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,5,8,0.8);
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-modal {
  width: 100%;
  max-width: 460px;
  background: rgba(12,18,34,0.95);
  border: 1px solid rgba(0,242,254,0.25);
  border-radius: 20px;
  padding: 28px;
  margin: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.member-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.member-modal-header h3 { font-size: 18px; font-weight: 700; color: var(--text-main); }

.member-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.member-modal-close:hover { color: #f87171; }

/* =========================================
   Minha Conta - Card Centralizado
   ========================================= */
.account-container-centered {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 10px 0 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.account-card {
  width: 100%;
  max-width: 560px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 242, 254, 0.05);
}

.account-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.account-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #05070f;
  font-size: 30px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.25);
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.account-user-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.account-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.account-role-badge {
  margin-bottom: 6px;
}

.avatar-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.btn-avatar-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-avatar-action:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-fav-card {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(5,7,15,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  z-index: 3;
}

.btn-fav-card:hover, .btn-fav-card.active {
  background: rgba(248,113,113,0.2);
  border-color: #f87171;
  color: #f87171;
}

.btn-fav-card.active svg { fill: #f87171; }

/* Botão favoritar na watch page */
.btn-fav-watch.active {
  background: rgba(248,113,113,0.15);
  border-color: #f87171;
  color: #f87171;
}

.btn-fav-watch.active svg { fill: #f87171; }

/* =========================================
   Kids Mode Banner
   ========================================= */
.kids-mode-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(0,242,254,.1));
  border: 1px solid rgba(16,185,129,.4);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 16px;
}
