/* =====================================================
   Hochzeit Gysau – Fotogalerie
   Dark Editorial · identisch zur Wunschliste
   ===================================================== */

:root {
  --bg:          #0c0c0c;
  --surface:     #161616;
  --surface-2:   #202020;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.13);
  --text:        #eeebe5;
  --text-muted:  #666;
  --accent:      #d4b87a;
  --accent-dim:  #9a8055;
  --radius:      10px;
  --radius-sm:   6px;
  --font-d:      'DM Serif Display', Georgia, serif;
  --font-s:      'DM Sans', 'Helvetica Neue', sans-serif;
}

*, *::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-s);
  font-weight: 300;
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 54px;
  background: rgba(12,12,12,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-names { font-family: var(--font-d); font-size: 1.05rem; color: var(--accent); letter-spacing: .1em; }
.topbar-date  { font-size: .68rem; letter-spacing: .28em; color: var(--text-muted); }
.topbar-tabs  { display: flex; gap: 3px; background: var(--surface-2); border-radius: 100px; padding: 3px; }
.tab-btn {
  background: none; border: none; padding: 5px 14px; border-radius: 100px;
  font-family: var(--font-s); font-size: .72rem; font-weight: 400;
  color: var(--text-muted); cursor: pointer; transition: background .18s, color .18s;
}
.tab-btn.active { background: var(--accent); color: var(--bg); font-weight: 500; }
.tab-btn:hover:not(.active) { color: var(--text); }

/* ── Hero ── */
.hero {
  text-align: center; padding: 80px 24px 64px;
  border-bottom: 1px solid var(--border);
  animation: fadeUp .8s ease both;
}
.hero-label { font-size: .68rem; letter-spacing: .32em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 24px; }
.hero-title {
  font-family: var(--font-d); font-size: clamp(3.2rem, 10vw, 6rem);
  font-weight: 400; line-height: 1.0; color: var(--text); margin-bottom: 24px;
}
.hero-title em { font-style: italic; color: var(--accent); display: block; font-size: .6em; line-height: 1.3; }
.hero-sub { font-size: .88rem; color: var(--text-muted); max-width: 420px; margin: 0 auto; line-height: 1.75; }

/* ── Shared button ── */
.btn-primary {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: var(--radius-sm); padding: 10px 22px;
  font-family: var(--font-s); font-size: .78rem; font-weight: 500;
  letter-spacing: .07em; cursor: pointer; transition: opacity .18s, transform .15s;
}
.btn-primary:hover:not(:disabled) { opacity: .82; transform: scale(1.02); }
.btn-primary:disabled { background: var(--surface-2); color: var(--text-muted); cursor: default; transform: none; }

.btn-outline {
  background: none; color: var(--text-muted); cursor: pointer;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 8px 14px; font-family: var(--font-s); font-size: .72rem;
  font-weight: 400; transition: color .18s, border-color .18s;
}
.btn-outline:hover { color: var(--accent); border-color: var(--accent-dim); }

/* ── Modal (name prompt / login) ── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); align-items: center; justify-content: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(4px);
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 32px 28px;
  max-width: 360px; width: 100%; text-align: center;
  animation: fadeUp .3s ease both;
}
.modal h3 { font-family: var(--font-d); font-size: 1.5rem; font-weight: 400; color: var(--text); margin-bottom: 10px; }
.modal p  { font-size: .82rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.65; }
.modal input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 11px 14px;
  color: var(--text); font-family: var(--font-s); font-size: .9rem;
  margin-bottom: 12px; outline: none; transition: border-color .18s; text-align: center;
  letter-spacing: .08em;
}
.modal input:focus { border-color: var(--accent-dim); }
.modal input::placeholder { color: var(--text-muted); }
.modal input.shake { animation: shake .35s ease; border-color: #c47a7a; }
.modal .modal-err { font-size: .74rem; color: #c47a7a; min-height: 1em; margin-bottom: 8px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--accent); color: var(--bg);
  padding: 10px 22px; border-radius: 100px;
  font-size: .78rem; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
  white-space: nowrap; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 36px 20px 60px;
  border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--text-muted); line-height: 1.8;
}
.site-footer a { color: var(--accent-dim); text-decoration: none; letter-spacing: .05em; transition: color .18s; }
.site-footer a:hover { color: var(--accent); }

/* ── Animations ── */
@keyframes fadeUp  { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes shake   { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }
@keyframes shimmer { 0%,100%{opacity:.4} 50%{opacity:.7} }

/* ── Responsive ── */
@media (max-width: 620px) {
  .topbar { padding: 0 14px; }
  .topbar-date { display: none; }
  .hero { padding: 56px 18px 48px; }
  .modal { padding: 24px 18px; }
}

/* ════════════════════════════════════
   UPLOAD PAGE (index.html)
   ════════════════════════════════════ */
.upload-wrap {
  max-width: 520px; margin: 0 auto; padding: 48px 20px 100px;
  animation: fadeUp .6s ease both;
}
.upload-section-label {
  font-size: .68rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 28px;
}
.upload-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.upload-card-title {
  font-family: var(--font-d); font-size: 1.4rem; font-weight: 400;
  color: var(--text); margin-bottom: 6px;
}
.upload-card-sub { font-size: .82rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }

/* dropzone */
.dropzone {
  border: 1px dashed var(--border-2); border-radius: var(--radius-sm);
  padding: 36px 16px; text-align: center; cursor: pointer; position: relative;
  transition: border-color .2s, background .2s; margin-bottom: 16px;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--accent-dim); background: rgba(212,184,122,0.04); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dz-icon { font-size: 2rem; opacity: 0.35; margin-bottom: 10px; }
.dz-label { font-size: .82rem; color: var(--text-muted); }
.dz-label strong { color: var(--accent); font-weight: 400; }
.dz-hint { font-size: .7rem; color: var(--text-muted); opacity: .6; margin-top: 4px; }

/* file list */
#file-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.file-item {
  display: flex; align-items: center; gap: 8px; font-size: .76rem;
  padding: 7px 10px; background: var(--surface-2); border-radius: var(--radius-sm);
}
.file-item .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-item .fsize { color: var(--text-muted); flex-shrink: 0; }
.file-item .fst   { flex-shrink: 0; }

/* progress */
.upload-progress { height: 1px; background: var(--surface-2); border-radius: 2px; margin-bottom: 16px; display: none; overflow: hidden; }
.upload-progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width .3s; }

