:root {
  --bg-dark: #4a1430;
  --text: #2d1822;
  --text-light: #fff8fb;
  --muted: #7a5260;
  --accent: #d83f79;
  --accent-dark: #8f173f;
  --border: rgba(143, 23, 63, 0.18);

  --dark-card-1: rgba(104, 31, 68, 0.78);
  --dark-card-2: rgba(78, 18, 48, 0.86);
  --light-card-1: rgba(255, 250, 247, 0.95);
  --light-card-2: rgba(255, 244, 249, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(rgba(74, 20, 48, 0.24), rgba(74, 20, 48, 0.38)),
    url("/assets/wedding/hochzeits-bg.jpeg");
  background-position: 72% 10%;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* alte HTML-Deko-Images ausblenden */
.wedding-deco,
.wedding-bg-overlay,
.floral-left,
.floral-right,
.bouquet-top-right,
.bouquet-bottom-left {
  display: none !important;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
  display: grid;
  gap: 44px;
  position: relative;
  z-index: 2;
}

/* =========================
   KARTEN
   ========================= */

.card {
  position: relative;
  border-radius: 30px;
  padding: 34px;
  background: linear-gradient(180deg, var(--light-card-1), var(--light-card-2));
  border: 1px solid rgba(255,255,255,0.52);
  box-shadow:
    0 34px 90px rgba(63, 16, 36, 0.22),
    0 12px 30px rgba(63, 16, 36, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.42);
}

/* dunkle Eingabekarte */
.card:first-of-type {
  overflow: visible;
  color: var(--text-light);
  background:
    linear-gradient(180deg, var(--dark-card-1), var(--dark-card-2));
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow:
    0 38px 96px rgba(63, 16, 36, 0.35),
    0 14px 34px rgba(63, 16, 36, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.16);
}

/* Bouquet rechts oben außen am dunklen Container */
.card:first-of-type::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -54px;
  width: 225px;
  height: 198px;
  background: url("/assets/wedding/bouquet-top-right.png") center center / contain no-repeat;
  opacity: 0.98;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 14px 22px rgba(63,16,36,0.20));
}

/* Bouquet links unten außen am dunklen Container */
.card:first-of-type::before {
  content: "";
  position: absolute;
  left: -22px;
  bottom: -30px;
  width: 175px;
  height: 225px;
  background: url("/assets/wedding/bouquet-bottom-left.png") left bottom / contain no-repeat;
  opacity: 0.98;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 14px 22px rgba(63,16,36,0.18));
}

.card:first-of-type > * {
  position: relative;
  z-index: 2;
}

/* =========================
   TYPO
   ========================= */

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: bold;
}

.card:first-of-type .eyebrow {
  color: #fff1f7;
}

h1 {
  margin: 0;
  max-width: 790px;
  font-size: clamp(44px, 7.2vw, 74px);
  line-height: 0.92;
  letter-spacing: 0.01em;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.95;
}

.intro {
  margin: 22px 0 28px;
  max-width: 760px;
  color: rgba(255,248,251,0.90);
  font-size: 19px;
  line-height: 1.5;
}

.intro.small {
  margin: 16px 0 20px;
  color: var(--muted);
  font-size: 16px;
}

/* =========================
   FORMULAR
   ========================= */

.form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: bold;
}

.card:first-of-type label {
  color: var(--text-light);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  font-weight: bold;
  background: rgba(255,250,246,0.96);
  color: var(--text);
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 15px 22px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #e85a91, #9d1748);
  box-shadow: 0 14px 30px rgba(93, 15, 49, 0.28);
}

button:hover {
  transform: translateY(-1px);
}

.result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 236, 243, 0.22);
  border: 1px solid rgba(255,255,255,0.32);
  color: #fff8fb;
  font-weight: bold;
}

/* =========================
   SPOTIFY
   ========================= */

.spotify-box {
  margin-top: 4px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 236, 243, 0.18);
  border: 1px solid rgba(255,255,255,0.30);
}

.spotify-search-row {
  display: flex;
  gap: 12px;
}

.spotify-search-row input {
  flex: 1;
}

.spotify-search-row button {
  white-space: nowrap;
}

.spotify-status {
  margin-top: 12px;
  color: rgba(255,248,251,0.92);
  font-weight: bold;
}

.spotify-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.spotify-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-radius: 18px;
  padding: 10px;
  background: rgba(255,250,246,0.96);
  color: var(--text);
  box-shadow: none;
  border: 1px solid rgba(143, 23, 63, 0.12);
}

