@font-face {
  font-family: 'DancingScript';
  src: url('fonts/DancingScript-Regular.woff2') format('woff2');
  font-display: swap;
}

:root {
  --gold: #d4af37;
  --gold-dark: #a8892c;
  --text: #3f3a35;
  --muted: #7a7067;
  --blue-soft: #86bce8;
  --pink-soft: #d99ab2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  min-height: 100vh;
  font-family: 'DancingScript', cursive;
  color: var(--text);
  background: url("images/background.png") no-repeat center center;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.no-scroll {
  overflow: hidden;
}

.card {
  width: 100%;
  max-width: 640px;
  padding: 3rem 2.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  border-radius: 28px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.1),
    0 10px 25px rgba(212,175,55,0.1);
}

.headline {
  font-size: 3.6rem;
  color: var(--gold);
  margin: 0;
  text-shadow: 0 2px 6px rgba(212,175,55,0.25);
}

.divider {
  width: 120px;
  height: 2px;
  margin: 1rem auto 1rem;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold),
    transparent
  );
}

.small-label {
  margin: 0.6rem 0;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.names {
  font-size: 3.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.name-christian {
  color: var(--blue-soft);
}

.ampersand {
  color: var(--gold);
  font-size: 0.95em;
}

.name-nina {
  color: var(--pink-soft);
}

.date {
  margin: 1.6rem 0 0;
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 600;
}

.intro {
  margin: 2rem 0 1.4rem;
  font-size: 1.6rem;
  color: #5f5750;
}

#fileInput {
  display: none;
}

button.trigger {
  background: rgba(255,255,255,0.8);
  border: 1.5px solid var(--gold);
  color: var(--gold-dark);
  padding: 0.9rem 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'DancingScript', cursive;
  font-size: 1.6rem;
  margin-bottom: 1.4rem;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(212,175,55,0.15);
}

button.trigger:hover {
  background: var(--gold);
  color: white;
  transform: translateY(-2px);
}

#uploadBtn {
  background: linear-gradient(135deg, #d4af37, #b9975b);
  color: white;
  border: none;
  padding: 1rem 2.6rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'DancingScript', cursive;
  font-size: 1.6rem;
  box-shadow: 0 14px 30px rgba(212,175,55,0.35);
  transition: all 0.25s ease;
}

#uploadBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(212,175,55,0.45);
}

#uploadBtn:disabled,
button.trigger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

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

.preview-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(212,175,55,0.2);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.preview-item canvas,
.preview-item video {
  max-width: 130px;
  max-height: 130px;
  display: block;
}

button.rotate,
button.remove {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

button.rotate {
  top: 6px;
  right: 6px;
}

button.remove {
  top: 6px;
  left: 6px;
}

.progress-wrap {
  width: 100%;
  max-width: 420px;
  margin: 1.2rem auto 0;
  display: none;
}

.progress-info {
  font-size: 1.3rem;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(212,175,55,0.18);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, #d4af37, #b9975b);
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* Galerie-Link auf Upload-Seite */
.gallery-link {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: 'DancingScript', cursive;
  font-size: 1.5rem;
  color: var(--gold-dark);
  text-decoration: none;
  transition: 0.25s ease;
}

.gallery-link:hover {
  color: var(--gold);
  transform: translateY(-1px);
}

/* Extra Galerie-Bereich auf Upload-Seite */
.gallery-section {
  margin-top: 2.5rem;
}

.gallery-divider {
  width: 140px;
  height: 1px;
  margin: 0 auto 1.2rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212,175,55,0.7),
    transparent
  );
}

.gallery-text {
  font-size: 1.3rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.gallery-button {
  display: inline-block;
  background: rgba(255,255,255,0.8);
  border: 1.5px solid var(--gold);
  color: var(--gold-dark);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-size: 1.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(212,175,55,0.15);
}

.gallery-button:hover {
  background: var(--gold);
  color: white;
  transform: translateY(-2px);
}

/* Galerie-Seite */
.gallery-card {
  max-width: 960px;
}

.gallery-grid {
  width: 100%;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(212,175,55,0.22);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: 0.25s ease;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.16);
}

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

.video-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 2.4rem;
  color: white;
  background: rgba(0,0,0,0.18);
  text-shadow: 0 3px 10px rgba(0,0,0,0.45);
  pointer-events: none;
}

.gallery-empty {
  margin-top: 2rem;
  font-size: 1.4rem;
  color: var(--muted);
}

.gallery-actions {
  margin-top: 1.6rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 1.5rem;
  background: rgba(0,0,0,0.86);
  justify-content: center;
  align-items: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 88vw;
  max-height: 88vh;
}

.lightbox-content {
  max-width: 88vw;
  max-height: 84vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  color: white;
  background: rgba(255,255,255,0.15);
  font-family: Arial, sans-serif;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  color: white;
  background: rgba(255,255,255,0.15);
  font-family: Arial, sans-serif;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-prev {
  left: 22px;
}

.lightbox-next {
  right: 22px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255,255,255,0.28);
}

.lightbox-counter {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  background: rgba(0,0,0,0.35);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

/* Mobile */
@media (max-width: 600px) {
  body {
    padding: 1rem;
    align-items: flex-start;
  }

  .headline {
    font-size: 2.6rem;
  }

  .names {
    font-size: 2.2rem;
    gap: 0.25rem;
  }

  .date {
    font-size: 1rem;
  }

  .intro {
    font-size: 1.3rem;
  }

  button.trigger,
  #uploadBtn {
    font-size: 1.4rem;
  }

  .preview-item canvas,
  .preview-item video {
    max-width: 100px;
    max-height: 100px;
  }

  .progress-info {
    font-size: 1.15rem;
  }

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

  .gallery-item img,
  .gallery-item video {
    height: 115px;
  }

  .gallery-link {
    font-size: 1.35rem;
  }

  .lightbox {
    padding: 0.8rem;
  }

  .lightbox-stage {
    max-width: 94vw;
    max-height: 82vh;
  }

  .lightbox-content {
    max-width: 94vw;
    max-height: 78vh;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 2.4rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }
}
