/* Enhanced CSS with neon theme - Default Theme */
:root {
  --bg-dark: #050a05;
  --bg-mid: #0a100a;
  --surface: rgba(12, 18, 12, 0.92);
  --surface-strong: rgba(18, 28, 18, 0.96);
  --text: #4ade80;
  --text-bright: #51e2b3;
  --text-soft: #4a9b8f;
  --primary: #38d9a9;
  --secondary: #4dabf7;
  --accent: #f06595;
  --success: #40c057;
  --warning: #fab005;
  --border: rgba(56, 217, 169, 0.12);
  --shadow-lg: 0 0 50px rgba(56, 217, 169, 0.08);
  --shadow-md: 0 0 25px rgba(56, 217, 169, 0.05);
  --shadow-sm: 0 0 12px rgba(56, 217, 169, 0.03);
  --radius-xl: 12px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --max-width: 1220px;
  --anime-pink: #ff00c8;
  --anime-cyan: #00a8ff;
  --anime-gold: #ffff00;
  --anime-white: #00ff88;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-dark: #0a0518;
  --bg-mid: #1a0a3a;
  --surface: rgba(8, 4, 20, 0.98);
  --surface-strong: rgba(20, 8, 45, 0.98);
  --text: #f8f4ff;
  --text-bright: #ffd6ff;
  --text-soft: #d9c8ff;
  --primary: #e063ff;
  --secondary: #7b5cff;
  --accent: #ff8af6;
  --success: #83edff;
  --warning: #ffd35b;
  --border: rgba(232, 125, 255, 0.2);
  --shadow-lg: 0 0 80px rgba(224, 99, 255, 0.25);
  --shadow-md: 0 0 40px rgba(224, 99, 255, 0.15);
  --shadow-sm: 0 0 20px rgba(224, 99, 255, 0.1);
}

/* Blue Theme - Solid Blue with White Text */
[data-theme="blue"] {
  --bg-dark: #1e3a8a;
  --bg-mid: #1e40af;
  --surface: rgba(30, 58, 138, 0.95);
  --surface-strong: rgba(30, 64, 175, 0.98);
  --text: #ffffff;
  --text-bright: #f8fafc;
  --text-soft: #e2e8f0;
  --primary: #3b82f6;
  --secondary: #60a5fa;
  --accent: #93c5fd;
  --success: #10b981;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid));
  background-image: linear-gradient(135deg, var(--bg-dark), var(--bg-mid)), 
    repeating-linear-gradient(45deg, var(--primary) 0%, transparent 5px, var(--primary) 10px);
  overflow-x: clip;
  position: relative;
}

/* subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1;
}

/* Ensure theme variables are applied to body */
body[data-theme="dark"] {
  background: linear-gradient(135deg, #0a0518, #1a0a3a) !important;
}

body[data-theme="dark"]::after {
  display: none;
}

body[data-theme="blue"] {
  background: #1e3a8a !important;
}

body[data-theme="blue"]::after {
  display: none;
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 9999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.page-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--anime-pink), var(--anime-cyan));
  transition: width 0.2s ease;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(56, 217, 169, 0.9);
  color: #000;
  text-decoration: none;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: #fff;
}

/* subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1;
}
/* container for layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
/* links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
a:hover {
  color: var(--primary);
  text-shadow: var(--neon-shadow-green);
  text-decoration: underline;
}
/* buttons */
button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
}
button:hover {
  background: var(--anime-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
/* neon text helpers */
.explanation { color: rgba(97, 243, 255, 0.85); text-shadow: 0 0 6px rgba(97, 243, 255, 0.4); }
.instruction { color: rgba(240, 108, 255, 0.9); text-shadow: 0 0 6px rgba(240, 108, 255, 0.45); }
.acceptance { color: rgba(255, 217, 102, 0.95); text-shadow: 0 0 6px rgba(255, 217, 102, 0.4); }
.example-block { color: rgba(255, 255, 255, 0.95); text-shadow: 0 0 5px rgba(255, 255, 255, 0.35, 0.35); }
/* Matrix Hintergrund Animation */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1.0;
  will-change: transform;
}

/* Matrix Fall-Animation für Browser ohne Canvas-Unterstützung */
.matrix-fallback {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,255,0,0.05),
    rgba(0,255,0,0.05) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: matrixFall 8s linear infinite;
  z-index: 0;
}

