/* ColorDev - Gemeinsame Styles */

/* Local Fonts: Inter (variable) */
@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}















:root {
  /* Colors */
  --primary: #6b7280;
  --primary-hover: #4b5563;
  --bg-main: #f1f5f9;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 16px;

  /* Neue Variablen für hardcoded colors */
  --bg-subtle: #f9fafb;           /* für lightness-control, etc. */
  --text-secondary: #374151;      /* contrast-label */
  --text-tertiary: #6b7280;       /* contrast-ratio */
  --border-light: #e5e7eb;        /* contrast-row border */
  --border-medium: #d1d5db;       /* color-picker-btn, range track */

  /* Success colors */
  --success-bg: #dcfce7;
  --success-text: #166534;
  --success-border: #bbf7d0;

  /* Error colors */
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --error-border: #fecaca;
  --error-hover: #b91c1c;

  /* Button remove/delete */
  --remove-bg: rgba(255, 255, 255, 0.9);
  --remove-text: #6b7280;
  --remove-border: #e5e7eb;

  /* Typography Scale */
  --font-xs: 0.75rem;    /* Small labels, hints */
  --font-sm: 0.875rem;   /* Form inputs, body text */
  --font-base: 1rem;     /* Card titles, normal text */
  --font-lg: 1.125rem;   /* Emphasis, important info */
  --font-xl: 1.25rem;    /* Section headers */

  /* Spacing Scale */
  --space-xs: 0.5rem;   /* 8px - tight gaps */
  --space-sm: 0.75rem;  /* 12px - default element gap */
  --space-md: 1rem;     /* 16px - section separation */
  --space-lg: 1.5rem;   /* 24px - card padding */
  --space-xl: 2rem;     /* 32px - major sections */

  /* Shadow System - Layered for depth */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1), 0 16px 48px rgba(0, 0, 0, 0.06);
  --shadow-primary: 0 8px 16px rgba(107, 114, 128, 0.3);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6b7280, #4b5563);
  --gradient-section: linear-gradient(to right, rgba(107, 114, 128, 0.05), transparent);
  --gradient-card-hover: linear-gradient(to bottom, rgba(107, 114, 128, 0.02), transparent);

  /* Easing Functions */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Colors */
[data-theme="dark"] {
  --bg-main: #0f172a;              /* Dark Slate */
  --card-bg: #1e293b;              /* Slate 800 */
  --text-main: #f1f5f9;            /* Light Slate */
  --text-muted: #94a3b8;           /* Slate 400 */
  --border-color: #334155;         /* Slate 700 */

  /* Subtle backgrounds */
  --bg-subtle: #1e293b;            /* Same as card-bg */
  --text-secondary: #cbd5e1;       /* Slate 300 */
  --text-tertiary: #94a3b8;        /* Slate 400 */
  --border-light: #475569;         /* Slate 600 */
  --border-medium: #475569;        /* Slate 600 */

  /* Success - etwas gedämpfter für Dark Mode */
  --success-bg: #064e3b;           /* Dark Green */
  --success-text: #86efac;         /* Light Green */
  --success-border: #065f46;       /* Green Border */

  /* Error - etwas gedämpfter */
  --error-bg: #7f1d1d;             /* Dark Red */
  --error-text: #fca5a5;           /* Light Red */
  --error-border: #991b1b;         /* Red Border */
  --error-hover: #dc2626;          /* Brighter Red */

  /* Remove button */
  --remove-bg: rgba(30, 41, 59, 0.9);  /* Dark translucent */
  --remove-text: #94a3b8;
  --remove-border: #475569;

  /* Shadows für Dark Mode - stärker! */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 16px 48px rgba(0, 0, 0, 0.3);
  --shadow-primary: 0 8px 16px rgba(99, 102, 241, 0.4);
}

/* System Dark Mode Fallback (wenn kein data-theme gesetzt) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg-main: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;

    --bg-subtle: #1e293b;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-light: #475569;
    --border-medium: #475569;

    --success-bg: #064e3b;
    --success-text: #86efac;
    --success-border: #065f46;

    --error-bg: #7f1d1d;
    --error-text: #fca5a5;
    --error-border: #991b1b;
    --error-hover: #dc2626;

    --remove-bg: rgba(30, 41, 59, 0.9);
    --remove-text: #94a3b8;
    --remove-border: #475569;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 16px 48px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 8px 16px rgba(99, 102, 241, 0.4);
  }
}

* { box-sizing: border-box; }

/* Offset für Sprungmarken wegen sticky Header */
html {
  scroll-padding-top: 85px;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
}

