/* style.css - QRENA v5.0 - Liquid Glass Design System (2025) */

:root {
  /* ========== LIQUID GLASS DESIGN SYSTEM ========== */

  /* Background Layers - Radial Gradients */
  --glow-1: radial-gradient(700px 420px at 20% 15%, rgba(120, 170, 255, .35), rgba(0,0,0,0) 60%);
  --glow-2: radial-gradient(900px 520px at 85% 55%, rgba(255, 140, 200, .22), rgba(0,0,0,0) 62%);
  --glow-3: radial-gradient(520px 360px at 45% 95%, rgba(120, 255, 210, .16), rgba(0,0,0,0) 60%);

  /* Glass System - Transparency without backdrop-filter */
  --glass-bg: rgba(31, 41, 55, 0.4);
  --glass-bg-hover: rgba(31, 41, 55, 0.5);
  --glass-bg-active: rgba(59, 130, 246, 0.2);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-border-active: rgba(59, 130, 246, 0.4);

  /* Row/Inner Elements - Slightly darker */
  --glass-inner: rgba(31, 41, 55, 0.3);
  --glass-inner-hover: rgba(31, 41, 55, 0.4);

  /* Gradient Accents */
  --gradient-primary: linear-gradient(90deg, #60a5fa, #a78bfa, #34d399);
  --gradient-subtle: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.1) 80%,
    transparent 100%
  );

  /* Additional Design Tokens */
  --fg: rgba(255, 255, 255, 0.92);
  --hairline: rgba(255, 255, 255, 0.12);

  /* Basis Colors - Liquid Glass Theme */
  --bg: #0b0c10;
  --panel: #111827;
  --panel-2: #1f2937;
  --panel-3: #374151;
  --brand: #3b82f6;
  --brand-light: #60a5fa;
  --brand-dark: #1d4ed8;
  --success: #22c55e;
  --success-light: #4ade80;
  --error: #ef4444;
  --error-light: #f87171;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --muted: #94a3b8;
  --border: #334155;
  --border-light: rgba(255, 255, 255, 0.1);
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-dark: #1f2937;

  /* Font Sizes - Lesbar & Modern */
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-base: 1rem;     /* 16px */
  --fs-lg: 1.125rem;   /* 18px */
  --fs-xl: 1.25rem;    /* 20px */
  --fs-2xl: 1.5rem;    /* 24px */
  --fs-3xl: 1.875rem;  /* 30px */
  --fs-4xl: 2.25rem;   /* 36px */

  /* Spacing - 4px Grid System (Tailwind-like) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Legacy Spacing (für Kompatibilität) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Touch Targets - iOS Human Interface Guidelines */
  --touch-min: 48px;
  --touch-comfortable: 56px;

  /* Border Radius - Modern Rounded */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows - Depth System */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);

  /* Transitions - Smooth Animations */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* High Contrast Mode */
body.high-contrast {
  --bg: #000000;
  --panel: #1a1a1a;
  --panel-2: #2a2a2a;
  --brand: #4a90ff;
  --success: #00ff00;
  --error: #ff0000;
  --warning: #ffff00;
  --text: #ffffff;
  --border: #ffffff;
}

/* Font Size Variations */
body.font-small {
  --fs-base: 0.875rem;
  --fs-lg: 1rem;
  --fs-xl: 1.125rem;
  --fs-2xl: 1.25rem;
  --fs-3xl: 1.5rem;
  --fs-4xl: 1.875rem;
}

body.font-large {
  --fs-base: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;
}

body.font-xlarge {
  --fs-base: 1.25rem;
  --fs-lg: 1.5rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3.5rem;
}

/* ============================================
   GLOBAL STYLES - FÜR ALLE SEITEN
   ============================================ */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "SF Pro Text", BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* ============================================
   LIQUID GLASS GLOBAL LAYERS
   ============================================ */

/* Background Gradient Layers */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    var(--glow-1),
    var(--glow-2),
    var(--glow-3);
  filter: saturate(1.1);
  transform: translateZ(0);
}

/* SVG Noise Overlay */
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .08;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
}

/* ============================================
   LIQUID GLASS CARD SYSTEM
   ============================================ */

/* Base Card - Liquid Glass without backdrop-filter */
.card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  overflow: hidden;
  transition: all var(--transition-base);
}

/* Gradient accent line on top */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0,0,0,.2);
}

/* Active Card State */
.card.active {
  background: var(--glass-bg-active);
  border-color: var(--glass-border-active);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

/* Inner Elements (Rows, Sub-Cards) */
.row,
.inner-card {
  background: var(--glass-inner);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin: var(--space-2) 0;
  transition: all var(--transition-fast);
}

.row:hover,
.inner-card:hover {
  background: var(--glass-inner-hover);
  border-color: var(--glass-border-hover);
}

/* ============================================
   WASSERZEICHEN - AUF ALLEN SEITEN
   ============================================ */

/* QRENA Logo Wasserzeichen entfernt - nur Schullogo wird verwendet */

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Styles for Keyboard Navigation */
*:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* Skip to Content Link (Screen Reader) */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--brand);
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  border-radius: 0 0 8px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   UNIFIED BUTTONS - FÜR ALLE SEITEN
   ============================================ */

