/*
 * WATAM — modUS
 * Design: deep black canvas · gold accents · editorial serif + clean sans
 * Aesthetic mirrors wearetheartmakers.com
 */

/* ── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
  /* Canvas */
  --bg:        #070707;
  --bg2:       #0d0d0d;
  --panel:     #111111;
  --panel2:    #181818;
  --border:    #222222;
  --border2:   #2c2c2c;

  /* Text */
  --text:      #ede9e3;
  --muted:     #6b665f;
  --subtle:    #3a3530;

  /* Gold palette */
  --gold:      #c9a84c;
  --gold2:     #e8c96a;
  --gold3:     #f5dfa0;
  --gold-dim:  rgba(201,168,76,.12);
  --gold-glow: rgba(201,168,76,.22);
  --gold-line: rgba(201,168,76,.35);

  /* Status */
  --ok:   #4caf82;
  --bad:  #e05555;

  /* Layout */
  --radius:  12px;
  --shadow:  0 16px 48px rgba(0,0,0,.65);
  --shadow-sm: 0 4px 18px rgba(0,0,0,.45);
  --nav-h:   62px;
  --bot-h:   64px;

  /* Fonts */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  /* Subtle noise layer — layered SVG data URI grain */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}
@media (max-width: 640px) { body { padding-bottom: var(--bot-h); } }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .18s; }
a:hover { color: var(--gold2); }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.main { padding: 0 0 80px; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(7,7,7,.88);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
  gap: 16px;
}
@media (max-width: 640px) { .site-header .nav { display: none; } }

/* Brand */
.brand {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(110deg, var(--gold) 0%, var(--gold2) 45%, var(--gold3) 70%, var(--gold) 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
  white-space: nowrap;
}
@keyframes shimmer {
  from { background-position: 0% center; }
  to   { background-position: 250% center; }
}

/* Nav */
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a {
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .18s, background .18s;
}
.nav a:hover { color: var(--text); background: var(--panel2); }

/* ── Bottom nav (mobile) ───────────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bot-h);
  background: rgba(7,7,7,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 200;
  justify-content: space-around;
  align-items: center;
}
@media (max-width: 640px) { .bottom-nav { display: flex; } }
.bot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: .62rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 10px;
  transition: color .18s, background .18s;
  flex: 1;
  justify-content: center;
}
.bot-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.bot-item:hover, .bot-item.active { color: var(--gold); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer;
  padding: .6rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600; font-size: .8rem;
  letter-spacing: .06em; text-transform: uppercase;
  transition: filter .18s, transform .18s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(110deg, var(--gold), var(--gold2));
  color: #0a0808;
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); color: #0a0808; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--panel2); border-color: var(--gold-line); color: var(--gold); }
.btn-ghost.active { border-color: var(--gold-line); color: var(--gold); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-sm { padding: .35rem .85rem; font-size: .74rem; }
.btn-block { width: 100%; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 24px 52px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  overflow: visible;
}

/* Full-width atmospheric background behind the hero */
.hero-bg {
  position: absolute;
  inset: 0;
  left: 50%; transform: translateX(-50%);
  width: 100vw;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201,168,76,.13) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 30% 100%, rgba(201,168,76,.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
/* Decorative horizontal line above hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gold-line), transparent);
}

.hero > * { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .7;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 6px;
}
/* Gold underline on key word */
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
}
.tagline {
  font-size: .92rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: .04em;
  margin: 10px 0 36px;
}

/* ── Thin gold divider ─────────────────────────────────────────────────────── */
.gold-rule {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-line) 30%, var(--gold-line) 70%, transparent);
  margin: 0 auto 48px;
  max-width: 600px;
}

/* ── Dropzone ──────────────────────────────────────────────────────────────── */
.dropzone {
  position: relative;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 26px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .22s, box-shadow .22s;
  /* Inner gold gradient glow */
  background-image: linear-gradient(135deg, rgba(201,168,76,.04) 0%, transparent 60%);
}
.dropzone::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold-dim), transparent 50%);
  opacity: 0;
  transition: opacity .22s;
  pointer-events: none;
}
.dropzone.dragover {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim), inset 0 0 40px rgba(201,168,76,.06);
}
.dropzone.dragover::after { opacity: 1; }
.dz-icon { color: var(--gold); opacity: .55; margin: 0 auto 6px; }
.dz-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  margin: 0 0 3px;
  color: var(--text);
}
.dz-or { color: var(--muted); font-size: .78rem; }
.dz-meta { color: var(--subtle); font-size: .68rem; margin-top: 10px; letter-spacing: .08em; text-transform: uppercase; }
#select-btn { margin-top: 10px; }