/* Header */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

details {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

summary {
  cursor: pointer;
  color: #6366f1;
  font-weight: 500;
}

summary::marker {
  display: none;
}
color-help {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #475569;
}

.color-help summary {
  cursor: pointer;
  color: #6366f1;
  font-weight: 500;
}

.color-help summary::marker {
  display: none;
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand-link {
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--primary);
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
  color: var(--text-main);
}
h1.brand-name {
  margin: 0;
}
.brand-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}
.brand-sub a,
.brand-sub a:visited,
.brand-sub a:hover,
.brand-sub a:active,
.brand-sub a:focus {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: inherit;
  border-bottom: none;
  background: none;
  cursor: pointer;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 1rem;
}
.topnav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.topnav a:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}
@media (max-width: 860px) {
  header {
    flex-wrap: wrap;
    gap: 0.75rem;
    position: static;
  }
  .brand {
    width: 100%;
  }
  .topnav {
    order: 2;
    margin-left: 0;
    flex: 1;
  }
  .theme-switch {
    order: 2;
  }
  .brand-sub {
    max-width: 100%;
    white-space: normal;
  }
}

/* Theme Toggle Slider */
.theme-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.theme-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.theme-switch-track {
  width: 46px;
  height: 26px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.theme-switch-icon {
  font-size: 12px;
  line-height: 1;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  pointer-events: none;
}
.theme-switch-icon-light {
  margin-left: 2px;
}
.theme-switch-icon-dark {
  margin-right: 2px;
}
.theme-switch-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateX(0);
  transition: transform 0.2s ease, background 0.2s ease;
  position: absolute;
  left: 2px;
  top: 2px;
}
.theme-switch-input:checked + .theme-switch-track {
  background: var(--gradient-primary);
  border-color: transparent;
}
.theme-switch-input:checked + .theme-switch-track .theme-switch-thumb {
  transform: translateX(20px);
  background: #fff;
}

/* App Container - 2 Column Layout */
.app-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--space-md);
  max-width: 1600px;
  margin: var(--space-md) auto;
  padding: 0 var(--space-md);
  align-items: start;
}
.app-container > aside {
  position: sticky;
  top: calc(var(--space-xl) + 60px); /* Header-Höhe + Abstand */
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.app-container > aside::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
@media (max-width: 1100px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  .app-container > aside {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: all 0.3s var(--ease-smooth);
}
.card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: var(--shadow-lg);
}
.card-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 var(--space-md) 0;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-xs);
}
.card-title a {
  color: inherit;
  text-decoration: none;
}
.card-title a:hover {
  text-decoration: underline;
}

.hint {
  font-size: var(--font-xs);
  color: var(--text-muted);
}
#colorWheel {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto;
  border-radius: 50%;
  cursor: crosshair;
}

/* Preview Section */
.preview-box {
  min-height: 150px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  transition: background 0.3s ease;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}
#preview2 {
  display: flex;
}
@media (max-width: 1100px) {
  #preview2 {
    display: none;
  }
}

/* Labels and Form Controls */
label {
  display: block;
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.field-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.field-row > div {
  flex: 1;
}
input[type="text"] {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: var(--font-sm);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--card-bg);
  color: var(--text-main);
}
input[type="number"] {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: var(--font-sm);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--card-bg);
  color: var(--text-main);
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.input-with-picker {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.input-with-picker > div {
  flex: 1;
}
.color-picker-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 2px solid var(--border-medium);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.color-picker-btn:hover {
  border-color: var(--primary);
}
.color-picker-btn input[type="color"] {
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  border: none;
  cursor: pointer;
}
select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: var(--font-sm);
  font-family: 'Inter', sans-serif;
  background: var(--card-bg);
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
input[type="range"] {
  width: 100%;
  margin: 0.75rem 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border-color);
  border-radius: 10px;
  outline: none;
}
[data-theme="dark"] input[type="range"] {
  background: var(--bg-subtle);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  border: none;
  cursor: grab;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
}
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: var(--gradient-primary);
  color: white;
  font-size: var(--font-sm);
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s var(--ease-smooth);
}
.btn-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  margin-right: 0.45rem;
}
.btn-icon svg {
  width: 100%;
  height: 100%;
}
.btn-preview {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}
.btn-preview:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
}
.btn:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: var(--shadow-sm);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Section Headers */
.section-header {
  font-size: var(--font-xl);
  font-weight: 800;
  margin: var(--space-xl) 0 var(--space-lg);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--gradient-section);
  border-radius: 12px;
  transition: background 0.3s var(--ease-smooth);
}
.section-header:hover {
  background: linear-gradient(to right, rgba(99, 102, 241, 0.08), transparent);
}
.section-header::after {
  content: "";
  height: 2px;
  flex: 1;
  background: linear-gradient(to right, var(--border-color), transparent);
}