@keyframes matrixFall {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0.2;
  }
}

/* Theme Selector UI */
.theme-selector {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
  flex-wrap: wrap;
}

.theme-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.theme-btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.theme-btn.active {
  background: var(--primary);
  color: #000;
  box-shadow: var(--shadow-md);
}

/* Blue theme specific overrides - Solid Blue with White Text */
[data-theme="blue"] #matrix-canvas,
[data-theme="blue"] .bg-orb {
  display: none;
}

[data-theme="blue"] body {
  background: #1e3a8a !important;
  background-color: #1e3a8a !important;
  background-image: none !important;
}

[data-theme="blue"] body::after {
  display: none;
}

[data-theme="blue"] .page-shell {
  background: transparent;
}

/* Blue Theme: Force white text on everything */
[data-theme="blue"],
[data-theme="blue"] body,
[data-theme="blue"] .site-header h1,
[data-theme="blue"] .site-header h1 span,
[data-theme="blue"] .lead,
[data-theme="blue"] .intro-card h2,
[data-theme="blue"] h2,
[data-theme="blue"] h3,
[data-theme="blue"] h4,
[data-theme="blue"] p,
[data-theme="blue"] li,
[data-theme="blue"] span,
[data-theme="blue"] a,
[data-theme="blue"] .day-banner h2,
[data-theme="blue"] .day-kicker,
[data-theme="blue"] .task-card,
[data-theme="blue"] .checkline,
[data-theme="blue"] .info-box h3,
[data-theme="blue"] .info-box p,
[data-theme="blue"] .intro-card,
[data-theme="blue"] .intro-card p,
[data-theme="blue"] .intro-card li,
[data-theme="blue"] .hero-chip,
[data-theme="blue"] .top-nav-link,
[data-theme="blue"] .week-nav-link,
[data-theme="blue"] code,
[data-theme="blue"] .sticky-note-panel,
[data-theme="blue"] .sticky-note-panel h2,
[data-theme="blue"] .sticky-note-panel p,
[data-theme="blue"] .sticky-note-panel li,
[data-theme="blue"] .note-hint {
  color: #ffffff !important;
  text-shadow: none !important;
}

[data-theme="blue"] .theme-btn {
  background: #3b82f6;
  color: #ffffff !important;
  border: 2px solid #ffffff;
}

[data-theme="blue"] .theme-btn.active {
  background: #1d4ed8;
}

/* Blue theme code blocks */
[data-theme="blue"] .example-block,
[data-theme="blue"] pre,
[data-theme="blue"] code {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
}