/* field */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.field input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text); font-family: var(--font-s); font-size: .88rem;
  outline: none; transition: border-color .18s;
}
.field input:focus { border-color: var(--accent-dim); }
.field input::placeholder { color: var(--text-muted); }

#upload-status { margin-top: 12px; font-size: .78rem; text-align: center; min-height: 1.1em; }
.ok  { color: #7aaa7a; }
.err { color: #c47a7a; }

/* ════════════════════════════════════
   GALLERY PAGE (galerie.html)
   ════════════════════════════════════ */

/* album filter tabs — identical to Wunschliste tab-btn style */
.filter-bar {
  display: flex; justify-content: center; padding: 20px 20px 0;
  gap: 3px;
}
.filter-wrap {
  display: flex; gap: 3px; background: var(--surface-2);
  border-radius: 100px; padding: 3px;
}
.filter-btn {
  background: none; border: none; padding: 5px 16px; border-radius: 100px;
  font-family: var(--font-s); font-size: .72rem; font-weight: 400;
  color: var(--text-muted); cursor: pointer; transition: background .18s, color .18s;
  white-space: nowrap;
}
.filter-btn.active { background: var(--accent); color: var(--bg); font-weight: 500; }
.filter-btn:hover:not(.active) { color: var(--text); }

.gallery-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 20px 20px 4px;
  flex-wrap: wrap; gap: 8px;
}
.gallery-toolbar-left h2 { font-family: var(--font-d); font-size: 1.3rem; color: var(--text); }
.gallery-toolbar-left .count { font-size: .7rem; color: var(--text-muted); letter-spacing: .1em; margin-top: 2px; }
.gallery-toolbar-right { display: flex; gap: 8px; }

/* masonry grid */
.photo-grid {
  columns: 4; column-gap: 10px;
  max-width: 1200px; margin: 0 auto; padding: 16px 20px 100px;
}
@media (max-width: 1000px) { .photo-grid { columns: 3; } }
@media (max-width: 640px)  { .photo-grid { columns: 2; } }
@media (max-width: 380px)  { .photo-grid { columns: 1; } }

.photo-item {
  break-inside: avoid; margin-bottom: 10px; position: relative;
  overflow: hidden; cursor: pointer; border-radius: var(--radius-sm);
  border: 1px solid var(--border); transition: border-color .2s, transform .25s;
  animation: fadeIn .4s ease both;
}
.photo-item:hover { border-color: var(--border-2); transform: translateY(-2px); }
.photo-item img { width: 100%; display: block; transition: transform .5s ease; filter: brightness(.88); background: var(--surface); }
.photo-item:hover img { transform: scale(1.04); filter: brightness(1); }
.photo-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: rgba(255,255,255,.7); font-size: .66rem; padding: 2rem .7rem .6rem;
  opacity: 0; transition: opacity .3s; letter-spacing: .06em;
}
.photo-item:hover .photo-overlay { opacity: 1; }