.spotify-result img,
.spotify-cover-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(42, 23, 29, 0.12);
  flex: 0 0 auto;
}

.spotify-result-main {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.spotify-result-main small,
.spotify-result-main em {
  color: var(--muted);
  font-style: normal;
}

.spotify-rubrik {
  font-size: 12px;
  color: var(--accent-dark);
  background: rgba(155, 36, 66, 0.1);
  border-radius: 999px;
  padding: 6px 8px;
  white-space: nowrap;
}

.manual-details {
  margin-top: 8px;
  padding-top: 16px;
  padding-left: 120px;
}

.manual-details summary {
  cursor: pointer;
  font-weight: bold;
  color: rgba(255,248,251,0.92);
  margin-bottom: 14px;
}

.manual-details[open] {
  display: grid;
  gap: 16px;
}

.manual-details[open] button[type="submit"] {
  justify-self: end;
  min-width: 320px;
}

/* =========================
   MUSIKZIEL
   ========================= */

.music-goal-card {
  overflow: visible;
  padding: 36px 42px;
  z-index: 2;
}

/* linke große Ranke: außen an Musikziel-Karte, größer als Container */
.music-goal-card::before {
  content: "";
  position: absolute;
  left: -52px;
  top: -58px;
  width: 165px;
  height: calc(100% + 116px);
  background: url("/assets/wedding/floral-left.png") center center / contain no-repeat;
  opacity: 0.98;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 10px 18px rgba(63,16,36,0.10));
}

/* rechte große Ranke: außen an Musikziel-Karte, größer als Container */
.music-goal-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -58px;
  width: 165px;
  height: calc(100% + 116px);
  background: url("/assets/wedding/floral-right.png") center center / contain no-repeat;
  opacity: 0.98;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 10px 18px rgba(63,16,36,0.10));
}

.music-goal-content {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 30px;
  align-items: center;
}

.music-goal-content > * {
  position: relative;
  z-index: 5;
}

.goal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.goal-stats div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,250,246,0.88);
  border: 1px solid var(--border);
}

.goal-stats strong {
  display: block;
  font-size: 28px;
  color: var(--accent-dark);
  line-height: 1;
}

.goal-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: bold;
}

.goal-bar {
  height: 18px;
  border-radius: 999px;
  background: rgba(42, 23, 29, 0.12);
  overflow: hidden;
  border: 1px solid rgba(42, 23, 29, 0.12);
}

.goal-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  transition: width 0.35s ease;
}

.goal-text {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: bold;
}

.plate-stack-widget {
  position: relative;
  z-index: 6;
  min-height: 190px;
  border-radius: 24px;
  background: rgba(255,250,246,0.88);
  border: 1px solid rgba(143, 23, 63, 0.10);
  box-shadow:
    0 12px 24px rgba(63,16,36,0.10),
    inset 0 1px 0 rgba(255,255,255,0.45);
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
}

.plate-stack-label {
  font-weight: bold;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.plate-stack-visual {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
}

.plate-stack-img {
  max-width: 138px;
  max-height: 138px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(69,16,37,0.18));
}

.cutlery-deco-img,
.plate-shards {
  display: none !important;
}

/* =========================
   WUNSCHLISTE
   ========================= */

.song-overview-card {
  overflow: hidden;
}

.public-song-list {
  display: grid;
  gap: 18px;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(155, 36, 66, 0.08);
  border: 1px solid rgba(155, 36, 66, 0.14);
  color: var(--muted);
  font-weight: bold;
}

.rubrik-group {
  display: grid;
  gap: 10px;
}

.rubrik-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(42, 23, 29, 0.12);
}

.rubrik-title span {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-dark);
}

.rubrik-title small {
  color: var(--muted);
  font-weight: bold;
}

.rubrik-items {
  display: grid;
  gap: 10px;
}

.public-song-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,250,246,0.92);
  border: 1px solid var(--border);
}

.public-song-cover {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(42, 23, 29, 0.12);
  flex: 0 0 auto;
}