/* Blue theme surfaces */
[data-theme="blue"] .intro-card,
[data-theme="blue"] .task-card,
[data-theme="blue"] .day-banner,
[data-theme="blue"] .info-box,
[data-theme="blue"] .goal-box,
[data-theme="blue"] .week-nav-link,
[data-theme="blue"] .top-nav-link,
[data-theme="blue"] .hero-chip {
  background: rgba(30, 58, 138, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Layout Styles */
.page-shell {

  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 2rem 0;
}

.week-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.week-nav-link {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.week-nav-link:hover,
.week-nav-link.active {
  background: var(--primary);
  color: #000;
  box-shadow: var(--shadow-md);
}

.site-header {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-chip-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hero-chip {
  background: var(--surface-strong);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.site-header h1 {
  font-size: 3rem;
  margin: 1rem 0;
  color: var(--text-bright);
  text-shadow: 0 0 20px rgba(240, 108, 255, 0.3), 0 0 40px rgba(255, 138, 246, 0.18, 255, 0.3), 0 0 40px rgba(255, 138, 246, 0.18);
}

.site-header h1 span {
  color: var(--accent);
}

.lead {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 1.0);
  text-shadow: 
    0 0 5px rgba(255, 255, 255, 1.0),
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 15px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.6),
    0 0 25px rgba(255, 255, 255, 0.4);
  background: rgba(5, 10, 5, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 0 20px rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(5, 10, 5, 0.5);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.top-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  min-width: 120px;
  flex: 1 1 180px;
  max-width: 220px;
  text-align: center;
}

.top-nav-link:hover {
  background: var(--primary);
  color: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.top-nav-link span {
  font-size: 0.8rem;
  opacity: 0.8;
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-wrap: balance;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.intro-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.intro-card h2 {
  color: rgba(255, 0, 200, 0.95);
  text-shadow: 0 0 8px rgba(255, 0, 200, 0.7);
  margin-top: 0;
}

.content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  align-items: start;
}

.content-grid {
  flex: 1;
  min-width: 0;
}

.sticky-note-panel {
  position: sticky;
  top: 120px;
  width: 320px;
  align-self: start;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 140, 0, 0.20);
  border: 1px solid rgba(255, 140, 0, 0.65);
  box-shadow: 0 0 32px rgba(255, 140, 0, 0.32), inset 0 0 30px rgba(255, 140, 0, 0.15);
  color: #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sticky-note-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.22), rgba(255, 255, 255, 0));
  border-radius: inherit;
  filter: blur(10px);
}

.sticky-note-panel h2 {
  margin-top: 0;
  color: #ff3868;
  text-shadow: 0 0 8px rgba(255, 56, 104, 0.8);
}

.sticky-note-panel p,
.sticky-note-panel li {
  color: #fff;
}

.sticky-note-panel textarea {
  width: 100%;
  min-height: 200px;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

.sticky-note-panel textarea::placeholder {
  color: rgba(255, 56, 104, 0.65);
}

.sticky-note-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.note-hint {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #fff2d1;
  margin-bottom: 1rem;
}

.day-section {
  margin-bottom: 4rem;
}

.day-banner {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 2px solid var(--border);
  flex-wrap: wrap;
}

.day-badge {
  background: var(--primary);
  color: #000;
  padding: 1rem;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  min-width: 60px;
  text-align: center;
}

.day-kicker {
  color: #7ea8a2; /* adjusted for better readability */
  margin: 0;
  font-size: 0.9rem;
}

.day-banner h2 {
  margin: 0;
  color: var(--text-bright);
}

.goal-box {
  background: var(--surface-strong);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--success);
  margin-bottom: 2rem;
}

.task-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.task-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.task-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-bright);
}

.checkline input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
}

.task-number {
  background: var(--secondary);
  color: #000;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: bold;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.info-box {
  background: var(--surface-strong);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.info-box h3 {
  margin-top: 0;
  color: var(--text-bright);
}

.hint-box {
  background: var(--warning);
  color: #000;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border: 1px solid var(--border);
}

.example-block {
  background: var(--surface-strong);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border: 1px solid var(--border);
  font-family: monospace;
}

.example-block .example-label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

pre {
  background: #000;
  color: var(--text);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0.5rem 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.acceptance {
  background: var(--success);
  color: #000;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  border: 1px solid var(--border);
}

/* Background orbs for Woche 2 */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(240,108,255,0.35), rgba(255, 255, 255, 0));
  top: 8%;
  left: 8%;
  animation: float 6s ease-in-out infinite;
}

.orb-2 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(97,243,255,0.28), rgba(255, 255, 255, 0));
  top: 58%;
  right: 6%;
  animation: float 8s ease-in-out infinite reverse;
}

.orb-3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 217, 102,0.28), rgba(255, 255, 255, 0));
  bottom: 18%;
  left: 55%;
  animation: float 10s ease-in-out infinite;
}

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

/* Day themes with unique neon colors */
.day-theme-1 {
  border-left-color: rgba(255, 0, 255, 0.8);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.day-theme-1 .day-badge {
  background: rgba(255, 0, 255, 0.9);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.8), 0 0 30px rgba(255, 0, 255, 0.4);
}

.day-theme-2 {
  border-left-color: rgba(255, 128, 0, 0.8);
  box-shadow: 0 0 20px rgba(255, 128, 0, 0.3);
}

.day-theme-2 .day-badge {
  background: rgba(255, 128, 0, 0.9);
  box-shadow: 0 0 15px rgba(255, 128, 0, 0.8), 0 0 30px rgba(255, 128, 0, 0.4);
}

