/* =========================================================
   Lisa & Dominik – Elegant Rock Wedding
   ========================================================= */

:root {
  --color-bg: #18130f;
  --color-bg-alt: #241d16;
  --color-surface: #2c2419;
  --color-surface-2: #38301f;
  --color-border: rgba(212, 175, 90, 0.3);
  --color-border-strong: rgba(212, 175, 90, 0.6);

  --color-gold: #d4af5a;
  --color-gold-light: #f2d38f;
  --color-wine: #7d1f2f;
  --color-wine-light: #a3283b;

  --color-text: #f7f1e6;
  --color-text-muted: #c1b4a2;
  --color-text-dim: #948674;

  --font-heading: Georgia, 'Iowan Old Style', 'Apple Garamond', Baskerville, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(212, 175, 90, 0.26), transparent 62%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(212, 175, 90, 0.16), transparent 60%),
    radial-gradient(ellipse 65% 40% at 0% 20%, rgba(125, 31, 47, 0.2), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 3px);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img, video { max-width: 100%; display: block; }

::selection {
  background: var(--color-wine);
  color: var(--color-text);
}

/* ---------- Vinyl-Schallplatte im Hintergrund ---------- */

.vinyl-bg {
  position: fixed;
  top: -14vw;
  right: -20vw;
  width: 60vw;
  height: 60vw;
  min-width: 420px;
  min-height: 420px;
  max-width: 780px;
  max-height: 780px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background:
    /* Label-Umrandung */
    radial-gradient(circle at center, transparent 0 12%, rgba(242, 211, 143, 0.3) 12% 12.6%, transparent 12.6% 100%),
    /* Label-Fläche */
    radial-gradient(circle at center, rgba(125, 31, 47, 0.16) 0 11.9%, transparent 11.9% 100%),
    /* Rillen */
    repeating-radial-gradient(circle at center, rgba(242, 211, 143, 0.09) 0px, rgba(242, 211, 143, 0.09) 1px, transparent 1.8px, transparent 9px),
    /* Grundfläche mit leichtem Glanz */
    radial-gradient(circle at 38% 32%, rgba(56, 48, 31, 0.6), rgba(24, 19, 15, 0.8) 70%);
  mask-image: radial-gradient(circle at center, #000 0%, #000 50%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, #000 50%, transparent 78%);
  animation: vinyl-spin 90s linear infinite;
}

@keyframes vinyl-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .vinyl-bg { animation: none; }
}

@media (max-width: 640px) {
  .vinyl-bg {
    top: -20vw;
    right: -28vw;
    width: 85vw;
    height: 85vw;
    min-width: 320px;
    min-height: 320px;
  }
}

/* ---------- Layout ---------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(24, 19, 15, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  color: var(--color-gold-light);
}

.brand svg { flex-shrink: 0; }

.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .site-header { padding: 12px 0; }
  .brand { font-size: 0.85rem; gap: 6px; }
  .brand svg { width: 20px; height: 20px; }
  .main-nav { gap: 4px; }
  .main-nav a { font-size: 0.68rem; padding: 7px 9px; }
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-gold-light);
  border-color: var(--color-border-strong);
  background: rgba(212, 175, 90, 0.07);
}

main {
  flex: 1;
  padding: 48px 0 80px;
}

@media (max-width: 480px) {
  main { padding: 32px 0 56px; }
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.site-footer .hashtag {
  color: var(--color-gold);
  font-weight: 600;
}

/* ---------- Divider ornament ---------- */

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px 0;
  color: var(--color-gold);
  opacity: 0.8;
}

.ornament::before,
.ornament::after {
  content: '';
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--color-border-strong), transparent);
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 40px 0 20px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  letter-spacing: 0.03em;
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--color-text);
  text-shadow: 0 0 40px rgba(212, 175, 90, 0.25);
}

.hero h1 .amp {
  color: var(--color-gold);
  font-style: italic;
  padding: 0 0.15em;
}

.hero .date {
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--color-gold-light);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero .subtitle {
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 18px auto 0;
  font-size: 1.02rem;
}

/* ---------- CTA cards ---------- */

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 44px;
}

