:root{
  --bg: #121212;        
  --bg-2: #0d0d0d;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #003DD9;
  --primary-contrast: #ffffff;
  --primary-hover: #2352ff;
  --success: #059669;
  --success-contrast: #ffffff;
  --success-hover: #0aa779;
  --danger: #dc2626;
  --danger-contrast: #ffffff;
  --danger-hover: #ef4444;
  --ghost: #d3d3d3; 
  --ghost-hover: #b8b9bb;

  /* Header */
  --header-height: 150px;
  --header-bg-image: url('img/header_raffle.jpg');
  /* --header-overlay: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.55) 100%); */
  
  /* Höhe der Button-Leiste */
  --actions-height: 40px;
}

*{box-sizing:border-box}
html, body{height:100%}
body{
  margin:0;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Apple Color Emoji','Segoe UI Emoji';
  display: flex;
  flex-direction: column;
}

.container{max-width: 1100px; margin: 0 auto; padding: 10px 16px;}

/* Header */
.header{position:fixed; inset:0 0 auto 0; height: var(--header-height); z-index: 20;}
.header__bg{position:absolute; inset:0; background-image: var(--header-bg-image); background-size: cover; background-position: center; filter: brightness(0.95);}
.header__bg::after{content:""; position:absolute; inset:0; background: var(--header-overlay);}
.header__content{position:relative; height:100%; display:flex; align-items:center; justify-content:space-between; color:#fff;}
.header__title{margin:0; font-size:28px; font-weight:800; text-shadow: 0 1px 0 rgba(0,0,0,0.3);}
.header__subtitle{margin:2px 0 0; color:rgba(255,255,255,0.85); font-size:14px;}

/* Centered actions bar below fixed header */
/* Actions-Leiste fix unter dem Header anheften */
.actions{
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 19; /* Header hat 20 */
  background: rgba(18,18,18,0.95);
  backdrop-filter: saturate(120%) blur(6px); /* optionaler Glass-Effekt */
  border-bottom: 1px solid rgba(255,255,255,0.06);
  /* alte margins NICHT mehr nötig */
}

/* Weil dein .actions-Element zugleich .container hat, Container-Begrenzung aufheben */
.actions.container{
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* Inhalt der Leiste zentrieren und Höhe setzen */
.actions__wrap{
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: var(--actions-height);
  padding: 8px 16px;
}

.btn{
  background: var(--primary); color: var(--primary-contrast);
  padding:8px 14px; border: 0px solid transparent; border-radius:14px; cursor:pointer; /* geändert */
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn:hover{filter:brightness(0.98)}
.btn:active{transform:scale(0.98)}
.btn[disabled]{opacity:0.6; cursor:not-allowed}

.btn--primary{background: var(--primary); color: var(--primary-contrast);}
.btn--primary:hover{background: var(--primary-hover);}

.btn--success{background: var(--success); color: var(--success-contrast);}
.btn--success:hover{background: var(--success-hover);}

.btn--danger{background: var(--danger); color: var(--danger-contrast);}
.btn--danger:hover{background: var(--danger-hover);}

.btn--ghost{background: var(--ghost); color:#1c1c1c}
.btn--ghost:hover{background: var(--ghost-hover);}

/* Header button color assignments */
#btn-reset{ background: var(--danger); color: var(--danger-contrast); }
#btn-reset:hover{ background: var(--danger-hover); }
#btn-go{ background: var(--success); color: var(--success-contrast); }
#btn-go:hover{ background: var(--success-hover); }
#btn-edit, #btn-save{ background: var(--primary); color: var(--primary-contrast); }
#btn-edit:hover, #btn-save:hover{ background: var(--primary-hover); }

/* Main layout */
.main{ 
  padding: 16px 0 24px; 
  padding-top: calc(var(--header-height) + var(--actions-height) + 50px);
  padding-bottom: 24px;
  }
.section{display:none}
.section.active{display:block}
.card{
  background: #1c1c1c;            /* dunkles Grau */
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  color: #e6e6e6;                  /* helle Schrift auf dunkel */
  border: 1px solid rgba(255,255,255,0.06); /* dezente Kontur */
  min-width: 700px;
}
.card__title{margin:0 0 8px 0; font-size:24px; font-weight:800}
.card__subtitle{margin:0 0 16px 0; color: var(--muted)}

.prose p{line-height:1.5; margin: 10px 0}

.chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.chips .chip{display:inline-flex; align-items:center; border:0px solid #e5e7eb; background:#d3d3d3; padding:4px 5px; border-radius:5px; font-size:12px; color:#111827}

.textarea{
  width:100%; height:250px; resize:vertical;
  border:1px solid #cbd5e1; border-radius:12px; padding:12px;
  background:#fff; color:#111827; font-size:14px;
}
.muted{color: var(--muted); font-weight:600; font-size:13px}
.row-gap{display:flex; gap:10px; justify-content: flex-end;}

.spacer{height:8px}

.file input{display:none}
.file{display:inline-flex; align-items:center; gap:8px; border:1px solid #cbd5e1; padding:5px 10px; border-radius:10px; cursor:pointer; background:#003DD9}
.file:hover{background:#f8fafc; color:#003DD9}

.edit__row{display:flex; gap:10px; align-items:center; margin-bottom:10px; flex-wrap:wrap}
.edit__footer{display:flex; align-items:center; justify-content:space-between; margin-top:10px; gap:10px; flex-wrap:wrap}
.edit__actions{display:flex; gap:8px}

.saved-list{list-style: decimal; padding-left: 22px; display:grid; gap:6px; margin:10px 0 0}
.saved-list li{background:#2b2b2b; border:0px solid #e5e7eb; padding:5px 10px; border-radius:8px}

.raffle__wrap{display:flex; flex-direction:column; align-items:center; gap:25px}
.slot{
  position:relative; width:min(600px, 100%); height:110px;
  border-radius:16px; background:#003DD9; border:2px solid #e5e7eb; color:#fff;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; box-shadow: inset 0 1px 8px rgba(0,0,0,0.06);
}
.slot__text{font-weight:900; font-size:40px; letter-spacing:0.02em; user-select:none; color:#fff;}
.slot__shine{position:absolute; inset:0; background:linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.10) 50%, transparent 100%)}

.raffle__lists{display:grid; grid-template-columns:1fr; gap:18px; margin-top:16px}
@media (min-width: 900px){
  .raffle__lists{grid-template-columns:1fr 1fr}
}
.raffle__col{background: transparent; border-radius:12px}

#confetti-canvas{position:fixed; inset:0; pointer-events:none}
.footer{color:#94a3b8; margin-top: auto; padding: 12px 0 16px; font-size:12px;}

/* Back-to-top FAB (unten rechts, beweglich) */
.float-top-btn{
  position: fixed;
  right: 16px;
  bottom: 16px;                 /* Startposition */
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  background: var(--primary, #003DD9);
  color: var(--primary-contrast, #fff);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  cursor: grab;
  z-index: 1000;

  /* sanft ein-/ausblenden */
  opacity: 0;
  transform: translateY(8px) scale(.9);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.float-top-btn.show{
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.float-top-btn:hover{ box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.float-top-btn:active{ cursor: grabbing; transform: scale(.98); }
.float-top-btn:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }

/* optional: weniger Animation für Nutzer mit reduzierter Bewegung */
@media (prefers-reduced-motion: reduce){
  .float-top-btn{ transition: none; }
}

/* --- Edit/Save: Hover & Active => Weiß --- */
#btn-edit, #btn-save{
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

/* Hover + persistente Active-Zustände */
#btn-edit:hover,
#btn-edit:active,
#btn-edit.is-active,
#btn-edit[aria-current="true"],
#btn-edit[aria-current="page"],
#btn-edit[data-active="true"],
#btn-save:hover,
#btn-save:active,
#btn-save.is-active,
#btn-save[aria-current="true"],
#btn-save[aria-current="page"],
#btn-save[data-active="true"]{
  background: #ffffff !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

/* Tastaturfokus sichtbar */
#btn-edit:focus-visible,
#btn-save:focus-visible{
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
