/* ---------- Theme variables (overridden per-event by JS) ---------- */
:root {
  --brand-primary: #ff3d7f;
  --brand-accent: #b244ff;
  --brand-bg-start: #1a1030;
  --brand-bg-end: #0b0b10;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100vh;
  background: radial-gradient(ellipse at top, var(--brand-bg-start) 0%, var(--brand-bg-end) 60%);
  color: #f4f4f7;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,10,18,0.6);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(178,68,255,0.4);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.brand-text h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 0.2px; }
.brand-text .sub { margin: 2px 0 0; font-size: 13px; color: #9a9aae; }
.header-actions { display: flex; gap: 10px; }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #f4f4f7;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ---------- Main ---------- */
main { padding: 28px 32px 80px; max-width: 1400px; margin: 0 auto; }

/* ---------- Grid ---------- */
.grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 32px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 18px;
}
.section-header:first-child { padding-top: 0; }
.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-count {
  font-size: 13px;
  color: #6a6a7e;
  font-weight: 500;
}
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 12px;
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1a24;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255,255,255,0.06);
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.15);
}
.tile img, .tile video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.tile:hover img, .tile:hover video { transform: scale(1.04); }
.tile .badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tile .badge.gif { background: color-mix(in srgb, var(--brand-accent) 90%, transparent); }
.tile .badge.strip { background: rgba(68,215,255,0.9); color: #062a33; }

/* Like heart button on each tile */
.like-btn {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}
.like-btn:hover { background: rgba(0,0,0,0.85); transform: scale(1.06); }
.like-btn .heart { font-size: 17px; line-height: 1; }
.like-btn.liked { background: color-mix(in srgb, var(--brand-primary) 92%, transparent); border-color: var(--brand-primary); }
.like-btn.liked .heart { color: #fff; animation: like-pop 0.35s ease; }
@keyframes like-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ---------- Empty / loading ---------- */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: #8a8a9e;
}
.empty-emoji { font-size: 64px; margin-bottom: 16px; }
.empty h2 { margin: 0 0 8px; color: #f4f4f7; font-size: 24px; }
.empty p { margin: 0 0 16px; font-size: 15px; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--brand-accent);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 20px;
  color: #6a6a7e;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(4,4,10,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(8px);
}
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 56px; height: 56px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-inner {
  max-width: 92vw; max-height: 92vh;
  display: flex; flex-direction: column; gap: 16px;
  align-items: center;
}
.lightbox-inner img, .lightbox-inner video {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.lightbox-actions { display: flex; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 24px rgba(178,68,255,0.35);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(178,68,255,0.5); }
.btn-primary { /* same as .btn */ }
.btn.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #f4f4f7;
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.15);
}
.btn.btn-ghost:hover { background: rgba(255,255,255,0.15); }

/* ---------- Single-photo page ---------- */
.single-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  text-align: center;
}
.single-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.single-img {
  max-width: 95vw;
  max-height: 75vh;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.single-actions {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header { padding: 16px 18px; }
  .brand-text h1 { font-size: 18px; }
  main { padding: 20px 14px 60px; }
  .section-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .section-title { font-size: 17px; }
}
