* { box-sizing: border-box; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  margin: 0;
  color: #222;
}
.topbar {
  background: #1f2937;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: #fff; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.login-box h2 { margin-top: 0; }
.login-box input {
  width: 100%;
  padding: 10px;
  margin: 6px 0 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.login-box button {
  width: 100%;
  padding: 10px;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.error { color: #b91c1c; margin-bottom: 10px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.card .thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #000;
  display: block;
}
.card .thumb.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
}
.card .meta {
  padding: 8px 10px;
  font-size: 12px;
  color: #555;
}
.card .actions {
  display: flex;
  border-top: 1px solid #eee;
}
.card .actions a {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  text-decoration: none;
  color: #1f2937;
}
.card .actions a:first-child { border-right: 1px solid #eee; }
.empty { text-align: center; color: #777; margin-top: 60px; }

.filters { margin: 16px 0; }
.filters a {
  display: inline-block;
  padding: 8px 18px;
  margin-right: 8px;
  border-radius: 4px;
  background: #fff;
  color: #1f2937;
  text-decoration: none;
  font-size: 14px;
  border: 1px solid #ddd;
}
.filters a.active {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox-overlay.open { display: flex; }
.lightbox-content { max-width: 90vw; max-height: 85vh; }
.lightbox-content img,
.lightbox-content video {
  max-width: 90vw;
  max-height: 85vh;
  display: block;
  margin: 0 auto;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px 18px;
  user-select: none;
}
.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }
.lightbox-caption {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ddd;
  font-size: 14px;
  padding: 0 60px;
}
