/* Body and layout */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: #1e1e1e;
  color: #f1f1f1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background: #2c2c3a; /* slightly bluish dark */
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header button {
  background: #1f4a8a; /* dark blue button */
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

header button:hover {
  background: #3a6ea5; /* brighter blue on hover */
}

/* Main layout: 3 columns */
main {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 1rem;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

.column {
  display: flex;
  flex-direction: column;
  background: #1f2a40; /* dark bluish background */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 1rem;
  overflow-y: auto;
}

.left-column {
  flex: 1; /* 1 part of available space */
  min-width: 200px; /* optional, so columns don’t get too small */
}

.media-column {
  flex: 2; /* 2 parts of available space */
  min-width: 300px;
}

/* File tree */
.file-tree {
  position: relative;
  flex: 1;
}

.file-tree ul {
  list-style: none;
  padding-left: 1rem;
}

.file-tree li {
  cursor: pointer;
  margin: 0.25rem 0;
  position: relative;
  border-radius: 4px;
  transition: background 0.2s ease;
  padding: 2px 4px;
}

/* Highlight entire li on hover */
.file-tree li:hover {
  background-color: rgba(58, 110, 165, 0.3); /* semi-transparent blue highlight */
}

.file-tree li span.name {
  display: flex;
  align-items: center;
  flex: 1;
  padding-right: 100px;
}

/* Underline file names on hover */
.file-tree li span.name.file:hover {
  text-decoration: underline;
}

.file-tree li span.icon {
  margin-right: 0.5rem;
}

.file-tree li span.size {
  position: absolute;
  right: 0;
  top: 2px;
  font-size: 0.85rem;
  color: #88a0c0;
  white-space: nowrap;
}

.file-tree li ul {
  display: none;
  padding-left: 1.5rem;
}

.file-tree li.open > ul {
  display: block;
}

/* Media viewer */
.media-viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16202b; /* darker blue background */
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  padding: 0.5rem; /* optional inner spacing so video doesn't touch edges */
  box-sizing: border-box; /* include padding in width calculation */
}

.media-viewer video,
.media-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain; /* ensures it scales without cropping */
}

.media-viewer p {
  color: #88a0c0;
  font-size: 1rem;
  text-align: center;
}