:root {
    /* Light Mode */
    --primary: #3b82f6;
    --primary-light: #dbeafe;
    --primary-dark: #1e40af;
    --text: #111827;
    --text-light: #555;
    --background: #f0f2f5;
    --card-bg: #ffffff;
    --group-bg: #f7f9fc;
    --border: #dbe2ea;
    --input-bg: #f9fafb;
    --input-border: #e2e8f0;
    --ergebnis-bg: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    --ergebnis-border: #bfdbfe;
  }
  
  [data-theme="dark"] {
    /* Dark Mode */
    --primary: #60a5fa;
    --primary-dark: #93c5fd;
    --text: #f3f4f6;
    --text-light: #d1d5db;
    --background: #111827;
    --card-bg: #1f2937;
    --group-bg: #1a2036;
    --border: #374151;
    --input-bg: #1f2937;
    --input-border: #4b5563;
    --ergebnis-bg: linear-gradient(135deg, #172554, #1e3a8a);
    --ergebnis-border: #3b82f6;
  }
  
  /* Basis-Styles */
  body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /*justify-content: center;*/
    justify-content: flex-start; /* Oben ausrichten statt zentrieren */
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 0.5rem;  /* Oberen Padding reduzieren */
    min-height: 100vh;    /* Sicherstellen dass Body volle Höhe einnimmt */
  }
  
  .container {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 28rem;
    margin: 2rem auto;
    margin-top: 0.5rem;   /* Oberen Margin reduzieren */
    margin-bottom: 1rem;  /* Unteren Margin beibehalten */
  }
  
  /* Control Buttons */
  .theme-toggle, .fullscreen-btn {
    position: fixed;
    top: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }
  
  .theme-toggle {
    right: 1rem;
  }
  
  .fullscreen-btn {
    left: 1rem;
  }
  
  .theme-icon, .fullscreen-icon {
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--text);
  }
  
  .theme-icon .sun {
    display: block;
  }
  .theme-icon .moon {
    display: none;
  }
  
  [data-theme="dark"] .theme-icon .sun {
    display: none;
  }
  [data-theme="dark"] .theme-icon .moon {
    display: block;
    fill: #fbbf24;
  }
  
  /* Form Elements */
  .group {
    background-color: var(--group-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  label {
    display: block;
    margin-top: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
  }
  
  input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text);
    margin-top: 0.25rem;
    box-sizing: border-box;
  }
  
  /* Ergebnis Box */
  .ergebnis-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--ergebnis-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--ergebnis-border);
    text-align: center;
  }
  
  .ergebnis-wert {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.15);
  }
  
  /* Responsive Anpassungen */
  @media (max-width: 480px) {
    .container {
      padding: 1rem;
      margin: 1rem;
    }
    
    .theme-toggle, .fullscreen-btn {
      width: 2.2rem;
      height: 2.2rem;
    }
  }