/* Lumen Gallery – Frontend & Backend Styles */
:root {
  --accent: #8b7bff;
  --radius: 14px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --row-h: 280px;
  --gap: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
  --bg: #09090c;
  --bg-2: #111116;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .09);
  --text: #f2f1f6;
  --muted: #9a98a8;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f5f1;
  --bg-2: #ffffff;
  --surface: rgba(20, 20, 30, .04);
  --surface-2: rgba(20, 20, 30, .07);
  --border: rgba(20, 20, 30, .1);
  --text: #16151c;
  --muted: #6b6977;
  --shadow: 0 20px 50px -24px rgba(30, 25, 60, .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.bg-glow {
  position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 60% at 20% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(35% 50% at 80% 10%, color-mix(in srgb, #ff7ab6 14%, transparent), transparent 70%);
  filter: blur(40px);
  opacity: .9;
}
[data-theme="light"] .bg-glow { opacity: .55; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 14px clamp(16px, 4vw, 48px);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; min-width: 0; }
.brand .logo { height: var(--logo-h, 40px); width: auto; max-width: 220px; object-fit: contain; }
.hero-logo { display: block; height: auto; max-height: 200px; max-width: min(100%, 520px); object-fit: contain; object-position: left; margin-bottom: 34px; animation: rise .9s var(--ease) both; }
.hero-title.with-logo { font-size: clamp(1.8rem, 4vw, 3rem); }
/* weiße Logos im hellen Design dunkel darstellen */
    [data-theme="light"] body.logo-invert .logo { filter: invert(1); }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: conic-gradient(from 200deg, var(--accent), #ff7ab6, #ffc76b, var(--accent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
}
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

.wrap { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); flex: 1; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(32px, 5vw, 64px); max-width: 900px; }
.hero-title {
  font-weight: 700;
  font-size: clamp(2.4rem, 6.5vw, 4.8rem); line-height: 1.05; letter-spacing: -.035em; margin: 0;
  background: linear-gradient(120deg, var(--text) 30%, color-mix(in srgb, var(--accent) 70%, var(--text)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise .9s var(--ease) both;
}
.hero-sub { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--muted); margin: 18px 0 0; max-width: 620px; animation: rise .9s .08s var(--ease) both; }
.hero-stats { display: flex; gap: 10px; margin: 26px 0 0; animation: rise .9s .16s var(--ease) both; }
.hero-stats span {
  font-size: .82rem; padding: 6px 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}

/* ---------- Album-Karten ---------- */
.album-grid {
  display: grid; gap: clamp(14px, 2vw, 26px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  padding-bottom: 80px;
}
.album-card {
  position: relative; display: block; border-radius: calc(var(--radius) + 4px); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: rise .7s var(--d, 0ms) var(--ease) both;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.album-card:hover { transform: translateY(-4px); }
.album-cover { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s; }
.album-card:hover .album-cover img { transform: scale(1.06); }
.album-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface-2), transparent); }
.album-info {
  position: absolute; inset: auto 0 0 0; padding: 60px 20px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .25) 60%, transparent);
  color: #fff;
}
.album-info h2 { font-weight: 650; font-size: 1.35rem; letter-spacing: -.015em; margin: 0; line-height: 1.15; }
.album-info p { margin: 4px 0 0; font-size: .85rem; opacity: .78; }

/* ---------- Album-Seite ---------- */
.album-head { padding: clamp(28px, 5vw, 64px) 0 clamp(24px, 3vw, 40px); max-width: 900px; animation: rise .8s var(--ease) both; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-bottom: 18px; transition: color .2s, gap .2s; }
.back:hover { color: var(--text); gap: 10px; }
.album-head h1 { font-weight: 700; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.album-desc { color: var(--muted); font-size: 1.08rem; margin: 14px 0 0; max-width: 680px; }
.album-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 22px; color: var(--muted); font-size: .9rem; }
.album-meta > span + span::before { content: "·"; margin-right: 18px; opacity: .6; }

/* Justified Grid: gleiche Zeilenhöhe, Seitenverhältnisse bleiben erhalten */
.justified { display: flex; flex-wrap: wrap; gap: var(--gap); padding-bottom: 80px; }
.justified::after { content: ""; flex-grow: 1e9; }
.tile {
  position: relative; overflow: hidden; border-radius: 10px;
  flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row-h));
  aspect-ratio: var(--r);
  max-height: calc(var(--row-h) * 1.9);
  background: var(--surface-2);
  cursor: zoom-in;
}
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .7s var(--ease), transform 1s var(--ease), filter .4s; }
.tile img.loaded { opacity: 1; transform: none; }
.tile:hover img.loaded { transform: scale(1.04); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.5), transparent 45%); opacity: 0; transition: opacity .4s; }
.tile:hover::after { opacity: 1; }
.tile-cap { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 1; color: #fff; font-size: .85rem; opacity: 0; transform: translateY(6px); transition: .4s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:hover .tile-cap { opacity: 1; transform: none; }

/* Video- & Audio-Kacheln */
.tile-badge {
  position: absolute; right: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px 5px 8px; border-radius: 99px; font-size: .78rem; font-weight: 600; color: #fff;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-variant-numeric: tabular-nums;
}
.tile-badge svg { width: 13px; height: 13px; }
.tile-video::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(255,255,255,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='white'/%3E%3C/svg%3E") center/26px no-repeat;
  border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .4s var(--ease), background-color .3s; pointer-events: none;
}
.tile-video:hover::before { transform: scale(1.1); background-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.tile-audio-info { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 30px 14px 12px; color: #fff; display: grid; gap: 2px; background: linear-gradient(to top, rgba(0,0,0,.6), transparent); }
.tile-audio-title { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-audio-dur { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; opacity: .75; font-variant-numeric: tabular-nums; }
.tile-audio-dur svg { width: 13px; height: 13px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .92rem;
  cursor: pointer; transition: filter .2s, transform .15s, background .2s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn svg { fill: currentColor; stroke: none; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 500; }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-ghost svg { fill: none; stroke: currentColor; }
.album-meta .btn-ghost svg { fill: currentColor; stroke: none; }
.btn-danger { background: #e5484d; }
.btn-sm { padding: 7px 12px; font-size: .84rem; border-radius: 10px; }

.empty { text-align: center; padding: 80px 20px 120px; color: var(--muted); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: conic-gradient(from 200deg, var(--accent), #ff7ab6, #ffc76b, var(--accent)); opacity: .5; }

.footer { padding: 30px clamp(16px, 4vw, 48px); color: var(--muted); font-size: .85rem; text-align: center; border-top: 1px solid var(--border); }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(6, 6, 9, .94);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  color: #fff; user-select: none; -webkit-user-select: none; touch-action: none;
}
.lb.open { opacity: 1; visibility: visible; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(12px, 3vw, 28px); z-index: 2; transition: opacity .4s; }
.lb-count { font-size: .85rem; opacity: .7; font-variant-numeric: tabular-nums; }
.lb-actions { display: flex; gap: 6px; }
.lb-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); color: #fff; cursor: pointer;
  transition: background .2s, transform .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-btn:active { transform: scale(.93); }
.lb-btn .i-pause { display: none; }
.lb.playing .lb-btn .i-play { display: none; }
.lb.playing .lb-btn .i-pause { display: block; }
.lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; }
.lb-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.lb-slide { flex: 0 0 100%; display: grid; place-items: center; padding: 0 clamp(8px, 6vw, 90px); }
.lb-slide img {
  max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px);
  object-fit: contain; border-radius: 6px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
  opacity: 0; transition: opacity .45s var(--ease);
}
.lb-slide img.loaded { opacity: 1; }
.lb-slide video { max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); border-radius: 8px; background: #000; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); outline: none; }
.lb-fallback { text-align: center; display: grid; gap: 14px; justify-items: center; max-width: 360px; }
.lb-fallback p { margin: 0; opacity: .75; }

/* Audio-Player in der Lightbox */
.lb-audio { width: min(420px, 86vw); display: grid; gap: 22px; justify-items: center; }
.lb-audio-cover { position: relative; width: min(340px, 70vw, calc(100dvh - 380px)); min-width: 180px; aspect-ratio: 1; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.lb-audio-cover img { width: 100%; height: 100%; object-fit: cover; opacity: 1 !important; border-radius: 0; box-shadow: none; max-height: none; }
.lb-eq { position: absolute; right: 18px; top: 18px; display: flex; gap: 3px; align-items: flex-end; height: 22px; padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,.35); box-sizing: content-box; opacity: 0; transition: opacity .3s; }
.lb-eq i { width: 4px; border-radius: 3px; background: #fff; height: 30%; animation: eq 1s ease-in-out infinite; }
.lb-eq i:nth-child(2) { animation-delay: -.3s; } .lb-eq i:nth-child(3) { animation-delay: -.6s; } .lb-eq i:nth-child(4) { animation-delay: -.15s; } .lb-eq i:nth-child(5) { animation-delay: -.45s; }
.lb-audio.playing .lb-eq { opacity: .9; }
.lb-audio-ctrl { width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
.lb-audio-play { width: 60px; height: 60px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--accent); color: #fff; box-shadow: 0 10px 30px -8px var(--accent); transition: transform .15s, filter .2s; }
.lb-audio-play:hover { filter: brightness(1.1); }
.lb-audio-play:active { transform: scale(.93); }
.lb-audio-play svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.lb-audio-play .i-pause { display: none; }
.lb-audio.playing .lb-audio-play .i-play { display: none; }
.lb-audio.playing .lb-audio-play .i-pause { display: block; }
.lb-audio-seek { display: grid; gap: 6px; }
.lb-audio-seek input { width: 100%; accent-color: var(--accent); cursor: pointer; height: 4px; }
.lb-audio-time { display: flex; justify-content: space-between; font-size: .78rem; opacity: .6; font-variant-numeric: tabular-nums; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: #fff; cursor: pointer;
  transition: background .2s, opacity .3s;
}
.lb-nav:hover { background: rgba(255,255,255,.18); }
.lb-prev { left: clamp(8px, 2vw, 24px); }
.lb-next { right: clamp(8px, 2vw, 24px); }
.lb-nav svg { width: 22px; height: 22px; }
.lb-foot { padding: 12px clamp(12px, 3vw, 28px) 18px; text-align: center; min-height: 64px; transition: opacity .4s; }
.lb-title { font-size: 1.05rem; font-weight: 600; }
.lb-date { font-size: .8rem; opacity: .55; margin-top: 2px; }
.lb-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); z-index: 4; }
.lb.idle .lb-bar, .lb.idle .lb-foot, .lb.idle .lb-nav { opacity: 0; }
.lb.idle { cursor: none; }
.lb-spinner { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: #fff; animation: spin .8s linear infinite; }
.lb-slide img.loaded + .lb-spinner { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  :root { --row-h: 150px; --gap: 6px; }
  .tile { border-radius: 6px; }
  .album-meta > span + span::before { display: none; }
  .lb-nav { display: none; }
  .lb-slide { padding: 0; }
  .lb-slide img { border-radius: 0; max-height: calc(100dvh - 150px); }
}
@media (min-width: 1400px) { :root { --row-h: 320px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Unterordner */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.crumbs a:hover { color: var(--text); }
.crumbs span { opacity: .5; }
.album-head + .album-grid { padding-bottom: 40px; }
.section-title { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0 0 16px; }
.tile-vid { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; background: #111; }
.album-head + .album-grid .album-cover { aspect-ratio: 16 / 10; }
