:root {
  --bg: #0e1117;
  --card: #161b22;
  --text: #f5f7fb;
  --muted: #a9b1c3;
  --accent: #7c5cff;
  --accent2: #00d4ff;
  --border: rgba(255,255,255,.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #263054 0%, var(--bg) 45%);
  color: var(--text);
}

.hero {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
  background:
    linear-gradient(rgba(14,17,23,.45), rgba(14,17,23,.85)),
    url("background.svg");
  background-size: cover;
  background-position: center;
}

.hero-inner {
  max-width: 850px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--accent2);
  font-weight: bold;
}

h1 {
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: .95;
  margin: 10px 0;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 18px;
}

.subline {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.button,
.small-button,
.download {
  border: 0;
  display: inline-block;
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(0,0,0,.3);
}

.small-button {
  padding: 10px 16px;
  font-size: .95rem;
}

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

.button.secondary {
  background: rgba(255,255,255,.14);
  border: 1px solid var(--border);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 35px 18px 70px;
}

.info {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 34px;
}

.info p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.welcome-info {
  position: relative;
  overflow: hidden;
}

.welcome-info::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(0,212,255,.18), transparent 40%);
  pointer-events: none;
}

.welcome-info h2,
.welcome-info p {
  position: relative;
}

.delete-note {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(0,212,255,.10);
  border: 1px solid rgba(0,212,255,.28);
  border-radius: 18px;
  color: var(--text) !important;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.status {
  color: var(--muted);
  margin: 15px 0 25px;
}


.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.gallery-tab {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255,255,255,.08);
  padding: 10px 15px;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
}

.gallery-tab:hover {
  border-color: rgba(0,212,255,.45);
}

.gallery-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}

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

.photo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
  cursor: pointer;
  transition: none;
}

.photo-card:hover {
  border-color: rgba(124,92,255,.35);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.photo-meta {
  padding: 12px 14px;
  color: var(--muted);
  font-size: .9rem;
  display: grid;
  gap: 4px;
}

.photo-number {
  color: var(--text);
  font-size: 1rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: none;
  place-items: center;
  padding: 22px;
  z-index: 1000;
}

.lightbox.open {
  display: grid;
}

.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 78vh;
  border-radius: 18px;
  box-shadow: 0 20px 70px rgba(0,0,0,.6);
}

.close {
  position: fixed;
  top: 18px;
  right: 22px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 44px;
  cursor: pointer;
}

.download {
  margin-top: 16px;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 30px 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 58vh;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Ruhige Galerie: kein Flackern, kein Springen, keine auffälligen Bewegungen */
.photo-card,
.photo-card:hover {
  transition: none !important;
  transform: none !important;
}


/* Popup für neue Bilder: QR-Code mittig anzeigen und automatisch schließen */
.new-qr-popup {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.50);
  z-index: 2000;
}

.new-qr-popup.open {
  display: grid;
}

.new-qr-card {
  position: relative;
  width: min(340px, 92vw);
  padding: 22px 20px 20px;
  border-radius: 24px;
  text-align: center;
  background: rgba(22,27,34,.96);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 22px 80px rgba(0,0,0,.65);
}

.new-qr-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.new-qr-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-weight: bold;
  font-size: .85rem;
}

.new-qr-title {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: bold;
}

.new-qr-image {
  width: 230px;
  height: 230px;
  max-width: 78vw;
  max-height: 78vw;
  padding: 10px;
  object-fit: contain;
  background: white;
  border-radius: 18px;
  display: block;
  margin: 0 auto;
}

.new-qr-countdown {
  margin-top: 12px;
  color: var(--muted);
  font-size: .95rem;
}


/* Öffentliche alte Event-Ordner */
.archive-section {
  margin-top: 42px;
}

.archive-info {
  color: var(--muted);
  line-height: 1.45;
}

.archive-list {
  display: grid;
  gap: 26px;
}

.archive-public-folder {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
}

.archive-public-folder h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.archive-public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.archive-public-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.archive-public-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.archive-public-info {
  padding: 10px;
  color: var(--muted);
  font-size: .85rem;
  word-break: break-all;
  display: grid;
  gap: 5px;
}

.archive-public-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.archive-public-links a {
  color: #9beeff;
  font-weight: bold;
  text-decoration: none;
}


.old-events {
  margin-top: 50px;
}

.old-event-box {
  margin: 26px 0 36px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
}

.old-event-box h3 {
  margin-top: 0;
  color: var(--text);
}


.old-event-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-weight: bold;
  font-size: 1.05rem;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0,0,0,.25);
}

.old-event-count {
  display: block;
  margin: 10px 0 18px;
  color: var(--muted);
  text-align: center;
}

.old-event-images {
  margin-top: 18px;
}

.small-hero {
  min-height: 38vh;
}

.old-event-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-weight: bold;
  font-size: 1.05rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  box-shadow: 0 12px 35px rgba(0,0,0,.25);
}

.old-event-count {
  display: block;
  margin: 10px 0 18px;
  color: var(--muted);
  text-align: center;
}


.event-popup {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.78);
  z-index: 3000;
}

.event-popup.open {
  display: grid;
}

.event-popup-card {
  position: relative;
  width: min(1200px, 96vw);
  height: min(850px, 92vh);
  background: #0e1117;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,.75);
  overflow: hidden;
}

.event-popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ff0000;
  color: white;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.event-popup-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #0e1117;
}

@media (max-width: 700px) {
  .event-popup {
    padding: 8px;
  }

  .event-popup-card {
    width: 100vw;
    height: 96vh;
    border-radius: 14px;
  }
}


.archive-password-form {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.12);
  display: grid;
  gap: 10px;
}

.archive-password-form p {
  margin: 0;
  color: var(--text, #fff);
  font-weight: 700;
}

.archive-password-form input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.95);
  color: #111;
  box-sizing: border-box;
}

.archive-password-form button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent, #7c5cff), var(--accent2, #00d4ff));
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.archive-password-message {
  color: #ffb4b4;
  min-height: 1.2em;
  font-weight: 700;
}
