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

:root {
  --bg: #0a0a0a;
  --surface: #131316;
  --surface-hover: #1a1a1f;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --error: #ef4444;
  --radius: 10px;
}

html {
  background: var(--bg);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Subtiler Glow oben */
.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

/* Header */
header {
  margin-bottom: 48px;
}

.brand {
  display: inline-block;
  margin-bottom: 36px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.brand:hover {
  opacity: 0.7;
}

.brand-logo {
  display: block;
  height: 210px;
  width: auto;
  /* Logo ist schwarz auf weiß — auf Dark-Bg invertieren */
  filter: invert(1);
}

@media (max-width: 480px) {
  .brand-logo { height: 165px; }
}

.brand-success {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 0;
}

.page-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.page-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.page-footer a:hover {
  color: var(--text);
}

h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.subtitle {
  color: var(--muted);
  font-size: 16px;
  max-width: 440px;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.005em;
}

.optional {
  font-weight: 400;
  color: var(--muted-2);
}

input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

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

input:hover, select:hover, textarea:hover {
  border-color: var(--border-strong);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--text);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

input:invalid:not(:placeholder-shown),
select:invalid {
  /* nichts — wir validieren manuell, kein rotes Geschrei während des Tippens */
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* Custom Select-Pfeil */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Date-Input dunkel */
input[type="date"] {
  color-scheme: dark;
  cursor: pointer;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Submit-Button */
button {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.15s ease, transform 0.05s ease;
}

button:hover { opacity: 0.9; }
button:active { transform: scale(0.99); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-loading { display: none; }
button.loading .btn-text { display: none; }
button.loading .btn-loading { display: inline; }

.footer-text {
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 4px;
}

.error-msg {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
}

.error-msg.visible {
  display: block;
}

/* Success-Page */
.success-card {
  text-align: center;
  padding: 80px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: 28px;
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-card h1 {
  margin-bottom: 12px;
}

.back-link {
  display: inline-block;
  margin-top: 32px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  padding: 0 0 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.back-link:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* Star-Rating */
.rating-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.rating-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 2px;
}

.star-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-rating label {
  font-size: 26px;
  line-height: 1;
  color: #3f3f46;
  cursor: pointer;
  transition: color 0.12s ease, transform 0.05s ease;
  padding: 0 1px;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: #fbbf24;
}

.star-rating label:active {
  transform: scale(0.92);
}

/* Checkbox */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  transition: border-color 0.15s ease;
}

.checkbox-field:hover {
  border-color: var(--border-strong);
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 480px) {
  .container { padding: 56px 20px 40px; }
  .row { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
  .subtitle { font-size: 15px; }

  .rating-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .star-rating label {
    font-size: 30px;
  }
}
