/* ═══════════════════════════════════════════════════════════════════════════
   PixFrame — stylesheet (Patch 1.1.5)
   Aesthetic: editorial dark room / darkroom photography lab etc.
   Fonts: Playfair Display (display) + DM Sans (body)
   Coded by: @Elliot6226 and @Hero366
   Discord: Elliot6226 or elliot#6226
═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ─── Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #0d0d0d;
  --surface:     #161616;
  --surface-2:   #1e1e1e;
  --border:      #2a2a2a;
  --border-light:#333;
  --text:        #e8e4de;
  --text-muted:  #7a7570;
  --text-dim:    #4a4540;
  --accent:      #c9a84c;       /* warm gold */
  --accent-dim:  #8a6f2e;
  --up:          #4caf82;
  --down:        #c9564c;
  --radius:      6px;
  --radius-lg:   12px;
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
  --shadow:      0 4px 24px rgba(0,0,0,.55);
  --shadow-lg:   0 12px 48px rgba(0,0,0,.75);
  --trans:       .2s ease;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
ul { list-style: none; }

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ─── Flash messages ────────────────────────────────────────────────────── */
.flash {
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.flash.success { background: rgba(76,175,130,.12); border: 1px solid rgba(76,175,130,.3); color: #4caf82; }
.flash.error   { background: rgba(201, 86, 76,.12); border: 1px solid rgba(201,86,76,.3);  color: #c9564c; }

/* ─── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 62px;
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-links a, .nav-links button {
  background: none;
  border: none;
  cursor: pointer;
  padding: .45rem .9rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color var(--trans), background var(--trans);
}
.nav-links a:hover, .nav-links button:hover { color: var(--text); background: var(--surface-2); }
.nav-links .btn-upload {
  background: var(--accent);
  color: #0d0d0d;
  font-weight: 600;
  padding: .45rem 1.1rem;
}
.nav-links .btn-upload:hover { background: #dbb95a; color: #0d0d0d; }
.nav-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .75rem .3rem .5rem;
  border-radius: 2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-muted);
}
.nav-user .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: .7rem; font-weight: 700;
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: 4.5rem 2.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201,168,76,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text);
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p {
  margin-top: .9rem;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin-inline: auto;
}
.hero-cta {
  margin-top: 2rem;
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .02em;
  transition: transform var(--trans), background var(--trans), box-shadow var(--trans);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0d0d0d; }
.btn-primary:hover { background: #dbb95a; box-shadow: 0 6px 20px rgba(201,168,76,.3); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--text-muted); }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-danger { background: var(--down); color: #fff; }

/* ─── Toolbar (filters) ─────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: .5rem; }
.toolbar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: .5rem;
}
.filter-btn {
  padding: .4rem .9rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans);
}
.filter-btn:hover { border-color: var(--text-muted); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #0d0d0d; font-weight: 600; }
.toolbar-right { color: var(--text-dim); font-size: .8rem; }

/* ─── Grid ──────────────────────────────────────────────────────────────── */
.gallery {
  padding: 2rem 2rem 4rem;
  columns: 5;
  column-gap: .75rem;
}
.card {
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
  break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}
.card-img {
  width: 100%;
  display: block;
  object-fit: cover;
  background: var(--surface-2);
}
.card-body {
  padding: .85rem 1rem 1rem;
}
.card-title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .65rem;
}
.card-author {
  font-size: .75rem;
  color: var(--text-dim);
}
.card-author strong { color: var(--text-muted); }

/* ─── Vote widget ───────────────────────────────────────────────────────── */
.vote-row {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: transparent;
  cursor: pointer;
  transition: all var(--trans);
  font-size: .85rem;
  color: var(--text-muted);
}
.vote-btn:hover { transform: scale(1.1); }
.vote-btn.up:hover, .vote-btn.up.active { background: rgba(76,175,130,.15); border-color: var(--up); color: var(--up); }
.vote-btn.down:hover, .vote-btn.down.active { background: rgba(201,86,76,.15); border-color: var(--down); color: var(--down); }
.vote-score {
  font-size: .78rem;
  font-weight: 600;
  min-width: 2ch;
  text-align: center;
  color: var(--text-muted);
}
.vote-score.positive { color: var(--up); }
.vote-score.negative { color: var(--down); }

/* ─── Empty state ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  grid-column: 1 / -1;
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: .3; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-muted); }
.empty-state p { color: var(--text-dim); margin-top: .5rem; }

/* ─── Auth pages ────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--bg);
  position: relative;
}
.auth-wrap::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 20%, rgba(201,168,76,.06) 0%, transparent 60%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: block;
  text-align: center;
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--text);
}
.auth-logo span { color: var(--accent); }
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: .35rem;
}
.auth-card p.sub {
  color: var(--text-muted);
  font-size: .875rem;
  margin-bottom: 1.75rem;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .45rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: .65rem .9rem;
  color: var(--text);
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: .83rem;
  color: var(--text-dim);
}
.form-footer a { color: var(--accent); }
.form-footer a:hover { text-decoration: underline; }
.btn-block { width: 100%; justify-content: center; }

/* ─── Upload modal overlay ───────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-header h3 { font-family: var(--font-display); font-size: 1.2rem; }
.modal-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--trans);
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

/* ─── Dropzone ───────────────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--trans), background var(--trans);
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent-dim);
  background: rgba(201,168,76,.04);
}
.dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.dropzone .dz-icon { font-size: 2rem; opacity: .4; margin-bottom: .5rem; }
.dropzone p { color: var(--text-muted); font-size: .875rem; }
.dropzone p strong { color: var(--accent); }
.dropzone .preview-img {
  max-width: 100%; max-height: 180px;
  object-fit: contain;
  border-radius: var(--radius);
  margin: 0 auto .5rem;
}

/* ─── Progress bar ───────────────────────────────────────────────────────── */
.progress-wrap { display: none; margin-bottom: 1rem; }
.progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .3s ease;
}
.progress-label { font-size: .75rem; color: var(--text-muted); margin-top: .3rem; }

/* ─── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 2rem;
  padding: .75rem 2.5rem;
  border-bottom: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-dim);
}
.stats-bar strong { color: var(--text-muted); }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  font-size: .85rem;
  box-shadow: var(--shadow);
  transform: translateY(6px);
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  z-index: 999;
  max-width: 260px;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.ok   { border-color: var(--up);   color: var(--up); }
#toast.fail { border-color: var(--down); color: var(--down); }

/* ─── Card image hover overlay ──────────────────────────────────────────────── */
.card-img-wrap {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}
.card-img-wrap .card-img {
  transition: transform .35s ease;
}
.card-img-wrap:hover .card-img {
  transform: scale(1.04);
}
.card-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.38);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.card-img-overlay span {
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  padding: .4rem 1rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
}
.card-img-wrap:hover .card-img-overlay { opacity: 1; }