/* ── Upload queue & results ────────────────────────────────────────────────── */
.upload-queue { display: grid; gap: 10px; margin: 24px auto; max-width: 720px; }
.upload-queue[hidden], .upload-results[hidden] { display: none; }
.upload-results { margin: 24px auto; max-width: 720px; display: grid; gap: 14px; }

.q-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
}
.q-item img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.q-ph { width: 46px; height: 46px; background: var(--panel2); border-radius: 6px; flex-shrink: 0; }
.q-info { flex: 1; min-width: 0; }
.q-name { font-size: .83rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-size { font-size: .72rem; color: var(--muted); }
.q-status { font-size: .78rem; color: var(--gold); white-space: nowrap; }
.q-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 4px; }
.q-remove:hover { color: var(--bad); }
.q-toolbar { padding: 0 0 10px; }

.result-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: grid; grid-template-columns: 110px 1fr;
}
.result-thumb { width: 110px; height: 110px; object-fit: cover; cursor: zoom-in; }
.result-links { padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.result-links label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.result-actions { display: flex; gap: 8px; padding: 6px 12px 10px; flex-wrap: wrap; }
.qr-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; background: var(--panel2);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.qr-wrap:hover { border-color: var(--gold-line); }
.qr-label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── Gallery section ───────────────────────────────────────────────────────── */
.gallery-section { padding-top: 8px; }
.gallery-note {
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  padding: 18px 0 4px;
}
.explore-head { padding: 32px 0 4px; }

/* Section title */
.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  margin: 36px 0 20px;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section-count {
  font-family: var(--font-body);
  font-size: .72rem;
  font-style: normal;
  color: var(--subtle);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Masonry grid ──────────────────────────────────────────────────────────── */
.masonry {
  columns: 5;
  column-gap: 10px;
}
.masonry .card {
  break-inside: avoid;
  margin-bottom: 10px;
  display: inline-block;
  width: 100%;
}
.masonry .card img { aspect-ratio: unset; height: auto; }
@media (max-width: 1200px) { .masonry { columns: 4; } }
@media (max-width: 900px)  { .masonry { columns: 3; } }
@media (max-width: 600px)  { .masonry { columns: 2; } }
@media (max-width: 380px)  { .masonry { columns: 1; } }

/* Uniform grid (dashboard / albums) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 0;
  transition: border-color .22s, transform .22s, box-shadow .22s;
}
.card:hover {
  border-color: var(--gold-line);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 0 0 1px var(--gold-dim);
}
.card img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  display: block;
  transition: transform .3s ease, filter .3s ease;
  background: var(--panel2);
}
.masonry .card img { aspect-ratio: unset; }
.card a:hover img { transform: scale(1.04); }

/* Blur-up lazy load — JS adds .lazy-loading class, removes when loaded */
.card img.lazy-loading {
  filter: blur(12px);
  transform: scale(1.03);
  transition: filter .5s ease, transform .5s ease;
}
.card img.lazy-loading.loaded {
  filter: none;
  transform: scale(1);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  font-size: .7rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  letter-spacing: .02em;
}
.card-actions {
  display: flex; gap: 6px; padding: 7px 8px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap; align-items: center;
}

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
.lb-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4,4,4,.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.lb-overlay.open { opacity: 1; pointer-events: all; }
.lb-inner {
  position: relative;
  max-width: 92vw; max-height: 92dvh;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}
.lb-img {
  max-width: 90vw; max-height: 78dvh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 28px 70px rgba(0,0,0,.85);
  user-select: none;
}
.lb-close {
  position: absolute; top: -44px; right: 0;
  background: none; border: none;
  color: var(--muted); font-size: 1.6rem;
  cursor: pointer; padding: 4px 8px; line-height: 1;
  transition: color .15s;
}
.lb-close:hover { color: var(--text); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.5); border: 1px solid var(--border2);
  color: var(--text); width: 40px; height: 40px;
  border-radius: 50%; font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; z-index: 10;
}
.lb-nav:hover { background: var(--gold-dim); color: var(--gold); border-color: var(--gold-line); }
.lb-prev { left: -52px; }
.lb-next { right: -52px; }
.lb-meta { color: var(--muted); font-size: .76rem; text-align: center; }
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) {
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
}

/* ── Copy / Share buttons ──────────────────────────────────────────────────── */
.copy-btn {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border2);
  border-radius: 5px; padding: .28rem .6rem;
  cursor: pointer; font-size: .74rem; font-family: var(--font-body);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.copy-btn:hover { background: var(--gold-dim); border-color: var(--gold-line); color: var(--gold); }
.copy-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

