:root {
  --primary-color: #00703c; /* Hochwertiges SVP-Grün */
  --primary-hover: #005a30;
  --secondary-color: #ffb800; /* Warmes Sonnengelb */
  --accent-color: #d52b1e; /* Schweizer Rot */
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --bg-body: #f3f4f6;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-color: #e5e7eb;
  --error-color: #ef4444;
  --success-color: #10b981;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 20px 0;
}

/* Dynamische Hintergrundelemente */
.background-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.circle-1 {
  background-color: var(--primary-color);
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
}

.circle-2 {
  background-color: var(--secondary-color);
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
}

.container {
  width: 100%;
  max-width: 650px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-container {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.logo-container:hover {
  transform: scale(1.05);
}

.logo-svg {
  height: 90px;
  width: auto;
}

.header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: -6px;
}

/* Main Card */
.main-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-xl);
  transition: all 0.3s ease;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 8px;
  display: inline-block;
}

.intro-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
  font-weight: 300;
}

/* Formularelemente */
.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.col-6 {
  width: 50%;
}

.col-4 {
  width: 33.33%;
}

.col-8 {
  width: 66.66%;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-family);
  background-color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 112, 60, 0.15);
  background-color: #fff;
}

/* Radio Buttons und Checkboxen stylen */
.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 4px;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

.radio-label input, .checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-radio {
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.radio-label input:checked ~ .custom-radio {
  border-color: var(--primary-color);
  background-color: #fff;
}

.custom-radio::after {
  content: "";
  position: absolute;
  display: none;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
}

.radio-label input:checked ~ .custom-radio::after {
  display: block;
}

.custom-checkbox {
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-label input:checked ~ .custom-checkbox {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
}

.custom-checkbox::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input:checked ~ .custom-checkbox::after {
  display: block;
}

.checkbox-group {
  flex-direction: row;
  align-items: flex-start;
  margin-top: 10px;
}

.checkbox-group span a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
}

.checkbox-group span a:hover {
  color: var(--primary-hover);
}

/* Validierungsfehler */
.error-message {
  font-size: 0.8rem;
  color: var(--error-color);
  margin-top: 4px;
  height: 18px;
  display: block;
}

input.invalid {
  border-color: var(--error-color);
}

input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Button */
button[type="submit"] {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  box-shadow: 0 4px 6px -1px rgba(0, 112, 60, 0.2);
}

button[type="submit"]:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -1px rgba(0, 112, 60, 0.3);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  background-color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Spinner */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* Erfolgsmeldung */
#success-container {
  text-align: center;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--success-color);
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px var(--success-color);
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.success-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--success-color);
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}
@keyframes scale {
  0%, 100% { transform: none; }
  50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
  100% { box-shadow: inset 0px 0px 0px 40px rgba(16, 185, 129, 0.1); }
}

#success-container h2 {
  color: var(--success-color);
  font-size: 1.8rem;
}

#success-container p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 400px;
}

.success-info {
  font-size: 0.9rem !important;
  color: var(--text-muted);
  background: #f0fdf4;
  padding: 10px 15px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

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

/* Allgemeine Fehlermeldung */
.error-alert {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error-color);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-top: 15px;
  text-align: center;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-xl);
  animation: modalOpen 0.3s ease;
}

@keyframes modalOpen {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

.modal-header h2 {
  font-size: 1.3rem;
  color: var(--primary-color);
}

.close-modal {
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-muted);
}

.close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.modal-body h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 1.1rem;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.modal-footer {
  padding: 15px 24px;
  border-top: 1px solid var(--border-color);
  text-align: right;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

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

/* Footer */
.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

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

/* Helferklassen */
.hidden {
  display: none !important;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
  .main-card {
    padding: 24px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .col-6, .col-4, .col-8 {
    width: 100%;
  }
}