/* ─── Lightbox ──────────────────────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox-overlay.open { display: flex; }

.lightbox {
  display: flex;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: lbIn .28s cubic-bezier(.22,1,.36,1);
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* image pane */
.lb-img-pane {
  flex: 1 1 60%;
  min-width: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 90vh;
}
.lb-img-pane img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

/* info pane */
.lb-info {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1.75rem;
  border-left: 1px solid var(--border);
  overflow-y: auto;
}
.lb-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: .5rem;
}
.lb-author {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
.lb-date {
  font-size: .75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.lb-desc {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  margin-top: .25rem;
}
.lb-info-bottom { padding-top: 1.5rem; }
.lb-vote-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.lb-vote-row .vote-btn  { width: 36px; height: 36px; font-size: 1rem; }
.lb-vote-row .vote-score { font-size: .9rem; }

/* close button */
.lb-close {
  position: fixed;
  top: 1.1rem; right: 1.25rem;
  z-index: 310;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--trans);
}
.lb-close:hover { background: rgba(255,255,255,.15); }

/* prev / next arrows */
.lb-arrow {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  z-index: 310;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--trans), opacity var(--trans);
}
.lb-arrow:hover { background: rgba(255,255,255,.15); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

/* responsive lightbox */
@media (max-width: 700px) {
  .lightbox { flex-direction: column; max-height: 95vh; }
  .lb-img-pane { flex: 0 0 auto; max-height: 55vw; }
  .lb-info { flex: 1; border-left: none; border-top: 1px solid var(--border); padding: 1.25rem; }
  .lb-info { flex: 0 0 auto; }
  .lb-arrow { display: none; }
}

/* ─── File list (multi-upload) ──────────────────────────────────────────── */
.file-list {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: .5rem .75rem;
  max-height: 130px;
  overflow-y: auto;
  margin-bottom: 1rem;
  background: var(--surface-2);
}
.file-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .2rem 0;
  font-size: .78rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.file-item:last-child { border-bottom: none; }
.file-dot  { color: var(--accent); font-size: .5rem; flex-shrink: 0; }
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--text-dim); flex-shrink: 0; }

