/* General Body & Typography */
body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background-color: #f8f9fa; /* Neutral light gray background */
  color: #212529;
  margin: 0;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
#page-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #dee2e6; /* Neutral border */
}

#page-header h1 {
  font-size: 4rem; /* Slightly larger */
  font-weight: 800; /* A bit bolder */
  color: #d90429; /* Fallback color - strong red */

  /* Gradient Text */
  background-image: linear-gradient(
    45deg,
    #d90429,
    #a4031f
  ); /* Strong Red Cross gradient */
  background-clip: text;
  -webkit-background-clip: text; /* For Safari */
  color: transparent;

  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  margin: 0;
}

#current-date {
  font-size: 1.25rem;
  font-weight: 500;
  color: #6c757d; /* Standard neutral grey for secondary text */
  margin-top: 8px;
  margin-bottom: 0;
}

/* Main Content Container */
#content {
  max-width: 900px;
  margin: 0 auto;
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

#progress-indicator {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: #6c757d;
  margin-bottom: 24px;
  transition: opacity 0.5s ease;
}

#progress-indicator.dots::after {
  content: "...";
  display: inline-block;
  width: 20px;
  text-align: left;
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

#progress-indicator.pulse {
  animation: pulse 2s infinite ease-in-out;
}

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

/* Task Section Styling (Card-based) */
.task-section {
  background-color: #ffffff;
  border: 1px solid #dee2e6; /* Neutral border */
  border-radius: 12px;
  margin-bottom: 24px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.task-section:hover {
  box-shadow: 0 8px 24px rgba(217, 4, 41, 0.1); /* Subtle red-tinted shadow */
  transform: translateY(-2px);
}

/* Restored h2 styling */
.task-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #a4031f; /* Darker, serious red for headers */
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #f1f3f5;
  padding-bottom: 12px;
}

/* NEW: "All Done" Message Styling */
.all-done-message {
  text-align: center;
  padding: 40px 24px;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.all-done-message h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #a4031f; /* Using the theme's dark red */
  margin-top: 0;
  margin-bottom: 16px;
}

.all-done-message p {
  font-size: 1.2rem;
  color: #6c757d;
  margin: 0;
}
/* NEW: Container for the button at the end of a task section */
.task-button-container {
  margin-top: 20px;
  text-align: right; /* Default alignment for the link button */
}

/* NEW: Shared Button Styles */
.task-link-button,
.retry-button {
  display: inline-block;
  padding: 7px 15px; /* Padding angepasst für 1px Rahmen */
  background-color: transparent; /* Outline-Stil für ein dezenteres Aussehen */
  color: #a4031f; /* Verwendung des dunkleren, subtileren Rots für den Text */
  border: 1px solid #dee2e6; /* Passt zum neutralen Rahmen der Karte */
  text-decoration: none;
  font-family: inherit; /* Ensure buttons inherit the page font */
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease-in-out; /* Sanfter Übergang für alle Eigenschaften */
  white-space: nowrap; /* Prevent text wrapping */
}

.retry-button {
  cursor: pointer; /* Add pointer cursor for the button element */
  background-color: #d90429; /* Strong red background to make it stand out */
  color: #ffffff; /* White text for contrast */
  border-color: #d90429; /* Matching border color */
}

.task-link-button:hover,
.retry-button:hover {
  background-color: #a4031f; /* Darker red on hover */
  color: #ffffff; /* Weißer Text für den Kontrast */
  border-color: #a4031f; /* Rahmenfarbe passt sich beim Hover an */
  transform: translateY(-1px); /* Beibehaltung des leichten Anhebe-Effekts */
}

/* Task List Styling */
.task-section ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.task-section li {
  font-size: 1rem;
  padding: 14px 18px;
  margin-bottom: 10px;
  border-radius: 8px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
  /* Damit langer Text umbricht und die Box vergrößert */
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: manual;
}

.task-section li:last-child {
  margin-bottom: 0;
}

.task-section li:hover {
  background-color: #f1f3f5;
}

/* Add a decorative element before each task item */
.task-section li::before {
  content: "→";
  margin-right: 12px;
  color: #d90429; /* Strong red for the arrow */
  font-weight: bold;
  flex-shrink: 0; /* Verhindert, dass der Pfeil schrumpft */
}

/* Responsive Design for Mobile Devices */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  #page-header h1 {
    font-size: 2rem;
  }

  #current-date {
    font-size: 1rem;
  }

  .task-section {
    padding: 20px;
  }

  .task-section h2 {
    font-size: 1.5rem;
  }

  .task-section li {
    padding: 12px 16px;
  }

  .task-link-button,
  .retry-button {
    padding: 12px 20px; /* Larger touch targets for mobile */
    width: 100%; /* Full width buttons on mobile feel more native */
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  #page-header h1 {
    font-size: 1.75rem;
  }

  #current-date {
    font-size: 0.9rem;
  }

  /* The button is now at the bottom, so header stacking rules are no longer needed. */
  /* The button container is already right-aligned, which works well on mobile too. */

  .task-section h2 {
    font-size: 1.3rem;
  }

  .task-section li {
    font-size: 0.95rem;
  }

  #progress-indicator {
    font-size: 1rem;
    padding: 0 10px;
  }
}
