body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #f7f7f7;
  color: #333;
}

header {
  background: #4a90e2;
  color: white;
  padding: 1rem;
}

h1 {
  margin: 0;
  font-size: 1.3rem;
  padding-bottom: 1rem;
}

/* Target the existing breadcrumb container */
#breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  font-family: system-ui, sans-serif;
  cursor: pointer;
}

/* Links inside breadcrumb */
#breadcrumb a {
  text-decoration: none;
  color: #2563eb; /* blue-600 */
  background: #f1f5f9; /* slate-100 */
  padding: 4px 10px;
  border-radius: 9999px; /* pill */
  transition: all 0.2s ease;
  
}

#breadcrumb a:hover {
  background: #e0e7ff; /* indigo-100 */
  color: #1e40af; /* indigo-800 */
}

/* Separator (›) */
#breadcrumb span {
  color: #94a3b8; /* slate-400 */
  font-size: 16px;
}

/* Last item = current */
#breadcrumb span:last-child {
  font-weight: 600;
  color: #0f172a; /* slate-900 */
  background: #e2e8f0; /* slate-200 */
  padding: 4px 10px;
  border-radius: 9999px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.file-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  text-align: center;
  transition: transform .1s;
}
.file-card:hover {
  transform: scale(1.03);
}
.file-icon, .folder-icon {
  font-size: 2rem;
  margin-bottom: .5rem;
}
.file-name {
  font-size: 0.9rem;
  word-wrap: break-word;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
}
#close-viewer {
  align-self: flex-end;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}
#file-viewer {
  flex: 1;
  width: 100%;
}

.file-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 140px;
  margin: 10px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  background: #fafafa;
}

.file-card:hover {
  transform: scale(1.05);
  background: #f0f0f0;
}

.file-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 6px;
}

.folder-thumb {
  font-size: 48px;
  margin-bottom: 6px;
}

.file-name {
  text-align: center;
  font-size: 14px;
  word-break: break-word;
}