/* Kontrast-Check */
.contrast-block {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}
.contrast-block-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.contrast-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.contrast-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  background: var(--card-bg);
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}
.contrast-row:hover {
  border-color: var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
@media (max-width: 600px) {
  .contrast-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
}
.contrast-preview {
  width: 240px;
  height: 90px;
  border-radius: 0.6rem;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: var(--font-sm);
  padding: 0 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.contrast-preview:hover {
  transform: scale(1.02);
}
@media (max-width: 600px) {
  .contrast-preview {
    width: 100%;
    min-height: 90px;
  }
}
.contrast-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--font-xs);
  flex: 1;
}
.contrast-label {
  font-weight: 600;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}
.contrast-ratio {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  font-weight: 500;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.badge-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem;
  border-radius: 10px;
  font-size: var(--font-xs);
  font-weight: 800;
  text-align: center;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.2s ease;
  animation: slideUp 0.3s var(--ease-smooth) backwards;
}
.badge.contrast-btn {
  appearance: none;
  cursor: default;
}
.badge-label {
  font-weight: 800;
}
.badge-value {
  font-size: 0.75em;
  font-weight: 600;
  opacity: 0.9;
}
.badge:nth-child(1) { animation-delay: 0.05s; }
.badge:nth-child(2) { animation-delay: 0.1s; }
.badge:nth-child(3) { animation-delay: 0.15s; }
.badge:nth-child(4) { animation-delay: 0.2s; }
.badge:hover {
  transform: translateY(-2px);
}
.badge-ok {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}
.badge-bad {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: var(--error-border);
}
.contrast-lightness-control {
  margin-top: 0.5rem;
  padding: 0rem;
  background: var(--bg-subtle);
  border-radius: 0.5rem;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}
.contrast-lightness-control label {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 0.4rem;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}
.contrast-lightness-control input[type="range"] {
  width: 100%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--border-medium);
  border-radius: 4px;
  outline: none;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}
.contrast-lightness-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: grab;
  cursor: -webkit-grab;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.contrast-lightness-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.contrast-lightness-control input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  cursor: -webkit-grabbing;
  transform: scale(1.05);
}
.contrast-lightness-control input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: grab;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.contrast-lightness-control input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.contrast-lightness-control input[type="range"]::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

/* Paletten-Layout */
.palettes {
  margin-top: 1.5rem;
}
.palette-block {
  margin-bottom: 1.5rem;
}
.palette-title {
  font-size: var(--font-base);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.palette-subtitle {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.palette-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--space-sm);
}
.swatch {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  font-size: var(--font-xs);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.swatch:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  transition: all 0.3s var(--ease-bounce);
}
.swatch-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.swatch-color {
  height: 80px;
  width: 100%;
}
.swatch-label {
  padding: 0.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
  word-break: break-all;
  text-align: center;
  font-weight: 700;
  font-size: var(--font-xs);
}
.swatch-role {
  padding: 0.3rem 0.5rem 0.5rem;
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-align: center;
}
.swatch-actions {
  display: flex;
  gap: 0.25rem;
  padding: 0 0.5rem 0.5rem;
  justify-content: center;
}
.swatch-action {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.swatch-action:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Saved combos / Paletten */
.saved-block {
  margin-top: 1.5rem;
}
.saved-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.saved-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.saved-slots {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}
.saved-slot {
  position: relative;
  flex: 0 0 170px;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.saved-slot:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.saved-slot-color {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-xs);
}
.saved-slot-meta {
  padding: 0.35rem 0.45rem 0.4rem;
}
.saved-slot-name {
  font-size: var(--font-xs);
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: var(--text-secondary);
}
.saved-slot-info {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  line-height: 1.3;
}
.saved-slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--remove-border);
  background: var(--remove-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--remove-text);
  cursor: pointer;
}
.saved-slot-remove:hover {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-hover);
}