.btn,
button:not([class*="close"]):not([class*="rotate"]):not([class*="counter"]),
.touch-target {
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Ripple Effect Base */
.btn::after,
button:not([class*="close"]):not([class*="rotate"]):not([class*="counter"])::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:active,
button:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

.btn:active::after,
button:active::after {
  opacity: 1;
  transform: scale(2);
  transition: 0s;
}

.btn:disabled,
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading State */
.btn.loading {
  pointer-events: none;
  color: transparent;
}

.btn.loading::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Button Variants - Modern with Glow */
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  border: none;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-success,
.btn-green {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-md), 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-success:hover,
.btn-green:hover {
  background: linear-gradient(135deg, var(--success-light) 0%, var(--success) 100%);
  border: none;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(34, 197, 94, 0.4);
}

.btn-error,
.btn-red {
  background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-md), 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-error:hover,
.btn-red:hover {
  background: linear-gradient(135deg, var(--error-light) 0%, var(--error) 100%);
  border: none;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(239, 68, 68, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: var(--text-dark);
  border: none;
  box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, var(--warning-light) 0%, var(--warning) 100%);
  border: none;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 158, 11, 0.4);
}

.btn-blue {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.3);
}

.btn-blue:hover {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  border: none;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.4);
}

.btn-pink {
  background: linear-gradient(135deg, #d946ef 0%, #a855f7 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-md), 0 0 20px rgba(217, 70, 239, 0.3);
}

.btn-pink:hover {
  background: linear-gradient(135deg, #e879f9 0%, #d946ef 100%);
  border: none;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(217, 70, 239, 0.4);
}

/* Ghost Button - Outline Style */
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

/* Size Variants */
.btn-sm {
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-sm);
}

.btn-lg {
  min-height: var(--touch-comfortable);
  padding: var(--space-4) var(--space-6);
  font-size: var(--fs-lg);
}

.btn-xl {
  min-height: 64px;
  padding: var(--space-5) var(--space-8);
  font-size: var(--fs-xl);
}

/* ============================================
   GLASSMORPHISM CARDS - FÜR ALLE SEITEN
   ============================================ */

.card,
.glass-card,
.card-glass {
  background: linear-gradient(
    135deg,
    rgba(31, 41, 55, 0.9) 0%,
    rgba(31, 41, 55, 0.7) 100%
  );
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-lg),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}

/* Subtle shine effect on cards */
.card::before,
.glass-card::before,
.card-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover,
.glass-card:hover,
.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.card:hover::before,
.glass-card:hover::before,
.card-glass:hover::before {
  opacity: 1;
}

/* Touch Feedback */
.card:active,
.touch-feedback:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}

/* Card Variants */
.card-elevated {
  box-shadow: var(--shadow-xl);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.15);
}

.card-highlight {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.2);
}

.card-success {
  border-color: var(--success);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(34, 197, 94, 0.2);
}

.card-error {
  border-color: var(--error);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(239, 68, 68, 0.2);
}

/* ============================================
   CONTAINERS - MOBILE OPTIMIZED
   ============================================ */

.container {
  width: 100%;
  max-width: 100%;
  padding: var(--space-md);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  /* WICHTIG: min-height statt height für Scrolling */
  min-height: 100vh;
}

/* Mobile: Mehr Padding, natürliche Höhe */
@media (max-width: 768px) {
  .container {
    min-height: auto;
    padding: var(--space-sm);
  }
}

/* ============================================
   MOBILE FIRST IMPROVEMENTS
   ============================================ */

/* Input Fields */
input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px; /* Verhindert Zoom auf iOS */
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text);
  transition: all 0.2s;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(0, 0, 0, 0.4);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

/* Labels */
label {
  display: block;
  margin: 8px 0 6px;
  font-weight: 600;
  color: var(--text);
}

/* ============================================
   ACCESSIBILITY CONTROLS PANEL
   ============================================ */

.accessibility-panel {
  position: fixed;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-sm);
  display: flex;
  gap: var(--space-sm);
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
  max-width: 90vw;
}

.accessibility-panel button {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: var(--fs-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.accessibility-panel button:hover,
.accessibility-panel button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
/* ============================================
   STYLE.CSS - TEIL 2/3
   ============================================ */

/* ============================================
   iOS CAMERA FIX
   ============================================ */

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(1);
  transition: transform 0.3s ease;
}

/* iOS 16 Specific Fix */
@supports (-webkit-touch-callout: none) {
  body.ios-16 #cameraVideo {
    transform: scaleX(-1) rotate(180deg);
  }
  
  body.ios-old #cameraVideo {
    transform: scaleX(-1);
  }
}

/* Manual Rotation Button */
.camera-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 100;
}