.share-btn {
  background: var(--panel2); color: var(--muted);
  border: 1px solid var(--border2);
  border-radius: 5px; padding: .28rem .6rem;
  cursor: pointer; font-size: .74rem; font-family: var(--font-body);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.share-btn:hover { background: var(--gold-dim); border-color: var(--gold-line); color: var(--gold); }

/* ── Auth cards ────────────────────────────────────────────────────────────── */
.auth {
  display: flex; align-items: center; justify-content: center;
  min-height: 72dvh; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--panel);
  padding: 36px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.auth-card h1, .auth-card h2 {
  font-family: var(--font-head);
  font-size: 1.9rem; font-weight: 600;
  color: var(--text); margin-bottom: 22px;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
label {
  display: block; margin-bottom: 14px;
  font-size: .76rem; font-weight: 600;
  color: var(--muted); letter-spacing: .06em; text-transform: uppercase;
}
label input, label textarea, label select { margin-top: 5px; }
input, textarea, select {
  width: 100%; padding: .6rem .95rem;
  border: 1px solid var(--border2); border-radius: 7px;
  background: var(--bg2); color: var(--text);
  font-family: var(--font-body); font-size: .88rem;
  transition: border-color .18s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
select option { background: var(--panel); }

/* ── Flash ─────────────────────────────────────────────────────────────────── */
.flash {
  padding: 11px 16px; border-radius: 7px; margin: 14px 0;
  font-size: .85rem; background: var(--panel2);
  border: 1px solid var(--border2); color: var(--text);
}
.flash.error { background: rgba(224,85,85,.1);  border-color: rgba(224,85,85,.35); color: #ffaaaa; }
.flash.ok    { background: rgba(76,175,130,.1); border-color: rgba(76,175,130,.35); color: #a0e8c8; }
.flash.info  { background: rgba(201,168,76,.07); border-color: var(--gold-line); color: var(--gold2); }

/* ── Stats ─────────────────────────────────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin: 20px 0;
}
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 14px; text-align: center;
  transition: border-color .2s;
}
.stat:hover { border-color: var(--gold-line); }
.stat .num {
  display: block; font-family: var(--font-head);
  font-size: 1.9rem; font-weight: 700; color: var(--gold); line-height: 1.1;
}
.stat .lbl { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pager {
  display: flex; gap: 5px; flex-wrap: wrap;
  justify-content: center; padding: 28px 0;
}
.pager a {
  min-width: 32px; text-align: center;
  padding: 6px 9px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); font-size: .78rem;
  transition: all .15s;
}
.pager a:hover { border-color: var(--gold-line); color: var(--gold); }
.pager a.on { background: var(--gold); border-color: var(--gold); color: #0a0808; font-weight: 700; }

/* ── Viewer ─────────────────────────────────────────────────────────────────── */
.viewer { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.viewer-image {
  background: var(--panel); border-radius: var(--radius);
  padding: 14px; border: 1px solid var(--border);
}
.viewer-image img { border-radius: 6px; width: 100%; cursor: zoom-in; }
.viewer-side h1 {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight: 600; margin-bottom: 14px;
  color: var(--text); line-height: 1.2;
}
.meta-list { margin-bottom: 18px; }
.meta-list div {
  display: flex; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--border); padding: 6px 0; font-size: .82rem;
}
.meta-list dt { color: var(--muted); }
.meta-list dd { color: var(--text); text-align: right; }
.embed label {
  display: block; font-size: .68rem; color: var(--muted);
  margin: 9px 0 3px; text-transform: uppercase; letter-spacing: .06em;
}
.copy-row { display: flex; gap: 5px; margin-bottom: 8px; }
.copy-row input { font-size: .74rem; font-family: monospace; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ── Admin ──────────────────────────────────────────────────────────────────── */
.admin-nav {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 0 0 24px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.table { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 18px; }
.table th {
  text-align: left; padding: 9px 11px;
  border-bottom: 1px solid var(--border2);
  color: var(--muted); font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; font-size: .68rem;
}
.table td { padding: 9px 11px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: var(--panel2); }

/* ── Misc ───────────────────────────────────────────────────────────────────── */
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.row.actions { margin-bottom: 20px; }
.profile-head { padding: 28px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.profile-head h1 { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; color: var(--gold); }
.album-mini-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.album-mini {
  background: var(--panel); border: 1px solid var(--border);
  padding: .45rem .9rem; border-radius: 7px; color: var(--text);
  font-size: .82rem; display: flex; gap: 5px; align-items: center;
  transition: border-color .18s, color .18s;
}
.album-mini:hover { border-color: var(--gold-line); color: var(--gold); }
.vis.priv { color: var(--muted); font-size: .76rem; }
.vis.pub  { color: var(--ok); font-size: .76rem; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: .92rem; }
.muted { color: var(--muted); }
.inline { display: inline; }
.recent { padding: 0 24px; }
pre.log {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px; font-size: .72rem;
  max-height: 280px; overflow-y: auto; color: var(--muted);
  white-space: pre-wrap; word-break: break-all;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .viewer { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; }
  .result-thumb { width: 100%; height: 160px; }
  .lb-prev { left: 4px; } .lb-next { right: 4px; }
}
@media (max-width: 640px) {
  .hero { padding: 52px 16px 36px; }
  .dropzone { padding: 36px 14px; }
  .auth-card { padding: 24px 18px; }
  .brand { font-size: 1.05rem; }
  .main { padding-bottom: calc(var(--bot-h) + 20px); }
  .container { padding: 0 14px; }
}

/* ── Reactions — redesigned ─────────────────────────────────────────────────── */
.reactions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
  padding: 12px 0 10px;
  border-top: 1px solid var(--border);
}
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px 5px 8px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .15s, box-shadow .18s;
  user-select: none;
  position: relative;
  overflow: hidden;
}
/* Subtle shimmer on hover */
.react-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, var(--gold-dim), transparent 60%);
  opacity: 0;
  transition: opacity .18s;
}
.react-btn:hover {
  border-color: var(--gold-line);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(201,168,76,.18);
}
.react-btn:hover::before { opacity: 1; }
.react-btn.reacted {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 0 0 2px var(--gold-dim);
}
.react-btn.reacted::before { opacity: 1; }
.react-emoji {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-block;
  position: relative;
}
.react-count {
  font-size: .7rem;
  font-weight: 700;
  min-width: 12px;
  text-align: center;
  color: var(--muted);
  letter-spacing: .02em;
}
.react-btn.reacted .react-count { color: var(--gold); }

/* Pop animation when toggling */
@keyframes react-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.react-pop { animation: react-pop .35s ease; }

/* ── Social share bar ───────────────────────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 14px 0 10px;
  border-top: 1px solid var(--border);
}
.share-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-right: 2px;
}
.share-btn-social {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border: 1px solid var(--border2);
  background: var(--panel2);
  cursor: pointer;
  transition: filter .15s, transform .15s, background .15s;
  white-space: nowrap;
  color: var(--text);
}
.share-btn-social:hover { filter: brightness(1.15); transform: translateY(-1px); color: var(--text); }
.share-x      { border-color: #1a1a1a; }
.share-x:hover      { background: #1a1a1a; color: #fff; }
.share-fb     { border-color: #1877f2; }
.share-fb:hover     { background: #1877f2; color: #fff; }
.share-reddit { border-color: #ff4500; }
.share-reddit:hover { background: #ff4500; color: #fff; }
.share-wa     { border-color: #25d366; }
.share-wa:hover     { background: #25d366; color: #fff; }
.share-copy   { border-color: var(--border2); }
.share-copy:hover   { background: var(--gold-dim); border-color: var(--gold-line); color: var(--gold); }

/* ── Upload queue title/description inputs ──────────────────────────────────── */
.q-title, .q-desc {
  width: 100%; margin-top: 5px;
  padding: .3rem .6rem;
  border: 1px solid var(--border2); border-radius: 6px;
  background: var(--bg2); color: var(--text);
  font-family: var(--font-body); font-size: .78rem;
}
.q-title:focus, .q-desc:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-dim);
}

/* ── Avatar ─────────────────────────────────────────────────────────────────── */
.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  background: var(--panel2);
  flex-shrink: 0;
}
.avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-line);
  background: var(--panel2);
}
.avatar-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel2); border: 2px solid var(--border2);
  border-radius: 50%; color: var(--muted);
  font-family: var(--font-head); font-style: italic;
  font-weight: 700; line-height: 1;
}

/* ── Notification badge ──────────────────────────────────────────────────────── */
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  background: var(--bad); color: #fff;
  border-radius: 999px; font-size: .65rem; font-weight: 700;
  padding: 0 5px; margin-left: 3px;
  line-height: 1; vertical-align: middle;
}
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.notif-item:hover { background: var(--panel2); }
.notif-item.unread { border-left: 3px solid var(--gold); }
.notif-thumb {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0;
  border: 1px solid var(--border);
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: .85rem; color: var(--text); }
.notif-time { font-size: .72rem; color: var(--muted); margin-top: 3px; }

/* ── Explore sort tabs ───────────────────────────────────────────────────────── */
.sort-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.sort-tab {
  padding: 6px 16px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--panel);
  border: 1px solid var(--border);
  text-decoration: none; transition: all .15s;
}
.sort-tab:hover { border-color: var(--gold-line); color: var(--gold); }
.sort-tab.active { background: var(--gold); border-color: var(--gold); color: #0a0808; }

/* ── Scroll-reveal for masonry cards ────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .masonry .card {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .45s ease, transform .45s ease;
  }
  .masonry .card.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}