.gallery-msg {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: .85rem;
  grid-column: 1/-1;
}

/* Lightbox */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
#lightbox.open { display: flex; }
#lb-img { max-width: 90vw; max-height: 88vh; border-radius: var(--radius-sm); display: block; }
#lb-close { position: absolute; top: 16px; right: 20px; background: none; border: none;
  color: rgba(255,255,255,.5); font-size: 1.8rem; cursor: pointer; line-height: 1; transition: color .18s; }
#lb-close:hover { color: #fff; }
#lb-prev, #lb-next { position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.07); border: none; color: rgba(255,255,255,.7);
  font-size: 1.4rem; padding: 14px 12px; cursor: pointer; border-radius: var(--radius-sm);
  transition: background .18s; }
#lb-prev { left: 14px; } #lb-next { right: 14px; }
#lb-prev:hover, #lb-next:hover { background: rgba(255,255,255,.14); }
#lb-caption { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.4); font-size: .7rem; letter-spacing: .1em; white-space: nowrap; }

/* ════════════════════════════════════
   ADMIN PAGE
   ════════════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; }

/* sidebar */
aside.admin-sidebar {
  width: 220px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); display: flex;
  flex-direction: column; padding: 28px 0 16px;
}
.sidebar-logo { padding: 0 20px 28px; font-family: var(--font-d); font-size: 1.05rem; color: var(--accent); }
.sidebar-logo small { display: block; font-family: var(--font-s); font-size: .62rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }
.sidebar-nav { flex: 1; }
.sidebar-section { font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-muted); padding: 0 20px; margin-bottom: 4px; margin-top: 16px; }
.sidebar-btn { display: block; width: 100%; background: none; border: none; text-align: left;
  padding: 8px 20px; font-family: var(--font-s); font-size: .78rem; color: var(--text-muted);
  cursor: pointer; transition: color .18s, background .18s; }
.sidebar-btn:hover { color: var(--text); background: rgba(255,255,255,.03); }
.sidebar-btn.active { color: var(--accent); background: rgba(212,184,122,0.08); }
.sidebar-badge { display: inline-block; background: #c47a7a; color: #fff; border-radius: 10px;
  font-size: .58rem; padding: 1px 5px; margin-left: 5px; vertical-align: middle; }
.sidebar-footer { padding: 0 16px; }
.sidebar-logout { width: 100%; background: none; border: 1px solid var(--border);
  color: var(--text-muted); padding: 7px; font-family: var(--font-s); font-size: .68rem;
  letter-spacing: .15em; text-transform: uppercase; cursor: pointer; border-radius: var(--radius-sm);
  transition: border-color .18s, color .18s; }
.sidebar-logout:hover { border-color: var(--accent-dim); color: var(--accent); }

/* admin main */
.admin-main { flex: 1; padding: 36px 40px 80px; overflow-y: auto; max-width: 900px; }
.admin-page-title { font-family: var(--font-d); font-size: 1.8rem; color: var(--accent); margin-bottom: 4px; }
.admin-page-sub { font-size: .76rem; color: var(--text-muted); margin-bottom: 28px; }

.admin-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 14px; }
.admin-card-title { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px; }

