/* GIFTMANIAX – Aussehen. Standard: Nachtblau mit Gold. Weihnachts-Edition (1.11.–26.12.): Tannengrün, Rot, Gold. */
:root {
  --grund: #0e1b3d;
  --grund-tief: #08112a;
  --flaeche: rgba(255, 255, 255, 0.06);
  --linie: rgba(232, 196, 106, 0.28);
  --text: #f6f1e4;
  --leise: #b9b3a3;
  --gold: #e8c46a;
  --gold-tief: #c9a24a;
  --gold-verlauf: linear-gradient(135deg, #f6dc8c 0%, #e8c46a 40%, #c9a24a 100%);
  --rot: #c8262c;
  --karte: #fbf7ee;
  --karte-text: #1d1a14;
  --karte-leise: #6e6656;
  --kartentext: #fff4c9;
  --schatten: 0 10px 30px rgba(0, 0, 0, 0.35);
  --r: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --schrift: "Snell Roundhand", "Segoe Script", "Apple Chancery", "URW Chancery L", cursive;
  color-scheme: dark;
}
html.thema-weihnacht {
  --grund: #0f3b2a;
  --grund-tief: #082418;
  --linie: rgba(232, 196, 106, 0.32);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% -10%, color-mix(in srgb, var(--grund) 70%, #3a4f8f) 0%, var(--grund) 45%, var(--grund-tief) 100%) fixed;
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
html.thema-weihnacht body { background: radial-gradient(ellipse at 50% -10%, #1d5a40 0%, var(--grund) 45%, var(--grund-tief) 100%) fixed; }
[hidden] { display: none !important; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a { color: var(--gold); }
.leise { color: var(--leise); }
html.thema-normal .weihnacht-nur, html.thema-weihnacht .normal-nur { display: none; }

/* ---------- Glitzer, Mond, Schnee ---------- */
.glitzer { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.stern { position: absolute; color: var(--gold); opacity: 0.2; animation: funkeln 3s ease-in-out infinite; font-size: 10px; }
.flocke { position: absolute; top: -20px; color: #fff; opacity: 0.6; animation: schneien linear infinite; }
@keyframes funkeln { 50% { opacity: 0.95; transform: scale(1.3); } }
@keyframes schneien { to { transform: translateY(110vh) translateX(30px) rotate(180deg); } }

.mond {
  position: absolute; right: max(24px, calc(50% - 490px)); top: 84px; width: 54px; height: 54px; border-radius: 50%;
  box-shadow: inset -14px 6px 0 0 #f6e3a4; filter: drop-shadow(0 0 12px rgba(246, 227, 164, 0.5));
}
html.thema-weihnacht .mond { display: none; }

/* ---------- Kopf ---------- */
.kopf { position: relative; z-index: 2; padding: 0 16px; text-align: center; }
.band { height: 6px; background: var(--gold-verlauf); margin: 0 -16px; box-shadow: 0 0 18px rgba(232, 196, 106, 0.6); }
html.thema-weihnacht .band { display: none; }
.kopfzeile { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 22px 0 6px; }
html.thema-weihnacht .kopfzeile { padding-top: 64px; }
.logo {
  font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 6vw, 38px); letter-spacing: 0.12em;
  color: var(--text); text-decoration: none; text-shadow: 0 0 18px rgba(232, 196, 106, 0.35);
}
.logo span { background: var(--gold-verlauf); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.15em; }
.sprache { display: flex; border: 1px solid var(--linie); border-radius: 999px; overflow: hidden; }
.sprache button { background: none; border: 0; color: var(--leise); padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.sprache button.an { background: var(--gold-verlauf); color: var(--grund-tief); }

.countdown { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 6px; margin-top: 6px; padding: 8px 16px; border: 1px solid var(--linie); border-radius: 999px; background: rgba(0, 0, 0, 0.18); font-size: 14px; }
.countdown > span { color: var(--leise); margin-right: 4px; }
.countdown b { font-family: var(--serif); font-size: 22px; color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown small { color: var(--leise); margin-right: 6px; }

/* Kerzen (Weihnachten) */
.kerzen { display: none; }
html.thema-weihnacht .kerzen { display: flex; gap: 14px; position: absolute; right: max(16px, calc(50% - 500px)); top: 128px; align-items: flex-end; }
.kerzen i { position: relative; display: block; width: 12px; border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, #f3ead7, #fffaf0 50%, #e1d6bd); }
.kerzen i:nth-child(1) { height: 34px; } .kerzen i:nth-child(2) { height: 46px; } .kerzen i:nth-child(3) { height: 28px; }
.kerzen i::before { content: ""; position: absolute; left: 50%; top: -15px; width: 9px; height: 14px; margin-left: -4.5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff6c8 0%, #ffcf5a 45%, #ff8a1e 80%, transparent 82%); filter: drop-shadow(0 0 8px #ffbf47); animation: flackern 1.3s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.kerzen i:nth-child(2)::before { animation-delay: 0.4s; } .kerzen i:nth-child(3)::before { animation-delay: 0.8s; }
@keyframes flackern { 0% { transform: scale(1) rotate(-2deg); } 40% { transform: scale(0.92, 1.08) rotate(2deg); } 100% { transform: scale(1.05, 0.95) rotate(-1deg); } }

/* Girlande (Weihnachten): rote Bögen mit warmgelben Lichtern, von app.js gezeichnet */
.girlande { display: none; }
html.thema-weihnacht .girlande { display: block; position: absolute; left: 0; right: 0; height: 56px; z-index: 3; pointer-events: none; }
.girlande.oben { top: 0; }
.girlande.unten { position: relative; transform: scaleY(-1); margin-top: 10px; }
.girlande svg { width: 100%; height: 100%; display: block; overflow: visible; }
.licht { fill: #ffd76a; filter: drop-shadow(0 0 5px #ffcf4a); animation: blinken 2.4s ease-in-out infinite; }
@keyframes blinken { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Inhalt ---------- */
main { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(32px, 7vw, 54px); line-height: 1.1; text-align: center; margin: 28px 0 10px; }
h1::after { content: "✦"; display: block; font-size: 18px; color: var(--gold); margin-top: 8px; }
h2 { font-family: var(--serif); font-size: clamp(24px, 5vw, 32px); margin: 0 0 4px; }
.unterzeile { text-align: center; color: var(--leise); font-size: 19px; margin: 0 auto 26px; max-width: 34em; }
.unterzeile .weihnacht-nur { color: var(--gold); font-weight: 700; }
.hinweis-tag { text-align: center; color: var(--gold); font-weight: 700; margin: -10px 0 20px; }

.suche { max-width: 720px; margin: 0 auto; }
.suche textarea {
  width: 100%; display: block; padding: 20px 22px; font: inherit; font-size: 19px; line-height: 1.5;
  color: #1d1a14; background: #fffdf6; border: 2px solid var(--gold); border-radius: 22px; resize: vertical;
  box-shadow: 0 0 0 6px rgba(232, 196, 106, 0.12), var(--schatten);
}
.suche textarea:focus { outline: none; box-shadow: 0 0 0 6px rgba(232, 196, 106, 0.35), var(--schatten); }
.suche textarea::placeholder { color: #8a8170; }

.regler { margin: 22px 4px 4px; }
.regler-kopf { display: flex; justify-content: space-between; color: var(--leise); font-size: 15px; }
.regler-kopf b { color: var(--gold); font-size: 17px; }
.doppelregler { position: relative; height: 36px; }
.doppelregler::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.15); }
.doppelregler input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 36px; }
.doppelregler input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-verlauf); border: 2px solid #fff6d8; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); cursor: pointer; }
.doppelregler input::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); border: 2px solid #fff6d8; cursor: pointer; }
.doppelregler input::-moz-range-track { background: none; }

.schalter { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin: 14px 0 22px; }
.schalter label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.schalter input { width: 20px; height: 20px; accent-color: var(--gold); }

.goldknopf {
  display: block; margin: 0 auto; min-width: 240px; padding: 18px 34px; border: 0; border-radius: 999px;
  background: var(--gold-verlauf); color: #1b1404; font: inherit; font-size: 20px; font-weight: 800; letter-spacing: 0.02em; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(232, 196, 106, 0.18), 0 10px 26px rgba(201, 162, 74, 0.45); transition: transform 0.15s, box-shadow 0.2s;
}
.goldknopf::before { content: "✦ "; }
.goldknopf:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(232, 196, 106, 0.25), 0 14px 32px rgba(201, 162, 74, 0.55); }
.goldknopf:disabled { opacity: 0.6; cursor: wait; }
.goldknopf.breit { width: 100%; max-width: 420px; }
.randknopf { display: block; width: 100%; max-width: 420px; margin: 0 auto; padding: 15px; border-radius: 999px; background: none; border: 2px solid var(--gold); color: var(--gold); font: inherit; font-weight: 800; cursor: pointer; }
.link { background: none; border: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; padding: 6px; }
.fehler { color: #ffb4a8; font-weight: 700; text-align: center; }

.versprechen { list-style: none; padding: 0; margin: 34px auto 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; color: var(--leise); }
.versprechen b { color: var(--gold); }

.bereich { margin-top: 56px; }
.bereich > h2, .bereich > .leise { text-align: center; }
.bereich > .leise { margin: 0 0 20px; }

/* Kacheln „Michaels Tipps“ */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto 18px; }
.kacheln button {
  display: grid; justify-items: center; gap: 6px; padding: 18px 10px; border-radius: var(--r); border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: transform 0.15s, border-color 0.2s, background 0.2s;
}
.kacheln button i { font-style: normal; font-size: 34px; }
.kacheln button:hover, .kacheln button.an { transform: translateY(-3px); border-color: var(--gold); background: rgba(232, 196, 106, 0.12); }

/* ---------- Karten ---------- */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.karten.klein { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.karten.gross { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.karte {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r);
  background: var(--karte); color: var(--karte-text); box-shadow: var(--schatten); animation: rein 0.45s both;
}
.karte .bild { aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; overflow: hidden; }
.karte .bild img { width: 100%; height: 100%; object-fit: contain; }
.karte .platzhalter { font-size: 56px; }
.karten.klein .bild { aspect-ratio: 16 / 10; }
.anzeige { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; letter-spacing: 0.04em; }
.inhalt { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.karte h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.zeile { color: var(--karte-leise); font-size: 14px; }
.preis { color: var(--karte-text); font-size: 17px; margin-right: 6px; }
.warum { margin: 12px 0 0; font-weight: 700; color: #9a7420; }
.warum::before { content: "✦ "; color: var(--gold-tief); }
.kartentext { margin: 12px 0 0; padding: 12px 14px; background: var(--kartentext); border-radius: 10px; font-family: var(--schrift); font-size: 19px; line-height: 1.35; color: #4a3b12; transform: rotate(-0.6deg); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.25); }
.kartentext::before { content: "✉ "; font-family: -apple-system, sans-serif; font-size: 14px; color: var(--gold-tief); }
.knoepfe { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 16px; }
.zumshop { flex: 1; text-align: center; padding: 11px 12px; border-radius: 12px; background: var(--grund); color: var(--gold); text-decoration: none; font-weight: 800; }
.zumshop:hover { filter: brightness(1.2); }
.daumen { width: 46px; height: 44px; border-radius: 12px; border: 1px solid #e3dccb; background: #fff; font-size: 19px; cursor: pointer; transition: transform 0.15s; }
.daumen:hover { transform: scale(1.08); }
.daumen.an[data-wert="gut"] { background: #e2f5e6; border-color: #3a9a55; }
.daumen.an[data-wert="schlecht"] { background: #fbe4e1; border-color: #c0392b; }
.karte.schlecht { opacity: 0.55; }
.karten.klein .warum, .karten.klein .kartentext { display: none; }

/* ---------- Laden & Ergebnis ---------- */
.laden { text-align: center; padding: 70px 0; }
.funkeln { font-size: 76px; display: inline-block; animation: schweben 1.4s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(232, 196, 106, 0.7)); }
@keyframes schweben { 50% { transform: translateY(-14px) rotate(6deg); } }

.zusammenfassung { margin-top: 24px; padding: 14px 18px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); }
.zusammenfassung p { margin: 0; }
.pillen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pillen span { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--linie); color: var(--gold); font-size: 14px; }
.aktionen { display: grid; gap: 12px; margin-top: 30px; justify-items: center; }
.kosten { text-align: center; color: var(--leise); font-size: 12px; }

dialog { border: 1px solid var(--linie); border-radius: var(--r); background: var(--grund); color: var(--text); padding: 26px; max-width: min(92vw, 420px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog input { width: 100%; padding: 12px 14px; margin: 6px 0 14px; border-radius: 12px; border: 2px solid var(--gold); background: #fffdf6; font: inherit; color: #1d1a14; }

.fuss { position: relative; z-index: 1; text-align: center; color: var(--leise); font-size: 13px; padding: 20px 16px 30px; border-top: 1px solid var(--linie); max-width: 1040px; margin: 30px auto 0; }
.fuss p { margin: 4px 0; }

@keyframes rein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 560px) {
  .mond { width: 34px; height: 34px; top: 76px; right: 18px; }
  html.thema-weihnacht .kerzen { position: static; justify-content: center; margin: 22px 0 -6px; }
  .goldknopf { width: 100%; }
}