/* ─── Album card collage ─────────────────────────────────────────────────── */
.album-card { cursor: pointer; }

.album-collage {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  cursor: zoom-in;
}

/* 1 image: full */
.album-collage.count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }

/* 2 images: side by side */
.album-collage.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }

/* 3 images: one big on left, two stacked on right */
.album-collage.count-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.album-collage.count-3 .collage-cell:first-child { grid-row: span 2; }

/* 4 images: 2×2 grid */
.album-collage.count-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.collage-cell { overflow: hidden; }
.collage-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.album-collage:hover .collage-cell img { transform: scale(1.05); }

/* +N extra badge */
.collage-extra {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .55rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.15);
  pointer-events: none;
  z-index: 2;
}

/* photo count badge (top-left) */
.album-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.85);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .05em;
  padding: .2rem .6rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.12);
  pointer-events: none;
  z-index: 2;
}

/* hover overlay */
.album-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 3;
}
.album-overlay span {
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  padding: .4rem 1rem;
  border-radius: 2rem;
  backdrop-filter: blur(4px);
}
.album-collage:hover .album-overlay { opacity: 1; }

/* ─── Album lightbox overlay ─────────────────────────────────────────────── */
.album-overlay-wrap {
  display: none;
  position: fixed; inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.album-overlay-wrap.open { display: flex; }

.album-lightbox {
  display: flex;
  width: 100%;
  max-width: 1160px;
  max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: lbIn .28s cubic-bezier(.22,1,.36,1);
}

/* viewer (left) */
.alb-viewer {
  flex: 1 1 60%;
  min-width: 0;
  background: #080808;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.alb-img-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.alb-img-wrap img {
  max-width: 100%; max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
  transition: opacity .2s ease;
}

/* prev / next inside viewer */
.alb-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--trans), opacity var(--trans);
}
.alb-arrow:hover { background: rgba(0,0,0,.7); }
.alb-prev { left: .75rem; }
.alb-next { right: .75rem; }

/* counter pill */
.alb-counter {
  position: absolute;
  bottom: .75rem; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.5);
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 2rem;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* sidebar (right) */
.alb-sidebar {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  overflow: hidden;
}

.alb-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.alb-album-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .25rem;
}
.alb-album-author {
  font-size: .8rem;
  color: var(--text-muted);
}
.alb-album-desc {
  font-size: .8rem;
  color: var(--text-dim);
  margin-top: .4rem;
  line-height: 1.5;
  display: none;
}

.alb-img-info {
  padding: 1rem 1.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}
.alb-img-title {
  font-weight: 600;
  font-size: .875rem;
  color: var(--text);
  margin-bottom: .2rem;
}
.alb-img-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: none;
}

.alb-vote-area {
  padding: .9rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.alb-vote-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .55rem;
}
.alb-vote-area .lb-vote-row .vote-btn { width: 36px; height: 36px; font-size: 1rem; }
.alb-vote-area .lb-vote-row .vote-score { font-size: .9rem; }

/* thumbnail strip */
.alb-thumbs {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: .75rem;
  overflow-y: auto;
  align-content: start;
}
.alb-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--trans), opacity var(--trans);
  opacity: .55;
}
.alb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb-thumb:hover { opacity: .85; }
.alb-thumb.active { border-color: var(--accent); opacity: 1; }

/* ─── Responsive album lightbox ──────────────────────────────────────────── */
@media (max-width: 760px) {
  .album-lightbox { flex-direction: column; max-height: 95vh; }
  .alb-viewer    { flex: 0 0 auto; min-height: 220px; }
  .alb-sidebar   { flex: 1; border-left: none; border-top: 1px solid var(--border); }
  .alb-thumbs    { grid-template-columns: repeat(5, 1fr); }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-header { padding: 0 1.25rem; }
  .hero { padding: 3rem 1.25rem 2rem; }
  .gallery { padding: 1rem 1rem 3rem; columns: 2; column-gap: .75rem; }
  .toolbar { padding: .75rem 1.25rem; }
  .stats-bar { padding: .6rem 1.25rem; gap: 1rem; }
  .modal { padding: 1.5rem 1.25rem; }
}
