/* ============================================================
   Musiktaxi – Stylesheet
   Ästhetik: Nacht-Taxi. Warm. Analog. Handgemacht.
   Farben: Cremeweiß · Tiefes Schwarz · Taxi-Gelb
   Fonts: Playfair Display (Display) + DM Mono (UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --cream:   #f5f0e8;
  --cream2:  #ede7d9;
  --black:   #111009;
  --ink:     #1e1b12;
  --yellow:  #f5c800;
  --yellow2: #e6b800;
  --amber:   #c97c00;
  --muted:   #7a7060;
  --border:  #d4cbb8;
  --red:     #c0392b;
  --green:   #2e7d32;

  --radius:  10px;
  --shadow:  0 4px 24px rgba(17,16,9,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  min-height: 100vh;
  /* Subtile Körnung – analoges Feeling */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------
   Typografie
   ---------------------------------------------------------- */
h1, h2, h3 { font-family: 'Playfair Display', serif; }

h1 { font-size: 2.8rem; font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }

/* ----------------------------------------------------------
   Layout-Wrapper
   ---------------------------------------------------------- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.site-header {
  border-bottom: 2px solid var(--black);
  padding: 20px 0;
  margin-bottom: 48px;
}

.site-header .inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.logo-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--black);
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  background: transparent;
  color: var(--ink);
}

.btn:hover {
  background: var(--black);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow2);
  color: var(--black);
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--yellow);
}

.btn-danger {
  border-color: var(--red);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.72rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ----------------------------------------------------------
   Formular-Elemente
   ---------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

input[type="text"],
input[type="password"],
textarea,
select {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  transition: border-color 0.15s;
  width: 100%;
}

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

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--black);
  border-radius: 50%;
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* ----------------------------------------------------------
   Karten
   ---------------------------------------------------------- */
.card {
  background: white;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--black);
  overflow: hidden;
}

.card-body { padding: 24px; }

/* ----------------------------------------------------------
   Modal
   ---------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,16,9,0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--cream);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--black);
  width: 100%;
  max-width: 440px;
  transform: translateY(12px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 2px solid var(--border);
}

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  padding: 0;
}

/* ----------------------------------------------------------
   Lautstärkeregler
   ---------------------------------------------------------- */
.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.volume-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.volume-val {
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 32px;
  text-align: right;
}

/* ----------------------------------------------------------
   Toast-Nachrichten
   ---------------------------------------------------------- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--black);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s;
  max-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error { background: var(--red); }

/* ----------------------------------------------------------
   Utility
   ---------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
}

.badge-live   { color: var(--green); }
.badge-locked { color: var(--amber); }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
}

/* Fade-in Animation für Seiteninhalt */
.fade-in {
  animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Staggered Kinder */
.stagger > * {
  opacity: 0;
  animation: fadeIn 0.3s ease both;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.40s; }

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .container { padding: 0 16px; }
}
