/* Karaoke Night - Gäste-Seite & Display.
   Logo/Event-Texte kommen aus den Settings (js/branding.js), nicht aus dem CSS. */

:root {
  --black: #0a0a0a;
  --black-2: #161616;
  --black-3: #202020;
  --gold: #ffc933;
  --pink: #ff3d7f;
  --turquoise: #21e6c1;
  --grey: #a6a6a6;
  --white: #ffffff;
  --border: #2c2c2c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--black);
  color: var(--white);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ---------- Marken-Header ---------- */

.brand-header {
  text-align: center;
  padding: 36px 16px 28px;
}

.brand-logo {
  width: 220px;
  max-height: 160px;
  object-fit: contain;
  max-width: 65vw;
  height: auto;
  margin: 0 auto 18px;
  display: block;
}

.eyebrow {
  color: var(--grey);
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.event-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: 2em;
  color: var(--gold);
  margin: 4px 0 2px;
}

.event-title em {
  color: var(--white);
  font-style: italic;
}

.event-location {
  color: var(--grey);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}

.tagline {
  color: var(--white);
  font-size: 1.05em;
  opacity: 0.9;
}

.eq-bars {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

.eq-bars span {
  width: 4px;
  border-radius: 2px;
  display: block;
}

.eq-bars span:nth-child(1) { height: 55%; background: var(--gold); }
.eq-bars span:nth-child(2) { height: 100%; background: var(--pink); }
.eq-bars span:nth-child(3) { height: 75%; background: var(--turquoise); }

/* ---------- Layout ---------- */

main {
  background: var(--black-2);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 14px;
}

section {
  margin-bottom: 26px;
}

section:last-child {
  margin-bottom: 0;
}

h2 {
  color: var(--white);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  font-size: 1.15em;
}

/* Search */
.search-input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  background: var(--black-3);
  color: var(--white);
  transition: border-color 0.2s;
}

.search-input::placeholder { color: var(--grey); }

.search-input:focus {
  outline: none;
  border-color: var(--gold);
}

.search-results {
  margin-top: 15px;
  max-height: 400px;
  overflow-y: auto;
}

.song-item {
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--black-3);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.song-item:hover {
  border-color: var(--gold);
}

.song-item h4 {
  margin: 0 0 5px 0;
  color: var(--white);
}

.song-item p {
  margin: 0;
  color: var(--grey);
  font-size: 0.9em;
}

/* Forms */
.form-section {
  background: var(--black-3);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 10px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: var(--grey);
  font-weight: 600;
  font-size: 0.92em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  background: var(--black-2);
  color: var(--white);
  transition: border-color 0.2s;
}

textarea { resize: vertical; }

input::placeholder, textarea::placeholder { color: var(--grey); }

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
}

/* Buttons */
.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: filter 0.2s, transform 0.05s;
  font-weight: 700;
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
  width: 100%;
  margin-top: 15px;
}

.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--grey);
  color: var(--white);
  padding: 10px 15px;
  margin-right: 10px;
}

.btn-secondary:hover { border-color: var(--white); }

/* Cards */
.song-card,
.success-card {
  background: var(--black-3);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--gold);
}

.success-card {
  border-left-color: var(--turquoise);
  text-align: center;
}

.success-card h2 {
  color: var(--white);
  border-bottom: none;
  padding-bottom: 0;
}

.success-card p {
  color: var(--grey);
  margin: 10px 0;
}

/* Messages */
.error {
  color: var(--pink);
  margin-top: 10px;
  text-align: center;
}

.success {
  color: var(--turquoise);
  margin-top: 10px;
  text-align: center;
}

input.field-invalid,
textarea.field-invalid {
  border-color: var(--pink);
}

.field-error-text {
  color: var(--pink);
  font-size: 0.85em;
  margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
  .event-title { font-size: 1.6em; }
  .container { padding: 0 12px 30px; }
}

.announcement {
  background: var(--black-3);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  color: var(--white);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
}

.ct-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 0.75em;
  color: var(--grey);
}

.ct-footer a {
  color: inherit;
  text-decoration: none;
}

.ct-footer a:hover {
  text-decoration: underline;
}

/* ---------- Startauswahl (Anmelden / Voten) ---------- */

.home-choice {
  text-align: center;
}

.home-choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-choice-buttons .btn-secondary {
  width: 100%;
  margin-right: 0;
}

.home-choice-hint {
  color: var(--grey);
  font-size: 0.78em;
  margin-top: 12px;
}

.back-link {
  display: inline-block;
  background: none;
  border: none;
  color: var(--grey);
  font-size: 0.9em;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
}

.back-link:hover {
  color: var(--white);
}

/* ---------- Song bereits angemeldet ---------- */

.song-item.taken {
  opacity: 0.55;
}

.taken-message {
  color: var(--pink);
  background: var(--black-3);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pink);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 0.9em;
}

/* ---------- Voting ---------- */

.votes-hint {
  color: var(--grey);
  font-size: 0.8em;
  margin-bottom: 14px;
}

.voting-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--black-3);
  border-radius: 8px;
}

.vote-item-info {
  min-width: 0;
}

.vote-title {
  color: var(--white);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vote-artist {
  color: var(--grey);
  font-size: 0.85em;
  font-style: italic;
}

.vote-locked-hint {
  color: var(--grey);
  font-size: 0.8em;
  font-weight: 400;
}

/* Bereits gesungener Song mit eigener Stimme - dezent (reduzierte Deckkraft,
   gestrichelter statt durchgezogener Rand), keine Buttons mehr, nur die
   Info "Du hast X Stimmen vergeben". */
.vote-item-played {
  opacity: 0.65;
  border-style: dashed;
}
.vote-played-note {
  color: var(--grey);
  font-size: 0.78em;
  white-space: nowrap;
}

.vote-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vote-count {
  min-width: 1.4em;
  text-align: center;
  font-weight: 700;
  color: var(--gold);
}

.btn-vote {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  border-radius: 8px;
  padding: 0;
  font-weight: 700;
  font-size: 1.1em;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-vote:hover:not(:disabled) {
  background: var(--gold);
  color: var(--black);
}

.btn-vote:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Leerer Platzhalter mit gleichen Massen wie .btn-vote - hält den Button
   immer an derselben Position rechts, auch wenn gerade weder Hoch- noch
   Runter-Voten möglich ist (sonst springt die Stimmenzahl links davon hin
   und her, je nachdem ob ein Button da ist oder nicht). */
.btn-vote-slot {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
}

.empty-state {
  color: var(--grey);
  text-align: center;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* Logo kommt per js/branding.js aus den Settings - bis dahin unsichtbar
   statt kurz ein kaputtes Bild-Symbol zu zeigen. */
img[data-brand-logo]:not(.brand-ready) { visibility: hidden; }