.public-song-main {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.public-song-main strong {
  font-size: 19px;
}

.public-song-main span,
.public-song-guest {
  color: var(--muted);
}

.public-song-main a,
.song-meta a {
  color: var(--accent-dark);
  font-weight: bold;
  text-decoration: none;
}

.public-song-guest {
  display: grid;
  gap: 3px;
  text-align: right;
  font-size: 14px;
  white-space: nowrap;
}

.public-song-guest strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.public-song-guest span {
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   ADMIN
   ========================= */

.card.wide {
  max-width: 1100px;
}

.admin-login {
  margin: 24px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-login input {
  max-width: 320px;
}

.song-list {
  display: grid;
  gap: 12px;
}

.song-item {
  background: rgba(255,250,246,0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.song-title {
  font-weight: bold;
  font-size: 20px;
}

.song-meta {
  color: var(--muted);
  margin-top: 4px;
}

.song-message {
  margin-top: 10px;
  white-space: pre-wrap;
}

.admin-song-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.admin-song-content {
  min-width: 0;
  flex: 1;
}

.admin-song-cover {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(42, 23, 29, 0.12);
  flex: 0 0 auto;
  margin-top: 2px;
}

.delete-song-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(155, 36, 66, 0.11);
  color: var(--accent-dark);
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}

.delete-song-btn:hover {
  background: rgba(155, 36, 66, 0.2);
  transform: translateY(-1px);
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 760px) {
  body {
    background-position: 70% 12%;
    background-size: cover;
    background-attachment: scroll;
  }

  .page {
    width: min(100% - 24px, 920px);
    padding: 18px 0 42px;
    gap: 34px;
  }

  .card {
    border-radius: 24px;
    padding: 24px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  h2 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .card:first-of-type::after {
    top: -24px;
    right: -24px;
    width: 126px;
    height: 126px;
  }

  .card:first-of-type::before {
    left: -24px;
    bottom: -42px;
    width: 118px;
    height: 118px;
  }

  .spotify-search-row {
    display: grid;
  }

  .spotify-rubrik {
    display: none;
  }

  .spotify-result {
    align-items: flex-start;
  }

  .music-goal-card {
    overflow: visible;
    padding: 24px 22px;
  }

  .music-goal-card::before {
    left: -36px;
    top: -30px;
    width: 88px;
    height: calc(100% + 60px);
    opacity: 0.80;
  }

  .music-goal-card::after {
    right: -36px;
    top: -30px;
    width: 88px;
    height: calc(100% + 60px);
    opacity: 0.80;
  }

  .music-goal-content {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .goal-stats {
    grid-template-columns: 1fr;
  }

  .plate-stack-widget {
    min-height: 150px;
  }

  .plate-stack-visual {
    width: 130px;
    height: 120px;
  }

  .plate-stack-img {
    max-width: 122px;
    max-height: 116px;
  }

  .public-song-item {
    display: grid;
  }

  .public-song-guest {
    text-align: left;
    white-space: normal;
  }

  .admin-login {
    display: grid;
  }

  .admin-login input {
    max-width: none;
  }

  .admin-song-item {
    align-items: center;
  }
}

/* ===== SPOTIFY ADMIN PANEL ===== */

.admin-spotify-panel {
  margin-top: 28px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255,250,246,0.72);
  border: 1px solid var(--border);
  display: grid;
  gap: 14px;
}

.admin-spotify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-spotify-panel a {
  color: var(--accent-dark);
}

@media (max-width: 760px) {
  .admin-spotify-actions {
    display: grid;
  }
}

/* ===== ADMIN APPROVAL AUTO REFRESH V4.7 ===== */

.admin-song-section {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.admin-song-section h2 {
  margin: 0;
  color: var(--text-light);
  font-size: 26px;
}

.admin-song-section h2 span {
  color: rgba(255,255,255,0.72);
  font-size: 18px;
}

.admin-song-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.admin-song-item.is-pending {
  border: 2px solid rgba(216, 63, 121, 0.72);
  box-shadow:
    0 16px 34px rgba(216, 63, 121, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.40);
}

.admin-song-content {
  min-width: 0;
}

.admin-song-content .song-title,
.song-item .song-title {
  color: var(--text) !important;
  font-weight: bold;
  font-size: 20px;
  line-height: 1.15;
}

.admin-song-content .song-meta,
.song-item .song-meta {
  color: var(--muted) !important;
}

.song-approval-state {
  margin-top: 5px;
  font-size: 13px;
  font-weight: bold;
  color: var(--accent-dark);
}

.admin-song-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.approve-song-btn {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d83f79, #8f173f);
  color: #fff8fb;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(143, 23, 63, 0.20);
}

.delete-song-btn {
  min-width: 44px;
  min-height: 44px;
}

.admin-empty {
  color: var(--text-light);
  font-weight: bold;
}

@media (max-width: 760px) {
  .admin-song-item {
    grid-template-columns: auto 1fr;
  }

  .admin-song-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .approve-song-btn {
    flex: 1;
  }
}