.rotate-btn {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  font-size: var(--fs-2xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rotate-btn:active {
  transform: scale(0.9);
}

/* QR Code Overlay Canvas */
#qrOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Small Mobile (Portrait) */
@media (max-width: 374px) {
  :root {
    --fs-base: 0.875rem;
    --space-md: 12px;
  }
  
  .accessibility-panel {
    top: var(--space-sm);
    right: var(--space-sm);
    left: var(--space-sm);
    max-width: none;
  }
  
  .btn {
    font-size: var(--fs-sm);
    padding: 10px 16px;
  }
}

/* Mobile (Portrait) */
@media (max-width: 767px) {
  .container {
    padding: var(--space-sm);
  }
  
  .card {
    border-radius: 12px;
    padding: var(--space-sm);
  }
  
  /* Stack elements vertically on mobile */
  .grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* Tablet (Portrait) */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    max-width: 720px;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

/* Tablet (Landscape) - OPTIMIERT! */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  :root {
    --space-md: 12px;
  }
  
  body {
    font-size: 0.9rem;
  }
  
  .accessibility-panel {
    top: 8px;
    right: 8px;
    padding: 6px;
    gap: 6px;
  }
  
  .accessibility-panel button {
    min-width: 40px;
    min-height: 40px;
    font-size: 1rem;
  }
  
  /* Kompaktere Buttons im Landscape */
  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  /* Sidebar schmaler */
  .sidebar {
    width: 60px;
  }
  
  .sidebar .label {
    display: none;
  }
  
  /* Topbar kompakter */
  .topbar {
    padding: 8px 12px;
    min-height: 48px;
  }
  
  .chip {
    font-size: 0.85rem;
    padding: 4px 8px;
  }
  
  /* Cards kompakter */
  .card {
    padding: 12px;
  }
  
  .card h2 {
    font-size: 1.1rem;
  }
  
  /* Grid optimiert für Landscape */
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  /* Dashboard Layout für Landscape */
  .dashboard-grid {
    gap: 10px;
  }
  
  .hero-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .analytics-row {
    grid-template-columns: 1.5fr 1fr;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
  }
}

/* Large Desktop */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Größere Touch-Targets auf Touch-Geräten */
  .btn,
  button,
  .touch-target,
  a.btn {
    min-height: 48px;
    min-width: 48px;
    padding: 14px 24px;
  }
  
  /* Größere Input Fields */
  input,
  textarea,
  select {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Disable hover effects on touch */
  .card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}

/* iPad Specific */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (-webkit-min-device-pixel-ratio: 2) {
  
  /* iPad optimierungen */
  .accessibility-panel {
    top: 12px;
    right: 12px;
  }
  
  /* Kamera Container für iPad */
  #cameraContainer {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  
  /* QR Scanner Bereich größer auf iPad */
  .scanner-area {
    width: 80%;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Landscape-spezifische Anpassungen */
@media (orientation: landscape) {
  /* Kamera im Landscape mode */
  #cameraContainer {
    height: 100vh;
    width: 100vw;
  }
  
  #cameraVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Controls unten zentriert */
  .camera-controls {
    bottom: 20px;
  }
}

/* Print Styles */
@media print {
  .accessibility-panel,
  .camera-controls,
  button,
  .btn {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  body::before {
    display: none;
  }
  
  .card {
    border: 1px solid black;
    page-break-inside: avoid;
  }
}

/* ============================================
   SWIPE GESTURES
   ============================================ */

.swipeable {
  touch-action: pan-y;
  position: relative;
  overflow: hidden;
}

.swipe-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
  z-index: 10;
}

.swipe-indicator.left {
  left: 20px;
}

.swipe-indicator.right {
  right: 20px;
}

.swipe-indicator.active {
  opacity: 0.7;
}

/* Tab Navigation with Swipe */
.tab-container {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.tab-content {
  display: flex;
  transition: transform var(--transition-base);
  will-change: transform;
}

.tab-pane {
  min-width: 100%;
  flex-shrink: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

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

.fade-in {
  animation: fadeIn var(--transition-base) ease-out;
}

.slide-in {
  animation: slideIn var(--transition-base) ease-out;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--brand);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   TOOLTIPS
   ============================================ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: var(--fs-sm);
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  margin-bottom: 8px;
  z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  opacity: 1;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.selectable {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.5);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.7);
}

/* ============================================
   MOBILE SAFARI ADDRESS BAR FIX
   ============================================ */

@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
  
  html {
    height: -webkit-fill-available;
  }
}
/* ============================================
   STYLE.CSS - TEIL 3/3 - FINALE
   ============================================ */

/* ============================================
   REDUCED MOTION & PREFERENCES
   ============================================ */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .swipe-indicator,
  .tab-content {
    transition: none !important;
  }
  
  body::before {
    animation: none !important;
  }
}

/* High Contrast Adjustments */
@media (prefers-contrast: high) {
  body:not(.high-contrast) {
    --border: #ffffff;
    --text: #ffffff;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .card {
    border: 2px solid var(--border);
  }
}

/* Dark Mode Preference (Already dark by default) */
@media (prefers-color-scheme: dark) {
  /* Already dark by default */
}

/* Light Mode (if implemented) */
body.light-mode {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --text: #1e293b;
  --border: #cbd5e1;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

body.light-mode::before {
  opacity: 0.05;
}

/* ============================================
   ADMIN SPECIFIC STYLES
   ============================================ */

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "sidebar topbar" "sidebar main";
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  grid-area: sidebar;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

.logo img {
  width: 28px;
  height: 28px;
}

.nav {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #e5e7eb;
  transition: all 0.2s;
  min-height: var(--touch-min);
}

.nav a.active,
.nav a:hover {
  background: #0f172a;
  border: 1px solid #1f2a44;
}

.nav .label {
  font-weight: 600;
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #111827cc;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  max-height: 80px;
  min-height: 56px;
}

.topbar .grow {
  flex: 1;
}

.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: #0f172a;
  border: 1px solid #1f2a44;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.main {
  grid-area: main;
  overflow: auto;
  padding: 16px;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2a354e;
  border-radius: 12px;
  padding: 10px;
  margin: 6px 0;
}

.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.kpi {
  background: #0f172a;
  border: 1px solid #1f2a44;
  border-radius: 14px;
  padding: 14px;
}

.kpi .val {
  font-size: 2rem;
  font-weight: 900;
}

.inline-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.qr-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  margin-top: 8px;
  background: #111827;
  border-radius: 10px;
}