@media (max-width: 640px) {
  .cta-grid { grid-template-columns: 1fr; }
}

.cta-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 36px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, var(--color-surface), var(--color-bg-alt));
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 90, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cta-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-strong);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}

.cta-card:hover::before { opacity: 1; }

.cta-card .icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(212, 175, 90, 0.1);
  border: 1px solid var(--color-border-strong);
  color: var(--color-gold-light);
}

.cta-card h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0;
  letter-spacing: 0.02em;
}

.cta-card p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Section titles ---------- */

.page-title {
  text-align: center;
  margin-bottom: 8px;
}

.page-title h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}

.page-title p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { border-color: var(--color-gold); background: rgba(212, 175, 90, 0.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-wine), var(--color-wine-light));
  border-color: var(--color-wine-light);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(163, 40, 59, 0.45);
  border-color: var(--color-gold);
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), #a9813a);
  border-color: var(--color-gold);
  color: #1a1509;
  font-weight: 700;
}

.btn-gold:hover { box-shadow: 0 8px 24px rgba(212, 175, 90, 0.35); }

.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Upload page ---------- */

.uploader-name-field {
  max-width: 420px;
  margin: 0 auto 28px;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.text-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  font-family: var(--font-body);
}

.text-input:focus {
  outline: none;
  border-color: var(--color-gold);
}

.dropzone {
  position: relative;
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--color-surface);
  transition: border-color 0.2s ease, background 0.2s ease;
  max-width: 560px;
  margin: 0 auto;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--color-gold);
  background: var(--color-surface-2);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--color-gold-light);
}

.dropzone .title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.dropzone .hint {
  color: var(--color-text-dim);
  font-size: 0.85rem;
}

.queue {
  max-width: 560px;
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.queue-item .thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
}

.queue-item .thumb img,
.queue-item .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-item .info {
  flex: 1;
  min-width: 0;
}

.queue-item .name {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item .meta {
  font-size: 0.76rem;
  color: var(--color-text-dim);
  margin-top: 2px;
}

.progress-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-wine-light), var(--color-gold));
  transition: width 0.2s ease;
}

.queue-item .status-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.status-icon.ok { color: #6cbf7c; }
.status-icon.error { color: var(--color-wine-light); }

.queue-item.state-error .meta { color: var(--color-wine-light); }

.upload-actions {
  max-width: 560px;
  margin: 20px auto 0;
  display: flex;
  justify-content: center;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Gallery ---------- */

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.gallery-count {
  color: var(--color-text-dim);
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  margin-bottom: 4px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .video-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(11, 10, 13, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-light);
  backdrop-filter: blur(2px);
}

.gallery-item .select-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(243, 237, 226, 0.85);
  background: rgba(11, 10, 13, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  opacity: 0;
  transition: all 0.15s ease;
}

.gallery-grid.select-mode .select-toggle {
  opacity: 1;
}

.gallery-item.selected .select-toggle {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: #1a1509;
}

.gallery-item.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.gallery-empty {
  text-align: center;
  color: var(--color-text-dim);
  padding: 60px 20px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* ---------- Mobile selection bar ---------- */

.selection-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(28, 22, 16, 0.92);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--color-border-strong);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.5);
}

.selection-bar.show {
  display: flex;
}

.selection-bar-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.selection-bar-count {
  font-size: 0.9rem;
  color: var(--color-text);
  white-space: nowrap;
}

.selection-bar-count strong {
  color: var(--color-gold-light);
}

.selection-bar-selectall {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 0;
  cursor: pointer;
  flex-shrink: 0;
}

.selection-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Body braucht Platz am unteren Rand, damit die Bar den Inhalt nicht verdeckt */
body.select-mode-active main {
  padding-bottom: 96px;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 7, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.lightbox.open { display: flex; }

.lightbox-content {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.lightbox-meta {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.lightbox-actions {
  display: flex;
  gap: 10px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav.prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox-nav { display: none; }
}

/* ---------- Spinner (vinyl) ---------- */

.vinyl-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 90, 0.25);
  border-top-color: var(--color-gold);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.text-center { text-align: center; }