/* admin fields */
.admin-field { margin-bottom: 14px; }
.admin-field label { display: block; font-size: .66rem; letter-spacing: .17em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.admin-field input, .admin-field select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 9px 12px;
  color: var(--text); font-family: var(--font-s); font-size: .84rem;
  outline: none; transition: border-color .18s; appearance: none;
}
.admin-field input:focus, .admin-field select:focus { border-color: var(--accent-dim); }
.admin-row { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-row .admin-field { flex: 1; min-width: 150px; }

/* admin buttons */
.admin-btn { background: none; border: 1px solid var(--accent-dim); color: var(--accent);
  padding: 7px 18px; font-family: var(--font-s); font-size: .7rem;
  letter-spacing: .15em; text-transform: uppercase; cursor: pointer; border-radius: var(--radius-sm);
  transition: background .18s, color .18s; }
.admin-btn:hover { background: var(--accent); color: var(--bg); }
.admin-btn.solid { background: var(--accent); color: var(--bg); }
.admin-btn.solid:hover { opacity: .85; }
.admin-btn.danger { border-color: #c47a7a; color: #c47a7a; }
.admin-btn.danger:hover { background: #c47a7a; color: #fff; }
.admin-btn.sm { padding: 4px 10px; font-size: .64rem; }

.admin-msg { margin-top: 8px; font-size: .74rem; min-height: 1em; }
.admin-msg.ok  { color: #7aaa7a; }
.admin-msg.err { color: #c47a7a; }

/* list rows */
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 6px; }
.list-row .lr-name   { flex: 1; font-size: .82rem; }
.list-row .lr-detail { flex: 2; font-size: .7rem; color: var(--text-muted); font-family: monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-badge { font-family: monospace; font-size: .82rem; color: var(--accent);
  background: rgba(212,184,122,0.12); padding: 2px 8px; border-radius: var(--radius-sm); flex-shrink: 0; }

/* checkboxes */
.check-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.check-label { display: flex; align-items: center; gap: 5px; font-size: .74rem; color: var(--text-muted); cursor: pointer; }
.check-label input[type=checkbox] { accent-color: var(--accent); }

/* tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* quick links */
.links-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.link-card { flex: 1; min-width: 150px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  text-decoration: none; transition: border-color .2s, transform .2s; cursor: pointer; }
.link-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.link-card .lc-icon { font-size: 1.4rem; margin-bottom: 6px; }
.link-card .lc-name { font-size: .82rem; color: var(--text); }
.link-card .lc-url  { font-size: .66rem; color: var(--text-muted); margin-top: 2px; }

/* moderation grid */
.mod-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.inbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.inbox-item { background: var(--surface-2); border: 2px solid transparent;
  border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; transition: border-color .18s; position: relative; }
.inbox-item.selected { border-color: var(--accent); }
.inbox-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; filter: brightness(.82); }
.inbox-check { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,.6); border: 1.5px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: .68rem; transition: all .15s; }
.inbox-item.selected .inbox-check { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.inbox-meta { padding: 6px 8px 8px; }
.inbox-meta .iname { font-size: .67rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-meta .idate { font-size: .6rem; color: var(--text-muted); opacity: .55; }
.inbox-empty { text-align: center; padding: 48px; color: var(--text-muted); font-size: .84rem; }

/* move modal */
#move-modal { display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.75); align-items: center; justify-content: center;
  padding: 16px; backdrop-filter: blur(4px); }
#move-modal.open { display: flex; }
.move-modal-box { background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 28px; max-width: 400px; width: 100%; }
.move-modal-box h3 { font-family: var(--font-d); font-size: 1.4rem; color: var(--accent); margin-bottom: 6px; }
.move-modal-box p { font-size: .78rem; color: var(--text-muted); margin-bottom: 18px; }
.album-pick-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.album-pick-btn { background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; text-align: left; font-family: var(--font-s);
  font-size: .82rem; cursor: pointer; border-radius: var(--radius-sm); transition: border-color .18s, color .18s; }
.album-pick-btn:hover { border-color: var(--accent-dim); color: var(--accent); }
.album-pick-btn .ap-folder { display: block; font-size: .64rem; color: var(--text-muted); font-family: monospace; margin-top: 2px; }
.modal-progress { height: 1px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-bottom: 10px; display: none; }
.modal-progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width .25s; }
.modal-status { font-size: .74rem; color: var(--text-muted); min-height: 1em; margin-bottom: 10px; }
.modal-footer-btns { display: flex; justify-content: flex-end; }

/* QR */
#qr-container { margin: 16px auto; display: flex; justify-content: center; }
.qr-url { font-size: .7rem; color: var(--text-muted); text-align: center; word-break: break-all; margin-top: 8px; }

/* admin responsive */
@media (max-width: 680px) {
  .admin-layout { flex-direction: column; }
  aside.admin-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 10px;
    border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-logo { padding: 0 12px 0 0; }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
  .sidebar-section { display: none; }
  .sidebar-footer { padding: 0; margin-left: auto; }
  .admin-main { padding: 20px 16px 60px; }
}