/* Drag & Drop für Farbvarianten */
.saved-slot {
  cursor: grab;
}
.saved-slot:active {
  cursor: grabbing;
}
.saved-slot.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}
.saved-slot.drag-over-left::before,
.saved-slot.drag-over-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-color, #007bff);
  border-radius: 2px;
  z-index: 10;
}
.saved-slot.drag-over-left::before {
  left: -6px;
}
.saved-slot.drag-over-right::after {
  right: -6px;
}

/* Responsive Spacing Adjustments */
@media (max-width: 768px) {
  :root {
    /* Reduce spacing on mobile */
    --space-lg: 1rem;    /* 24px → 16px */
    --space-xl: 1.5rem;  /* 32px → 24px */
  }

  body {
    overflow-x: hidden;
  }

  .card {
    padding: var(--space-md);  /* 24px → 16px */
  }

  .app-container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: calc(var(--space-md) / 2);
    padding-right: calc(var(--space-md) / 2);  /* 32px → 16px → 8px */
    gap: var(--space-md);        /* 32px → 16px */
  }

  .preview-box {
    min-height: 120px;  /* 160px → 120px */
  }

  .saved-slots {
    flex-direction: column;
    overflow-x: visible;
  }
  .saved-slot {
    flex: 1 1 auto;
    width: 100%;
  }
  /* Mobile: Vertikale Drag-Indikatoren */
  .saved-slot.drag-over-left::before {
    left: 0;
    right: 0;
    top: -6px;
    bottom: auto;
    width: auto;
    height: 4px;
  }
  .saved-slot.drag-over-right::after {
    left: 0;
    right: 0;
    bottom: -6px;
    top: auto;
    width: auto;
    height: 4px;
  }
}

/* Content & FAQ Sections */
.content-section, .faq-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--space-xl);
}
.content-section h2, .faq-section h2 {
  margin: var(--space-xl) 0 var(--space-md);
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-main);
}
.content-section h2:first-child {
  margin-top: 0;
}
.content-section p, .faq-section p, .content-section li {
  color: var(--text-secondary);
  line-height: 1.7;
}
.content-section ul {
  padding-left: 1.5rem;
}
.content-section li {
  margin-bottom: 0.5rem;
}
.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin-top: var(--space-md);
}
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.faq-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.2);
}
.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-main);
}
.faq-item p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--text-muted);
}

/* Footer */
.page-footer {
  border-top: 1px solid var(--border-color);
  padding: var(--space-lg) var(--space-xl);
  color: var(--text-muted);
  font-size: var(--font-sm);
  max-width: 1600px;
  margin: 0 auto;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--border-color);
}
.footer-links a:hover {
  border-bottom-color: var(--text-muted);
}

/* === Zusätzliche Styles für Content-Seiten (z.B. wcag-kontrast.html) === */

/* Content Page Layout */
.content-page {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.content-page .card {
  padding: 2rem;
}

/* Typography für Content-Seiten */
.content-page h1 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  color: var(--text-main);
  line-height: 1.3;
}

.content-page h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
  color: var(--text-main);
}

.content-page h2:first-child {
  margin-top: 0;
}

.content-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--text-main);
}

.content-page p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content-page .intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.content-page ul {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.content-page li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.content-page a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.content-page a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Section Styling für Content-Seiten */
.content-page section {
  margin: 1.5rem 0;
  padding: var(--space-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.content-page section:first-of-type {
  margin-top: 1rem;
}

.content-page section h2 {
  margin-top: 0;
  margin-bottom: var(--space-md);
  color: var(--text-main);
}

/* Table of Contents */
.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius);
}

.toc strong {
  margin-right: 0.5rem;
}

.toc-sep {
  color: var(--text-muted);
}

/* Pill Link */
.pill-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pill-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* CTA Box */
.cta-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.cta-box p {
  margin: 0;
  color: var(--text-main);
}

.cta-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white !important;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cta-link:hover {
  background: var(--primary-hover);
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.back-link:hover {
  color: var(--primary);
}

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px 0;
}

.breadcrumbs a {
  color: var(--muted)
}

.breadcrumbs a:hover {
  color: var(--link-hover)
}













/* ====== Surface Tokens (an deine Variablen anpassen) ====== */
:root{
  --bg-page: #f8fafc;

  --surface-1: #ffffff;
  --surface-2: #f1f5f9;

  --border-subtle: #e2e8f0;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --primary: #16a34a;         /* bei dir ggf. --success oder --primary */
  --primary-hover: #15803d;

  --danger: #dc2626;
  --danger-hover: #b91c1c;

  --radius: 18px;
  --radius-sm: 14px;
}

/* Dark Mode für Surface Tokens */
[data-theme="dark"] {
  --bg-page: #0f172a;
  --surface-1: #1e293b;
  --surface-2: #334155;
  --border-subtle: #475569;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
}

/* ====== Card / Panel ====== */
.ui-card{
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.08);
}

