/* styles.css — clean, responsive, professional palette */
:root{
  --bg:#f7f8fb; --card:#ffffff; --muted:#6b7280; --accent:#2563eb; --accent-2:#0ea5a4;
  --radius:12px; --gap:12px;
}
*{box-sizing:border-box}
body{font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;margin:0;background:var(--bg);color:#111}
.container{max-width:1100px;margin:28px auto;padding:0 16px}
.site-header{background:#fff;padding:12px 0;box-shadow:0 1px 4px rgba(16,24,40,0.04)}
.site-header .container{display:flex;align-items:center;justify-content:space-between}
.brand a{text-decoration:none;color:var(--accent);font-weight:700}
.top-nav a{margin-left:12px;color:var(--muted);text-decoration:none}

.hero{background:linear-gradient(180deg,#fff, #f9fafb);padding:28px;border-radius:10px;margin-bottom:20px}
.hero h2{margin:0 0 8px 0}
.btn{display:inline-block;background:#fff;border:1px solid #e6e9ef;padding:8px 12px;border-radius:8px;cursor:pointer;text-decoration:none;color:#111}
.btn.primary{background:var(--accent);color:#fff;border:none}
.btn.danger{background:#ef4444;color:#fff;border:none}
.btn.small{padding:6px 8px;font-size:13px;border-radius:6px}

/* Admin dashboard cards */
.album-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-top:16px}
.album-card{background:var(--card);padding:12px;border-radius:12px;box-shadow:0 4px 10px rgba(2,6,23,0.04);display:flex;gap:12px;align-items:center}
.album-cover img{width:110px;height:70px;object-fit:cover;border-radius:8px}
.album-info h3{margin:0 0 6px 0}
.muted{color:var(--muted)}

.admin-thumb {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.admin-thumb img {
  display: block;
  max-width: 100%;
  height: auto;
}

.photo-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-thumb:hover .photo-actions {
  opacity: 1;
}

.album-header {
  background: #f8f9fa; /* light gray */
  padding: 2rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.album-title-block h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.album-desc {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1rem;
}

/* Video thumbnail wrapper */
.video-thumb {
  position: relative;
  display: inline-block;
}

.video-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.video-thumb video {
  display: block;
  width: 100%;
  height: auto;
}

  /* Play icon overlay for videos */
.video-thumb .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  pointer-events: none; /* Let clicks pass through */
}


.album-desc {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1rem;
}


.album-url {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 2rem;
  word-break: break-all;
}

.album-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.upload-controls {
  flex: 1;
  min-width: 250px;
}

.sort-control {
  text-align: right;
  min-width: 150px;
}


/* Album view */
.album-header{display:flex;align-items:center;justify-content:space-between}
.album-desc{color:var(--muted)}
.cover-wrapper{margin:18px 0;display:flex;justify-content:center}
.cover-photo{width:60%;max-width:600px;height:320px;object-fit:cover;border-radius:12px;box-shadow:0 6px 18px rgba(16,24,40,0.06)}

/* Grid thumbnails - square */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px}
.thumb{position:relative;background:#fff;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center;height:0;padding-bottom:100%}
.thumb img, .thumb video{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}
.select-checkbox{position:absolute;top:6px;left:6px;z-index:5}
.select-checkbox input{display:none}
.select-checkbox .checkmark{width:20px;height:20px;border-radius:6px;background:rgba(255,255,255,0.9);display:inline-block;border:1px solid #ddd;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.select-checkbox input:checked + .checkmark{background:var(--accent);border:none}

/* Lightbox overlay media sizing */
.lightbox img,
.lightbox video {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  color: #ccc;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .lightbox img,
  .lightbox video {
    max-width: 95%;
    max-height: 75%;
  }
}

input.share-url {
	width: 75%;
	justify-content: center;
	align-items: center;
	padding: 8px;
	font-size: 16px;
	margin: 10px 0 30px 0;
	border: 1px solid #ccc;
	border-radius: 4px;
}

/* Admin thumbs smaller */
.admin-thumb img{width:100%;height:100%;object-fit:cover}

/* Upload section */
.upload-section{margin-top:18px;padding:12px;background:var(--card);border-radius:10px}

/* Footer */
.site-footer{padding:18px 0;text-align:center;color:var(--muted);margin-top:20px}