.qr-inline canvas {
  background: #fff;
  border-radius: 6px;
}

.qr-inline a {
  color: #93c5fd;
  word-break: break-all;
  font-size: 0.9rem;
}

/* ============================================
   MODAL / PREVIEW STYLES
   ============================================ */

.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.preview-content {
  background: #fff;
  color: #111;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
}

.flip-card {
  perspective: 1000px;
  width: 100%;
  height: 220px;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
  background: #fff;
  color: #111;
}

.flip-card-back {
  background: #f3f4f6;
  color: #111;
  transform: rotateY(180deg);
}

.answer-input {
  margin-top: 12px;
  padding: 10px;
  font-size: 1.2rem;
  border-radius: 8px;
  border: 2px solid #ddd;
  width: 80%;
  text-align: center;
}

/* ============================================
   COLLAPSIBLE SECTIONS
   ============================================ */

.collapsible-section {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 10px;
}

.collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.collapse-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.collapse-icon {
  transition: transform 0.3s;
  font-size: 1.2rem;
}

.collapse-icon.open {
  transform: rotate(90deg);
}

.collapse-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
  opacity: 0;
}

.collapse-content.open {
  max-height: 5000px; /* Mehr Platz für viele Aufgaben */
  opacity: 1;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in;
}

.section-divider {
  border-top: 1px solid var(--border);
  margin: 20px 0;
  padding-top: 16px;
}

/* ============================================
   BADGE SYSTEM
   ============================================ */

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.badge-info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

/* ============================================
   RESPONSIVE ADMIN OVERRIDES
   ============================================ */

@media (max-width: 900px) {
  .app {
    grid-template-columns: 64px 1fr;
  }
  
  .nav .label {
    display: none;
  }
  
  .hero-row {
    grid-template-columns: 1fr;
  }
  
  .analytics-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
  
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    max-height: none;
  }
  
  .btn-group {
    width: 100%;
    justify-content: stretch;
  }
  
  .btn-group button {
    flex: 1;
  }
  
  .podium {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
  }
  
  .place-bar {
    height: 60px !important;
  }
}

/* ============================================
   FLOAT UP ANIMATION (für Punkte)
   ============================================ */

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-100px);
  }
}

/* ============================================
   CLOSE BUTTON STYLING
   ============================================ */

.close-popup-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.2s;
  z-index: 10;
}

.close-popup-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.close-popup-btn:active {
  transform: scale(0.95);
}

/* ============================================
   TASK POPUP - MODERNE AUFGABEN-KARTE v3.2
   ============================================ */

.task-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--space-md);
  animation: fadeIn 0.3s ease-out;
}

.task-popup-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Task Card - Glassmorphism */
.task-card {
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.2) 40%, rgba(11, 18, 32, 0.95) 80%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 24px;
  padding: var(--space-xl);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(37, 99, 235, 0.2) inset;
  position: relative;
  overflow: hidden;
}

.task-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    transparent
  );
  transform: rotate(45deg);
  pointer-events: none;
}

/* Close Button */
.task-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
  font-weight: 700;
  line-height: 1;
}

.task-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
  transform: rotate(90deg) scale(1.1);
}

.task-close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

/* Task Header */
.task-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

