{# ---------- STYLES (you can move to CSS file) ---------- #}
<style>
.library-section {
  padding: 2rem 0;
}

.folder-grid,
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.folder-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  width: 100%;
}

.folder-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.folder-icon {
  width: 250px;
  height: 150px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  
}

.fallback-folder-icon {
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.folder-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color:#000000;
}

.folder-item:hover .folder-label {
  color: #ffffff;
}

.file-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.file-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.file-icon-wrapper {
  margin-bottom: 0.5rem;
}

.file-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.fallback-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-name {
  text-align: center;
  font-size: 0.85rem;
  color: #333;
}

.files-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.back-button {
  border: none;
  background: none;
  padding: 0;
  color: #BE3A34;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

#files-folder-title {
  margin: 0;
  padding-left: 20px;
  border-left: 1px solid #e0e0e0;
}

.hidden {
  display: none;
}
</style>
