/* Minimal, clean layout */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;
  background: #f6f7f9;
}
a { color: inherit; }

.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e6e8ee;
}
.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}
.brand-title { font-weight: 700; letter-spacing: 0.2px; }
.brand-sub { color: #667085; font-size: 14px; }
.nav {
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
}
.nav a:hover { background: #f0f2f6; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}
.muted { color: #667085; }

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

.entryCard {
  overflow: hidden;
  padding: 0;
}
.entryCover {
  height: 150px;
  background: linear-gradient(135deg, #eef2ff, #fef3c7);
  border-bottom: 1px solid #e6e8ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  font-weight: 800;
}
.entryCover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.entryBody {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.tag:hover { background: #eaecf0; }

.searchBar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.searchBar input {
  flex: 1;
  min-width: 240px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.thumb {
  border: 1px solid #e6e8ee;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.thumbMedia {
  height: 120px;
  background: #f2f4f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  font-weight: 800;
}
.thumbMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumbBody {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e6e8ee;
  width: min(980px, 100%);
  height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modalHeader {
  padding: 12px 14px;
  border-bottom: 1px solid #e6e8ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modalTitle { font-weight: 800; }
.modalBody {
  padding: 0;
  background: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  overflow: auto;
}
.modalBody img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.modalBody iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.card {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 {
  margin: 0;
  font-size: 16px;
}
.card p { margin: 0; color: #475467; }
.pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3538cd;
  font-weight: 700;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d5dd;
  background: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #f7f7f8; }
.btn.primary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.btn.primary:hover { background: #0b1220; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filelist {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fileitem {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.filemeta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.filename { font-weight: 700; }
.filesub { color: #667085; font-size: 13px; }

.notice {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e6e8ee;
}
.error {
  border-color: #fecdca;
  background: #fffbfa;
  color: #b42318;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  margin: 32px auto;
}

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

