/* Hauptcontainer */
#gluecksrad-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center; /* zentriert das Rad horizontal */
  justify-content: flex-start;
  inline-size: var(--rad-size, 300px); /* = Breite */
  min-block-size: calc(var(--rad-size, 300px) + 120px); /* Höhe: Rad + Platz für Buttons/Text */
  margin: 0 auto; /* zentriert den Container im Layout */
  text-align: center;
}


/* Pfeil dynamisch, vom Mittelpunkt aus an die linke Radkante geschoben */
/* Äußeren Pfeil in Variablen definieren */
/* Außenpfeil */
#pfeil{
  /* Größe des äußeren Pfeils */
  --outerH: 16px;          /* halbe Höhe (border-top/bottom) */
  --outerW: 24px;          /* Tiefe (border-left) */

  /* Innenpfeil: Verhältnis + Feinausrichtung */
  --innerScale: .7;       /* 0.72–0.75 sieht am saubersten aus */
  --innerDX: -4.25px;         /* horizontale Korrektur (optische Mitte) */
  --innerDY: .1px;         /* vertikale Korrektur (gegen Subpixel-Rundung) */

  position:absolute;
  width:0; height:0;
  left: var(--pfeil-left, 50px);
  top:  var(--pfeil-top, 132.25px);
  transform-origin:right center;
  z-index:20;

  border-top:    var(--outerH) solid transparent;
  border-bottom: var(--outerH) solid transparent;
  border-left:   var(--outerW) solid var(--pfeil-outer-color, #820b09);; /* Außenfarbe */
}

/* Innenpfeil */
#pfeil::after{
  content:"";
  position:absolute;
  width:0; height:0;

  /* Innengrößen aus Außenwerten ableiten */
  --innerH: calc(var(--outerH) * var(--innerScale));
  --innerW: calc(var(--outerW) * var(--innerScale));

  border-top:    var(--innerH) solid transparent;
  border-bottom: var(--innerH) solid transparent;
  border-left:   var(--innerW) solid var(--pfeil-inner-color, #f03835); /* Innenfarbe */

  /* Mittig in den äußeren Pfeil positionieren + Feinkorrektur */
  top:  calc(-1 * var(--innerH) + var(--innerDY));
  left: calc(-1 * var(--innerW) + var(--innerDX));
  z-index:30;
}


#gluecksrad {
  	animation: none;
    position: relative;
    width: var(--rad-size, 300px);
    height: var(--rad-size, 300px);
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #333;
    background: radial-gradient(circle at center, #ffcc80, #fb8c00, #e65100); /* Sanfter Verlauf von hell nach dunkel */

     /* Glow-Effekt */
    box-shadow:
      0 0 10px 3px var(--rad-glow-color, rgba(255, 140, 0, 0.6)),
      inset 0 0 6px var(--rad-glow-inset-color, rgba(255, 255, 255, 0.3));
    /*background: none;*/
    transform-origin: center;
  	transition: transform 5s cubic-bezier(0.1, 0.4, 0.4, 1);
  	/*transition: transform 3s ease-out;*/
    z-index: 10;
  	transform: rotate(270deg);
  	margin-left: auto;
  	margin-right: auto;
  	display: block;
  	margin: 0 auto;
}

/* Pop-up Overlay */
#popup-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: -env(safe-area-inset-top);
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.6);

  /* Neu: echtes Zentrieren */
  align-items: center;
  justify-content: center;
}

/* Pop-up Container */
#popup-content {
  position: relative;         /* vorher: absolute */
  transform: none;            /* vorher: translate(-50%, -50%) */
  left: auto;                 /* reset */
  top: auto;                  /* reset */

  /* Lass die Breite automatisch vom Inhalt kommen (gluecksrad-container) */
  inline-size: auto;          /* vorher: max(var(--rad-size, 300px), 300px) */
  block-size: auto;

  padding: 20px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  box-sizing: border-box;     /* Padding in Gesamtbreite einrechnen */
}


/* Schließen-Button */
#close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
}