.day-theme-3 {
  border-left-color: rgba(255, 0, 64, 0.8);
  box-shadow: 0 0 20px rgba(255, 0, 64, 0.3);
}

.day-theme-3 .day-badge {
  background: rgba(255, 0, 64, 0.9);
  box-shadow: 0 0 15px rgba(255, 0, 64, 0.8), 0 0 30px rgba(255, 0, 64, 0.4);
}

.day-theme-4 {
  border-left-color: rgba(0, 255, 255, 0.8);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.day-theme-4 .day-badge {
  background: rgba(0, 255, 255, 0.9);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content {
    flex-direction: column;
  }

  .sticky-note-panel {
    position: relative;
    top: auto;
    width: 100%;
  }

  .page-shell {
    padding: 1rem 0;
  }

  .site-header h1 {
    font-size: 2.5rem;
  }

  .lead {
    font-size: 1rem;
    padding: 0.8rem;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .day-banner {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .task-card {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding: 0.5rem 0;
  }

  .hero-chip-row {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .hero-chip {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .top-nav {
    gap: 0.5rem;
  }

  .top-nav-link {
    min-width: 0;
    max-width: none;
    flex: 1 1 calc(50% - 0.5rem);
    padding: 0.8rem;
  }

  .week-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .week-nav-link {
    padding: 0.4rem 0.8rem;
  }

  .day-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .day-badge {
    font-size: 1.2rem;
    padding: 0.8rem;
  }

.info-grid {
    grid-template-columns: 1fr;
  }

  .day-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    flex-wrap: wrap;
  }

  .site-header h1 {
    font-size: 2rem;
  }

  .lead {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .intro-card {
    padding: 1.5rem;
  }

  .task-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .task-card {
    padding: 1rem;
  }

  .info-box {
    padding: 0.8rem;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  .theme-selector {
    gap: 0.3rem;
  }

  .theme-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .bg-orb {
    display: none;
  }

  #matrix-canvas {
    opacity: 0.5;
  }

  /* Weitere mobile Anpassungen für bessere Lesbarkeit */
  .day-section {
    margin-bottom: 2rem;
  }

  .day-banner h2 {
    font-size: 1.5rem;
  }

  .goal-box {
    padding: 1rem;
  }

  .task-list {
    gap: 0.5rem;
  }

  .task-card {
    padding: 0.75rem;
  }

  .task-top {
    margin-bottom: 0.5rem;
  }

  .checkline {
    font-size: 0.9rem;
  }

  .task-number {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }

  .info-box {
    padding: 0.5rem;
  }

  .info-box h3 {
    font-size: 1rem;
  }

  .hint-box {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .example-block {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .acceptance {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .sticky-note-panel {
    padding: 1rem;
  }

  .sticky-note-panel h2 {
    font-size: 1.2rem;
  }

  .sticky-note-panel p,
  .sticky-note-panel li {
    font-size: 0.9rem;
  }

  .sticky-note-panel textarea {
    font-size: 0.85rem;
    padding: 0.75rem;
  }

  .note-hint {
    font-size: 0.8rem;
  }

  /* Reduziere allgemeine Schriftgrößen für mobile */
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  h4 {
    font-size: 1.1rem;
  }

  p {
    font-size: 0.9rem;
  }

  li {
    font-size: 0.9rem;
  }

  code {
    font-size: 0.85rem;
  }

  pre {
    font-size: 0.85rem;
  }
}

/* Extra small screens - phones */
@media (max-width: 480px) {
  .page-shell {
    padding: 0.25rem 0;
  }

  .site-header h1 {
    font-size: 1.5rem;
  }

  .lead {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .hero-chip {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .top-nav {
    gap: 0.4rem;
  }

  .top-nav-link {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  .top-nav-link span {
    font-size: 0.7rem;
  }

  .week-nav-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .intro-card {
    padding: 1rem;
  }

  .intro-card h2 {
    font-size: 1.2rem;
  }

  .day-banner {
    padding: 0.75rem;
  }

  .day-badge {
    font-size: 1rem;
    padding: 0.6rem;
  }

  .day-banner h2 {
    font-size: 1.2rem;
  }

  .task-card {
    padding: 0.2rem;
  }

  .task-number {
    font-size: 0.7rem;
    padding: 0.15rem 0.3rem;
  }

  .checkline {
    font-size: 0.8rem;
  }

  .info-box {
    padding: 0.3rem;
  }

  .info-box h3 {
    font-size: 0.8rem;
  }

  .info-box p {
    font-size: 0.8rem;
  }

  .hint-box {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .example-block {
    padding: 0.5rem;
    font-size: 0.8rem;
    margin: 0.5rem 0;
  }

  pre {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .acceptance {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .goal-box {
    padding: 0.75rem;
  }

  .sticky-note-panel {
    padding: 0.75rem;
  }

  .sticky-note-panel h2 {
    font-size: 1rem;
  }

  .sticky-note-panel p,
  .sticky-note-panel li {
    font-size: 0.8rem;
  }

  .sticky-note-panel textarea {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .note-hint {
    font-size: 0.7rem;
  }

  .back-to-top {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }

  .theme-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
  }

  /* Weitere Reduzierungen für sehr kleine Bildschirme */
  body {
    font-size: 12px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  h4 {
    font-size: 0.95rem;
  }

  p {
    font-size: 0.85rem;
  }

  li {
    font-size: 0.85rem;
  }

  code {
    font-size: 0.8rem;
  }

  pre {
    font-size: 0.8rem;
  }

  .task-list {
    gap: 0.25rem;
  }

  .info-grid {
    gap: 0.25rem;
  }

  .day-kicker {
    font-size: 0.8rem;
  }

  .day-section {
    margin-bottom: 1.5rem;
  }

  .content {
    gap: 1rem;
  }

  .task-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .checkline {
    font-size: 0.8rem;
  }
}


/* Mobile overflow fixes for long task content */
.content,
.content-grid,
.content-main,
.day-section,
.task-list,
.task-card,
.day-banner,
.info-grid,
.info-box,
.example-block,
.goal-box,
.checkline,
.top-nav-link {
  min-width: 0;
}

.day-banner > div,
.task-top > *,
.checkline span,
.day-banner h2,
.day-kicker,
.goal-box,
.task-card p,
.task-card li,
.example-label,
.example-block code,
pre code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.checkline {
  align-items: flex-start;
}

.checkline input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.checkline span {
  flex: 1 1 auto;
  min-width: 0;
}

.task-number {
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .content {
    gap: 1rem;
    padding-inline: 0.75rem;
  }

  .container,
  .content-grid,
  .content-main,
  .day-section,
  .task-list,
  .task-card,
  .goal-box,
  .example-block,
  .info-box,
  .day-banner,
  .sticky-note-panel {
    width: 100%;
    max-width: 100%;
  }

  .task-top {
    flex-direction: column;
    align-items: stretch;
  }

  .task-number {
    align-self: flex-start;
  }

  .checkline {
    width: 100%;
  }

  .day-banner > div {
    width: 100%;
  }

  .day-banner h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .task-card,
  .goal-box,
  .example-block,
  .hint-box,
  .acceptance,
  .info-box {
    overflow: hidden;
  }

  pre {
    max-width: 100%;
    font-size: 0.82rem;
  }

  table,
  audio,
  video,
  iframe,
  img {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .content {
    padding-inline: 0.5rem;
  }

  .task-card {
    padding: 0.85rem;
  }

  .day-banner h2 {
    font-size: 1.2rem;
  }

  .checkline {
    font-size: 0.85rem;
  }

  .task-number {
    font-size: 0.72rem;
  }

  pre {
    font-size: 0.78rem;
    padding: 0.75rem;
  }
}


/* === FINAL MOBILE FIX (GOAL BOX + GRID CONSISTENCY) === */

.goal-box {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem 0;
}

@media (max-width: 768px) {
  .goal-box {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .task-list,
  .info-grid,
  .intro-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .task-card,
  .info-box,
  .intro-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  .goal-box {
    padding: 0.2rem;
    margin-bottom: 0.25rem;
    border-radius: var(--radius-md);
  }
}