/* YouTube Video Container */
.task-video-container {
  margin-bottom: var(--space-lg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Image Container */
.task-image-container {
  margin-bottom: var(--space-lg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.05);
}

.task-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: contain;
}

/* Audio Container */
.task-audio-container {
  margin-bottom: var(--space-lg);
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  border: 2px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.task-audio {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  outline: none;
}

.task-audio:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.task-icon {
  font-size: 4rem;
  margin-bottom: var(--space-sm);
  display: block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.task-question {
  font-size: var(--fs-2xl);
  font-weight: 900;
  color: #fff;
  margin: 0 0 var(--space-sm) 0;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.task-meta {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.task-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 700;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

/* Task Form */
.task-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Input Styles */
.task-input {
  width: 100%;
  padding: 16px 20px;
  font-size: var(--fs-xl);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  color: #fff;
  text-align: center;
  transition: all var(--transition-base);
  box-sizing: border-box;
}

.task-input:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  transform: scale(1.02);
}

.task-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

/* Multiple Choice Options */
.task-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.task-option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: var(--touch-min);
}

.task-option:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateX(8px);
}

.task-option:active {
  transform: translateX(8px) scale(0.98);
}

.task-option input[type="radio"],
.task-option input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-right: 16px;
  cursor: pointer;
  accent-color: var(--brand);
}

.task-option label {
  flex: 1;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: #e5e7eb;
  cursor: pointer;
  margin: 0;
}

.task-option.selected {
  background: rgba(37, 99, 235, 0.25);
  border-color: var(--brand);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

/* Submit Button - MIT SHINE! */
.task-submit-btn {
  position: relative;
  padding: 18px 32px;
  font-size: var(--fs-xl);
  font-weight: 900;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 16px;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-base);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.task-submit-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.task-submit-btn:hover::before {
  transform: translateX(100%);
}

.task-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

.task-submit-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.task-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.task-submit-btn .btn-icon {
  font-size: var(--fs-2xl);
}

/* Feedback Card */
.task-feedback-card {
  text-align: center;
  padding: var(--space-xl);
  animation: flipIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes flipIn {
  from {
    opacity: 0;
    transform: rotateY(-90deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotateY(0) scale(1);
  }
}

.feedback-icon {
  font-size: 5rem;
  margin-bottom: var(--space-md);
  display: block;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.feedback-text {
  font-size: var(--fs-2xl);
  font-weight: 900;
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.feedback-text.correct {
  color: #6ee7b7;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.feedback-text.wrong {
  color: #fca5a5;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.feedback-detail {
  font-size: var(--fs-lg);
  color: var(--muted);
  margin-top: var(--space-sm);
}

.feedback-points {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 999px;
  font-size: var(--fs-xl);
  font-weight: 900;
  color: #000;
  margin-top: var(--space-md);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

/* Mobile Optimierungen */
@media (max-width: 640px) {
  .task-card {
    padding: var(--space-lg);
    border-radius: 20px;
  }
  
  .task-question {
    font-size: var(--fs-xl);
  }
  
  .task-icon {
    font-size: 3rem;
  }
  
  .task-input {
    font-size: var(--fs-lg);
    padding: 14px 18px;
  }
  
  .task-submit-btn {
    font-size: var(--fs-lg);
    padding: 16px 28px;
    min-height: 56px;
  }
  
  .task-option {
    padding: 12px 16px;
  }
  
  .task-option label {
    font-size: var(--fs-base);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .task-popup-overlay,
  .task-popup-container,
  .task-card::before,
  .task-submit-btn::before,
  .task-icon,
  .feedback-icon {
    animation: none !important;
    transition: none !important;
  }
}

.difficulty-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.difficulty-btn {
  padding: 20px 16px;
  border-radius: 12px;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
}

.difficulty-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.difficulty-btn.easy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(110, 231, 183, 0.2));
  border-color: #10b981;
}

.difficulty-btn.medium {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.2));
  border-color: #fbbf24;
}

.difficulty-btn.hard {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
  border-color: #ef4444;
}

.difficulty-btn.selected {
  border-color: white;
  box-shadow: 0 0 20px currentColor;
}

.difficulty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.difficulty-label {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.difficulty-points {
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  margin-bottom: 4px;
}

.difficulty-help {
  font-size: 0.8rem;
  opacity: 0.7;
}

.task-preview {
  margin: 24px 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
}

.preview-question {
  font-size: 1.1rem;
  line-height: 1.5;
}

/* ======================== KOOPERATIONS-SYSTEM STYLES ======================== */

/* Floating Help Button */
.help-floating-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  z-index: 9997;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.help-floating-btn:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

.help-floating-btn:active {
  transform: scale(0.95);
}

.help-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #fbbf24;
  color: #000;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Help Panel */
.help-panel {
  position: fixed;
  bottom: 150px;
  right: 20px;
  width: 340px;
  max-height: 500px;
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: all 0.3s;
}

.help-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.help-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fca5a5;
}

.help-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.help-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

.help-panel-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
}

.help-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Help Request Card */
.help-request-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.help-request-card:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateX(-4px);
}

.help-request-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.help-request-time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.help-request-task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.help-task-name {
  font-weight: 700;
  color: #fbbf24;
}

.help-task-points {
  font-size: 0.9rem;
  color: #86efac;
}

.help-request-reward {
  font-size: 0.85rem;
  color: #a7f3d0;
  margin-bottom: 12px;
  padding: 6px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
  text-align: center;
}

.help-request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-help-now,
.btn-help-preview {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-help-now {
  background: linear-gradient(135deg, #10b981, #6ee7b7);
  color: white;
}

.btn-help-now:hover {
  background: linear-gradient(135deg, #059669, #10b981);
  transform: translateY(-2px);
}

.btn-help-preview {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-help-preview:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Help Dialog */
.help-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.help-dialog-card {
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s;
}

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

.help-dialog-card h3 {
  margin: 0 0 16px 0;
  color: #6ee7b7;
  font-size: 1.3rem;
}

.help-dialog-task {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.8);
}

.help-dialog-card textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.help-dialog-card textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.char-counter {
  text-align: right;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.help-dialog-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  padding: 12px;
  margin: 16px 0;
  border-radius: 6px;
  color: #fbbf24;
  font-size: 0.9rem;
}

.help-dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Helper Countdown */
.helper-countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.countdown-card {
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.countdown-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: spin 3s linear infinite;
}

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

.countdown-text {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #6ee7b7;
}

.countdown-bar-outer {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.countdown-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #6ee7b7);
  transition: width 1s linear;
  border-radius: 999px;
}

.countdown-time {
  font-size: 1.5rem;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  margin-bottom: 16px;
  color: white;
}

.countdown-info {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.helper-countdown-overlay.success {
  background: rgba(16, 185, 129, 0.2);
}

.helper-countdown-overlay.success .countdown-card {
  border-color: #10b981;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

/* Preview Dialog */
.help-preview-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s;
}

.help-preview-card {
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s;
}

.help-preview-card h3 {
  margin: 0 0 20px 0;
  color: #93c5fd;
  font-size: 1.3rem;
}

.help-preview-content {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.preview-task-name {
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 12px;
}

.preview-task-question {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 12px;
  color: white;
}

.preview-task-meta {
  color: #86efac;
  font-size: 0.9rem;
}

.help-preview-actions {
  display: flex;
  gap: 12px;
}

/* Received Hint Card */
.received-hint-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(31, 41, 55, 0.98);
  backdrop-filter: blur(20px);
  border: 3px solid #10b981;
  border-radius: 20px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(16, 185, 129, 0.3);
  z-index: 10002;
  animation: bounceIn 0.5s;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.hint-header {
  font-size: 1.3rem;
  font-weight: 700;
  color: #6ee7b7;
  margin-bottom: 16px;
  text-align: center;
}

.hint-content {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
  padding: 16px;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: white;
}

.hint-footer {
  text-align: center;
}

.btn-hint-ok {
  background: linear-gradient(135deg, #10b981, #6ee7b7);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hint-ok:hover {
  background: linear-gradient(135deg, #059669, #10b981);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Help Request Button in Task */
.btn-help-request {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 12px;
}

.btn-help-request:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .help-panel {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 140px;
  }
  
  .help-floating-btn {
    bottom: 70px;
    right: 16px;
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .help-dialog-card,
  .help-preview-card,
  .received-hint-card {
    width: 95%;
    padding: 20px;
  }
  
  .countdown-card {
    padding: 24px;
  }
}

/* ======================== ADMIN ERWEITERUNGEN STYLING ======================== */

/* Match Director Tabs */
.match-director-container {
  width: 100%;
}

.director-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.director-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.director-tab:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.director-tab.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

.director-content {
  margin-top: 20px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s;
}

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

/* Settings Cards */
.settings-card {
  background: rgba(31, 41, 55, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.card-header h3 {
  margin: 0;
  font-size: 0.95rem;
  color: white;
}

.card-header-badge {
  font-size: 0.85rem;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-inactive {
  background: rgba(156, 163, 175, 0.2);
  color: #d1d5db;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.card-body {
  padding: 10px;
}

/* Toggle Switch */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 56px;
  height: 28px;
  background: rgba(156, 163, 175, 0.3);
  border-radius: 999px;
  transition: all 0.3s;
  border: 2px solid rgba(156, 163, 175, 0.5);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input:checked + .toggle-slider {
  background: linear-gradient(135deg, #10b981, #6ee7b7);
  border-color: #10b981;
}

.toggle-label input:checked + .toggle-slider::after {
  left: 28px;
}

.toggle-text {
  font-weight: 700;
  font-size: 1rem;
}

/* Form Sections */
.form-section {
  margin: 24px 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section h4 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #93c5fd;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.form-input,
.form-slider {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
}

.form-input:focus,
.form-slider:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.help-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 6px;
  line-height: 1.4;
}

.help-text-small {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Split Display (Punkte-Aufteilung) */
.split-display {
  display: grid;
  grid-template-columns: 2fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin: 20px 0;
}

.split-item {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.split-item.recipient {
  border: 2px solid rgba(59, 130, 246, 0.3);
}

.split-item.helper {
  border: 2px solid rgba(16, 185, 129, 0.3);
}

.split-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.split-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.split-value {
  font-size: 2rem;
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
}

.split-slider {
  width: 100%;
  margin-top: 8px;
}

.split-note {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
}

.split-divider {
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.3);
}

.split-example {
  margin-top: 12px;
  padding: 12px;
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #60a5fa;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #93c5fd;
}

/* Slider mit Input */
.slider-input-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.slider-value-input {
  width: 80px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  text-align: center;
  font-weight: 700;
}

/* Recommendation Box */
.recommendation-box {
  background: rgba(251, 191, 36, 0.1);
  border-left: 4px solid #fbbf24;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  color: #fde68a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.recommendation-box strong {
  color: #fbbf24;
}

.recommendation-box ul {
  margin: 8px 0 0 20px;
  padding: 0;
}

.recommendation-box li {
  margin: 4px 0;
}

/* Preview Table */
.preview-section {
  margin-top: 24px;
}

.preview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
}

.preview-table thead {
  background: rgba(0, 0, 0, 0.4);
}

.preview-table th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: #93c5fd;
  font-size: 0.9rem;
}

.preview-table td {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.preview-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Points Grid (Punkte-Konfiguration) */
.points-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.points-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.points-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.points-card.easy {
  border: 2px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.points-card.medium {
  border: 2px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.05);
}

.points-card.hard {
  border: 2px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.points-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.points-label {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: white;
}

.points-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.points-input {
  width: 100px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
}

.points-input:focus {
  outline: none;
  border-color: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.points-unit {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.points-help {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 8px;
}

/* QR-Wall Preview */
.qr-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.qr-preview-box {
  aspect-ratio: 1;
  background: white;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.qr-preview-box:hover {
  transform: scale(1.05);
}

.qr-preview-box.neon-green {
  border: 3px solid #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.qr-preview-box.neon-yellow {
  border: 3px solid #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.qr-preview-box.neon-red {
  border: 3px solid #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.qr-preview-content {
  font-size: 2rem;
  font-weight: 900;
  color: #000;
}

.qr-preview-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #000;
}

.qr-preview-points {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

/* Color Legend */
.color-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-block;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .split-display {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .split-divider {
    transform: rotate(90deg);
  }
  
  .points-grid {
    grid-template-columns: 1fr;
  }
  
  .qr-preview-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .director-tabs {
    flex-wrap: wrap;
  }
  
  .director-tab {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .form-section {
    padding: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* ======================== IMPORT SECTION STYLING ======================== */

.import-section {
  margin: 24px 0;
}

.template-downloads {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.template-downloads p {
  margin: 0 0 12px 0;
  color: #93c5fd;
  font-weight: 600;
}

.template-buttons {
  display: flex;
  gap: 12px;
}

.btn-template {
  flex: 1;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-template:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Dropzone */
.import-dropzone {
  border: 3px dashed rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s;
}

.import-dropzone:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.02);
}

.import-dropzone.drag-over {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.dropzone-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.dropzone-text {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: white;
}

.dropzone-formats {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Import Preview */
.import-preview-container {
  margin-top: 24px;
  animation: slideDown 0.3s;
}

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

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.preview-header h3 {
  margin: 0;
  color: white;
}

.error-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Import Stats */
.import-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.stat-card.easy {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.stat-card.medium {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.05);
}

.stat-card.hard {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.stat-card.points {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
}

.stat-icon {
  font-size: 1rem;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 900;
  color: white;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Import Errors */
.import-errors {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.import-errors h4 {
  margin: 0 0 12px 0;
  color: #fca5a5;
}

.import-errors ul {
  margin: 0;
  padding-left: 20px;
  color: #fecaca;
  font-size: 0.9rem;
}

.import-errors li {
  margin: 4px 0;
}

/* Tasks List */
.import-tasks-list {
  margin-bottom: 20px;
}

.import-tasks-list h4 {
  margin: 0 0 12px 0;
  color: white;
}

.tasks-scroll {
  max-height: 400px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.preview-task-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.preview-task-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.task-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.task-id {
  font-weight: 700;
  color: #fbbf24;
  font-size: 0.9rem;
}

.task-difficulty {
  font-size: 0.9rem;
}

.task-difficulty.diff-1 {
  color: #6ee7b7;
}

.task-difficulty.diff-2 {
  color: #fde68a;
}

.task-difficulty.diff-3 {
  color: #fca5a5;
}

.task-points {
  margin-left: auto;
  font-weight: 700;
  color: #86efac;
  font-size: 0.9rem;
}

.task-question {
  color: white;
  margin-bottom: 8px;
  line-height: 1.4;
}

.task-meta {
  display: flex;
  gap: 8px;
  font-size: 0.8rem;
}

.task-type,
.task-fach {
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
}

/* Import Actions */
.import-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .import-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .import-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .template-buttons {
    flex-direction: column;
  }

  .import-actions {
    flex-direction: column;
  }
}

/* ======================== VERSION 4.0 STYLES ======================== */
/* ======================== SCHWIERIGKEITS-BUTTONS ======================== */

.difficulty-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.difficulty-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}

.difficulty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.difficulty-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.difficulty-btn[data-difficulty="1"].active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.difficulty-btn[data-difficulty="2"].active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.difficulty-btn[data-difficulty="3"].active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.diff-icon {
  font-size: 1.5rem;
}

.diff-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.diff-points {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ======================== TABS ======================== */

.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.settings-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.settings-section h3 {
  margin-top: 0;
}

/* ======================== KOOPERATIONS-UI (RALLYE) ======================== */

.help-floating-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.3s;
}

.help-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 99, 235, 0.6);
}

.help-icon {
  font-size: 28px;
}

.help-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 28px;
  height: 28px;
  background: #ef4444;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Help Panel */
.help-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  max-height: 70vh;
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.help-panel.open {
  transform: translateY(0);
}

.help-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-panel-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.help-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.help-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.help-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.help-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.help-request-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.help-request-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.help-request-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.help-request-time {
  color: var(--muted);
  font-size: 0.85rem;
}

.help-request-task {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.help-task-name {
  font-weight: 600;
}

.help-task-points {
  color: #fbbf24;
}

.help-request-reward {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.help-request-actions {
  display: flex;
  gap: 8px;
}

.btn-help-now,
.btn-help-preview {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-help-now {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-help-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-help-preview {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-help-preview:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Help Dialog */
.help-dialog-overlay,
.help-preview-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 20px;
}

.help-dialog-card,
.help-preview-card {
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
}

.help-dialog-task {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.help-dialog-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.char-counter {
  text-align: right;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.help-dialog-actions,
.help-preview-actions {
  display: flex;
  gap: 12px;
}

.help-preview-content {
  margin: 20px 0;
}

.preview-task-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--brand);
}

.preview-task-question {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.preview-task-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Countdown */
.helper-countdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.countdown-card {
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.countdown-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.countdown-text {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.countdown-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.countdown-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  transition: width 1s linear;
}

.countdown-time {
  font-size: 1.2rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 16px;
}

.countdown-info {
  color: var(--muted);
}

.helper-countdown-overlay.success .countdown-bar-fill {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Received Hint */
.received-hint-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 24px;
  max-width: 450px;
  width: 90%;
  z-index: 1003;
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
  animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.hint-header {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
  color: #60a5fa;
}

.hint-content {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.hint-footer {
  text-align: center;
}

.btn-hint-ok {
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-hint-ok:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .help-floating-btn {
    width: 56px;
    height: 56px;
    bottom: 70px;
    right: 16px;
  }

  .help-icon {
    font-size: 24px;
  }

  .help-panel {
    max-width: 100%;
    max-height: 80vh;
  }

  .difficulty-selector {
    grid-template-columns: 1fr;
  }

  .tab-nav {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 120px;
  }
}

/* ========================================
   TOLERANT-TOGGLE BUTTON STYLE
   ======================================== */

.tolerant-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  background: rgba(71, 85, 105, 0.3);
  border: 2px solid #475569;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.tolerant-toggle-btn:hover {
  background: rgba(71, 85, 105, 0.4);
  border-color: #64748b;
  transform: translateY(-1px);
}

.tolerant-toggle-btn[data-active="true"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.3) 100%);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tolerant-toggle-btn[data-active="true"]:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.4) 100%);
  border-color: #60a5fa;
}

.tolerant-icon {
  font-size: 1.2rem;
  margin-right: 10px;
}

.tolerant-label {
  flex: 1;
  text-align: left;
}

.tolerant-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.tolerant-toggle-btn[data-active="true"] .tolerant-status {
  background: rgba(59, 130, 246, 0.4);
  color: #fff;
}
/* ============================================
   LEGAL FOOTER - Impressum, Datenschutz, etc.
   ============================================ */

.legal-footer {
  background: var(--panel-2);
  border-top: 1px solid var(--border);
  padding: 20px;
  margin-top: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.legal-footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.legal-footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-footer-links a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.legal-footer-copyright {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Für mobile Geräte */
@media (max-width: 640px) {
  .legal-footer-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* ============================================
   MODERN ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

/* Fade In Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bounce & Pop */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Pulse Animations */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
  }
}

@keyframes pulseScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Success Animation */
@keyframes successPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* Shimmer/Skeleton Loading */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Animation Utility Classes */
.animate-fadeIn {
  animation: fadeIn var(--transition-base) ease forwards;
}

.animate-fadeInUp {
  animation: fadeInUp var(--transition-slow) ease forwards;
}

.animate-fadeInDown {
  animation: fadeInDown var(--transition-slow) ease forwards;
}

.animate-fadeInScale {
  animation: fadeInScale var(--transition-slow) var(--transition-bounce) forwards;
}

.animate-slideInLeft {
  animation: slideInLeft var(--transition-slow) ease forwards;
}

.animate-slideInRight {
  animation: slideInRight var(--transition-slow) ease forwards;
}

.animate-bounce {
  animation: bounce 1s ease infinite;
}

.animate-pop {
  animation: pop 0.3s ease;
}

.animate-shake {
  animation: shake 0.5s ease;
}

.animate-pulse {
  animation: pulseScale 2s ease infinite;
}

.animate-glow {
  animation: pulseGlow 2s ease infinite;
}

/* Staggered Children Animation */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp var(--transition-slow) ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 50ms; }
.stagger-children > *:nth-child(3) { animation-delay: 100ms; }
.stagger-children > *:nth-child(4) { animation-delay: 150ms; }
.stagger-children > *:nth-child(5) { animation-delay: 200ms; }
.stagger-children > *:nth-child(6) { animation-delay: 250ms; }
.stagger-children > *:nth-child(7) { animation-delay: 300ms; }
.stagger-children > *:nth-child(8) { animation-delay: 350ms; }
.stagger-children > *:nth-child(9) { animation-delay: 400ms; }
.stagger-children > *:nth-child(10) { animation-delay: 450ms; }

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: 0.75em;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

/* ============================================
   UTILITY CLASSES - Tailwind-like
   ============================================ */

/* Spacing Utilities */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-auto { margin: auto; }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* Gap Utilities */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Text Utilities */
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }
.text-4xl { font-size: var(--fs-4xl); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--muted); }
.text-secondary { color: var(--text-secondary); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

/* Border Radius Utilities */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow Utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-glow { box-shadow: var(--shadow-glow); }

/* Width/Height Utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }

/* Visibility */
.hidden { display: none; }
.invisible { visibility: hidden; }
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* Transitions */
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* Z-Index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* ============================================
   MODERN COMPONENT HELPERS
   ============================================ */

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.2);
  color: var(--brand-light);
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success-light);
}

.badge-error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error-light);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-light);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-4) 0;
}

/* Avatar */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-lg);
  color: white;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--fs-sm);
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: var(--fs-xl);
}

/* Progress Bar */
.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 100%);
  border-radius: inherit;
  transition: width var(--transition-slow);
}

.progress-success .progress-bar {
  background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 100%);
}

.progress-warning .progress-bar {
  background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%);
}

.progress-error .progress-bar {
  background: linear-gradient(90deg, var(--error) 0%, var(--error-light) 100%);
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: var(--space-2) var(--space-3);
  background: var(--panel);
  color: var(--text);
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}