#ergebnis {
    font-size: 16px; /* Schriftgröße */
    font-weight: bold; /* Fettschrift */
    color: var(--result-text-color, #ffffff);
  	/*color: #000000; /* Schwarzer Text */
    text-align: center; /* Zentrierter Text */
    margin-top: 10px; /* Abstand nach oben */
    font-family: 'Arial', sans-serif; /* Schriftart */
    /*text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); /* Leichter Schatten für bessere Sichtbarkeit */
  	text-shadow: none !important;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

#rad-logo {
    position: absolute; /* Position relativ zum Rad */
    top: 50%; /* Vertikal zentriert im Rad */
    left: 50%; /* Horizontal zentriert im Rad */
    width: 50px;
    height: 50px;
    transform: translate(-50%, -50%) rotate(90deg); /* Genau zentrieren */
    border-radius: 50%;
    z-index: 5; /* Sicherstellen, dass es vor dem Rad ist */
}

/* Styling für den Drehen-Button */
#drehen-button {
    /*background: linear-gradient(45deg, #9cb816, #eb7000); /* Neuer Farbverlauf von Grün zu Orange */
    color: var(--btn-text-color, #ffffff);
    font-size: 22px;
    font-weight: bold;
    padding: 5px 10px;
    border: none;
    border-radius: 10px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3); /* Schatten für Tiefe */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  	margin-top: 20px; /* Abstand nach oben, um den Button nach unten zu verschieben */
  	/* Stelle sicher, dass der Text in einer Zeile bleibt */
    white-space: nowrap; /* Kein Umbruch */
    text-align: center; /* Text zentrieren */
    overflow: hidden; /* Überlauf verhindern */
  	width: auto; /* Automatische Breite basierend auf dem Text */
  	margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Hover-Effekt für den Button */
#drehen-button:hover {
    transform: scale(1.1); /* Vergrößerung beim Hover */
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.5); /* Tieferer Schatten beim Hover */
  	/*background: linear-gradient(45deg, #9cb816, #eb7000); /* Umgekehrter Farbverlauf beim Hover */
}


/* Text im Rad zentriert in jedem Sektor */
.gluecksrad-text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    
    font-weight: bold;
    pointer-events: none;
}