.ui-card__header{
  background: var(--surface-1); /* bewusst: Header bleibt Surface-1 */
  padding: 18px 20px 10px;
}

.ui-card__title{
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.ui-card__body{
  padding: 0px;
}

.ui-panel{
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.ui-panel__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ui-panel__title{
  font-weight: 700;
  font-size: 14px;
}

.ui-divider{
  height: 1px;
  background: var(--border-subtle);
  width: 100%;
}

.ui-divider--spacious{
  margin: 18px 0;
}

/* ====== Typography ====== */
.ui-muted{ color: var(--text-muted); }
.ui-small{ font-size: 13px; }

.ui-label{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 6px 0 8px;
}

/* ====== Inputs ====== */
.ui-input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  color: var(--text-main);
  outline: none;
}

.ui-input:focus{
  border-color: rgba(22,163,74,0.55);
  box-shadow: 0 0 0 4px rgba(22,163,74,0.12);
}

/* ====== Grid ====== */
.ui-grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px){
  .ui-grid2{ grid-template-columns: 1fr; }
}

/* ====== Actions ====== */
.ui-actions{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ui-actions__left,
.ui-actions__right{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ====== Buttons ====== */
.btn{
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active{ transform: translateY(1px); }

.btn-secondary{
  background: var(--surface-1);        /* ruhig */
}
.btn-secondary:hover{
  background: rgba(241,245,249,0.7);   /* wie Surface-2, aber leichter */
}

.btn-ghost{
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover{
  background: rgba(241,245,249,0.7);
  color: var(--text-main);
}

.btn-primary{
  border-color: transparent;
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover{ background: var(--primary-hover); }

.btn-danger-outline{
  background: transparent;
  color: var(--danger);
  border-color: rgba(220,38,38,0.35);
}
.btn-danger-outline:hover{
  background: rgba(220,38,38,0.08);
  border-color: rgba(220,38,38,0.55);
}















/* Simple Footer */
.simple-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .content-page {
    padding: 0 1rem;
  }
  .content-page .card {
    padding: 1.5rem;
  }
  .content-page h1 {
    font-size: 1.5rem;
  }
}

/* ========== Export Modal ========== */
.export-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.export-modal.active {
  opacity: 1;
  visibility: visible;
}

.export-modal-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s var(--ease-smooth);
}

.export-modal.active .export-modal-content {
  transform: scale(1);
}

.export-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.export-modal-header h3 {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-main);
}

.export-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.export-modal-close:hover {
  color: var(--text-main);
}

.export-modal-body {
  padding: var(--space-md);
  overflow-y: auto;
  flex: 1;
}

.export-format-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.export-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  border-radius: 8px;
  cursor: pointer;
  font-size: var(--font-sm);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.export-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.export-tab.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
}

.export-preview {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--space-md);
  overflow-x: auto;
  max-height: 300px;
  margin-bottom: var(--space-md);
}

.export-preview pre {
  margin: 0;
  font-size: var(--font-xs);
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-main);
  line-height: 1.5;
}

.export-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.export-options label {
  margin-bottom: 0.25rem;
}

.export-modal-footer {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.export-modal-footer .btn {
  flex: 1;
  min-width: 140px;
}

.export-success {
  color: var(--success-text);
  background: var(--success-bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: var(--font-sm);
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.export-success.show {
  display: inline-flex;
}

/* Export-Button bei Paletten */
.palette-header-with-export {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
}

.export-palette-btn,
.save-palette-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.export-palette-btn:hover,
.save-palette-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.export-palette-btn svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 600px) {
  .export-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .export-options {
    grid-template-columns: 1fr;
  }

  .export-modal-footer {
    flex-direction: column;
  }

  .export-modal-footer .btn {
    width: 100%;
  }
}
