:root {
    --radius: 10px;
}

/* NEO-BRUTALIST VLOG PAGE */

.pvideo-body .content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 20px 40px 20px; /* Aligned with global fixed header */
}

.youtube-layout {
  display: flex;
  gap: 30px;
  padding: 20px 0;
  align-items: flex-start;
  position: relative;
}

/* SIDEBAR - TRULY FIXED POSITION */
.youtube-sidebar {
  flex: 0 0 400px;
  width: 400px;
  background: var(--white);
  border: var(--border);
  padding: 25px;
  position: fixed;
  top: 120px; /* Below fixed header with gap */
  left: 40px; /* Align with content max-width if possible */
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  box-shadow: var(--shadow);
  z-index: 100;
  border-radius: var(--radius);
}

/* Adjust main content to not be covered by fixed sidebar */
#youtube-main-content {
    flex: 1;
    min-width: 0;
    margin-left: 440px; /* Width of sidebar (400) + gap (40) */
}

.sidebar-title { 
    color: var(--fg); 
    font-size: 1.1rem; 
    margin-bottom: 20px; 
    border-bottom: var(--border); 
    padding-bottom: 10px; 
    text-transform: uppercase; 
    font-weight: 900; 
}

.youtube-video-wrapper {
  background: var(--white);
  border: var(--border);
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
}

.youtube-video-wrapper:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0px 0px var(--fg);
}

.youtube-video-wrapper iframe { 
    width: 100%; 
    aspect-ratio: 16 / 9; 
    border-bottom: var(--border);
    display: block;
}

.youtube-video-wrapper h3 { 
    color: var(--fg); 
    font-size: 1.5rem; 
    padding: 20px; 
    font-weight: 900; 
    margin: 0;
    line-height: 1.2;
}

/* FOLDER LIST - RESTORED FOLDING */
.youtube-sidebar ul { 
    list-style: none; 
    padding: 0; 
    margin: 0;
}

.youtube-sidebar ul.nested {
    display: none;
    margin-left: 20px;
    border-left: 2px dashed var(--fg);
    padding-left: 10px;
}

.youtube-sidebar ul.nested.expanded {
    display: block;
}

.youtube-sidebar .folder-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    background: var(--cream);
    border: var(--border);
    margin-bottom: 8px;
    font-weight: 900;
    font-size: 0.9rem;
    box-shadow: 2px 2px 0px 0px var(--fg);
    transition: all 0.2s;
    border-radius: var(--radius);
}

.youtube-sidebar .folder-label:hover {
    background: var(--primary);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px 0px var(--fg);
}

.youtube-sidebar .folder-label::before {
    content: "\f07b"; /* fa-folder */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
}

.youtube-sidebar .folder.expanded > .folder-label::before {
    content: "\f07c"; /* fa-folder-open */
}

.youtube-sidebar .file {
    margin: 5px 0;
}

.youtube-sidebar .file a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--fg);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.youtube-sidebar .file a::before {
    content: "\f03d"; /* fa-video */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
    color: var(--primary);
}

.youtube-sidebar .file a:hover {
    background: var(--white);
    border-color: var(--fg);
    box-shadow: 2px 2px 0px 0px var(--fg);
    transform: translate(-1px, -1px);
    border-radius: var(--radius);
}

/* PAGINATION */
.youtube-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.youtube-pagination-controls button { 
    width: 60px; 
    height: 60px; 
    background: var(--white); 
    border: var(--border); 
    color: var(--fg); 
    cursor: pointer; 
    border-radius: var(--radius);
    box-shadow: 4px 4px 0px 0px var(--fg); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.2rem;
    transition: all 0.2s;
}

.youtube-pagination-controls button:hover:not(:disabled) { 
    background: var(--primary);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px var(--fg);
}

/* RESPONSIVE MANAGEMENT */
@media (max-width: 1200px) {
    .youtube-sidebar {
        left: 20px;
    }
}

@media (max-width: 1000px) {
  .youtube-layout { flex-direction: column; }
  .youtube-sidebar { 
      position: relative; 
      top: 0; 
      left: 0;
      width: 100%; 
      flex: none;
      max-height: 400px;
      margin-bottom: 30px;
  }
  #youtube-main-content {
      margin-left: 0;
  }
}