.gluecksrad-text span {
  	color: var(--label-color, #ffffff);
  	font-size: var(--label-size, 12px);
    position: absolute;
    transform-origin: center; /* falls JS mal früher lädt */
    white-space: nowrap;
}

.gluecksrad-text { position: absolute; inset: 0; }
.gluecksrad-text .preis-wrap { position: absolute; }
.gluecksrad-text .preis {
  color: var(--label-color, #fff);
  font-size: var(--label-size, 12px);
  white-space: nowrap;
}


/*@keyframes wobble {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(10deg); }
}

.wobble {
    animation: wobble 0.1s ease-in-out;
}
*/

@keyframes pulse {
    0%, 100% {
        transform: scale(1); /* Standardgröße */
    }
    50% {
        transform: scale(1.1); /* Leicht vergrößert */
    }
}

.pulse {
    animation: pulse 0.6s ease-in-out infinite; /* Dauer 0.6s, unendlich */
}

.punkt {
    width: 15px;
    height: 15px;
  	background-color:#333;
    border-radius: 50%;
    z-index: 20;
}

/* --- EINHEITLICHE AKTIONS-BUTTONS --- */
/* ===== Ergebnis + Button-Leiste ===== */

/* ===== Ergebnis + Button-Leiste ===== */
.gift-actions{
  display:none;              /* wird per JS -> flex */
  gap:10px;
  margin:10px auto 0;
  max-width:420px;
  justify-content:center;
  align-items:stretch;       /* gleiche Höhe erzwingen */
}

.action-btn{
  flex:1 1 0;                /* gleiche Breite */
  min-width:140px;           /* verhindert Umbruch */
  height:48px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:16px;            /* identische Schriftgröße */
  font-weight:800;
  line-height:1;             /* kein „doppelter“ Zeilenabstand */
  color: var(--btn-text-color, #ffffff);
  background:linear-gradient(45deg, var(--btnStart,#E7B10A), var(--btnEnd,#C73E1D));
  border:0;
  border-radius:12px;
  box-shadow:0 4px 14px rgba(0,0,0,.2);
  white-space:nowrap;        /* Text nicht umbrechen */
}


.action-btn:active{ transform:translateY(1px); }
@media (max-width:360px){
  .action-btn{ height:44px; font-size:15px; min-width:128px; }
}

/* ===== Modal ===== */
.modal{ position:fixed; inset:0; display:none; z-index:9999; }
.modal.show{ display:block; }
.modal-backdrop{
  position:absolute; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(2px);
}
.modal-card{
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:min(92vw,420px);
  background:#fff; border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.35);
  padding:24px 16px 18px;        /* mehr oben -> nix klemmt am X */
  color:#111; font-size:16px;    /* Basis-Textgröße fixen */
  line-height:1.35;              /* saubere Zeilenhöhe */
}
.modal-close{
  position:absolute; right:8px; top:6px; width:32px; height:32px;
  border:0; background:transparent; font-size:26px; line-height:1; color:#444; cursor:pointer;
}
.modal-hero{
  margin:0 6px 6px;
  font-size:20px; font-weight:800; text-align:center;
  color:#111; word-break:normal;
}
.sub{
  margin:0 8px 12px;
  text-align:center;
  color:#444;
  font-size:15px;
}

#giftForm label{
  display:block;
  font-size:14px;                /* explizit, damit Theme nicht auf 24–32px hochzieht */
  font-weight:700;
  margin:8px 2px 6px;
  color:#111;
}
#giftEmail{
  width:100%; height:46px; padding:0 12px;
  border-radius:12px; border:1px solid #ddd;
  background:#fff; color:#111; font-size:16px; line-height:46px; /* verhindert „zweite Zeile“ */
  outline:none;
}
#giftEmail:focus{ border-color:#C73E1D; box-shadow:0 0 0 4px rgba(199,62,29,.15); }

.consent{
  display:flex; gap:10px; align-items:flex-start;
  margin:10px 2px 12px; color:#111; font-size:14px; line-height:1.35;
}
.consent input{ margin-top:2px; width:18px; height:18px; }
.consent a{ color:#C73E1D; text-decoration:underline; }


#giftSubmit{
  width:100%; height:46px; border:0; border-radius:12px;
  background:#111; color: var(--btn-text-color, #ffffff); font-weight:800; font-size:16px;
}

.err{ color:#b00020; font-size:14px; margin:4px 2px 8px; min-height:18px; }
.ok{  color:#0a7a28; font-weight:700; text-align:center; margin-top:8px; }

/* Honeypot wirklich unsichtbar */
#giftForm .hp{
  position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important;
  opacity:0 !important; pointer-events:none !important;
}

/* Gift-Message im Glücksrad-Popup */
.gift-message {
  display: none;              /* 👈 Standard: unsichtbar */
  max-width: 320px;
  width: 100%;
  box-sizing: border-box;

  margin-top: 12px;
  margin-left: auto;
  margin-right: auto;

  text-align: center;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffecec;
  color: #c62828;
  border: 1px solid #ffb3b3;

  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  text-decoration: none;
  line-height: 1.4;           /* 👈 sorgt für saubere Zeilen */
}
.gift-submit-actions{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#giftWhatsappSubmit{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

#giftErr {
  margin-top: 8px;
  font-size: 13px;
  color: #b45309;
  opacity: 0;
  min-height: 18px;
  transition: opacity 0.2s ease;
}


.win-msg{
  margin: 10px auto 6px;
  padding: 8px 12px;              /* oben/unten kleiner */
  background: var(--win-bg-color, #111111);
  border: 1px solid var(--win-border-color, rgba(255,255,255,.25));
  border-radius: 12px;
  max-width: 340px;
  color: var(--result-text-color, #ffffff);
  text-align: center;
  line-height: 1.25;              /* kompakter */
}

.howto{
  margin-top: 0;                  /* kein Extra-Abstand */
  font-size: 14px;
  opacity: .95;
  line-height: 1.25;
}

.claim-headline {
  display: block;                 /* statt inline-block */
  font-weight: 800 !important;
  font-size: 1.15em;
  line-height: 1.05;
  margin: 0 0 2px 0;              /* kein Platz oben */
  padding: 0;
}

.prize-highlight {
  font-weight: 900;
  font-size: 1.55em;              /* größer */
  line-height: 1.05;
  display: inline;
}