*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  background-color: lab(63.43% 16.91 -55.13);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  color: hsl(0, 0%, 0%);
  font-family: "MS Sans Serif", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.container {
  max-width: 500px;
  width: 100%;
  animation: fadeSlideIn 0.6s ease-out;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.data-controls {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.small-btn {
  background: #94e8e8;
  color: #52200a;
  border: none;
  padding: 6px 10px;
  font-family: inherit;
  font-weight: bold;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  display: inline-block;
}

.small-btn:hover {
  background: hwb(113 16% 18%);
}

h1 {
  font-size: 3.5rem;
  letter-spacing: 2px;
  margin-bottom: 4px;
  text-shadow: 0 0 18px rgba(82, 9, 26, 0.35);
}

.subtitle {
  color: hwb(0 0% 100%);
  margin-bottom: 20px;
  font-style: italic;
}

.how-it-works {
  background: rgba(255, 255, 255, 0.25);
  border: 1px dashed hsl(295, 47%, 56%);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.how-it-works summary {
  cursor: pointer;
  font-weight: bold;
  color: #52091a;
}

.how-it-works p {
  margin-top: 8px;
  color: hsl(295, 20%, 25%);
  line-height: 1.5;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

input, select {
  background: lab(80.06% 31.29 0.88);
  border: 1px solid hsl(15, 100%, 50%);
  color: hsl(0, 0%, 0%);
  padding: 12px;
  font-family: MS Sans Serif;
  font-size: 1rem;
  border-radius: 4px;
}

input:focus, select:focus {
  outline: none;
  border-color: hwb(130 2% 65%);
}

.estimate-row {
  display: flex;
  gap: 8px;
}

.estimate-row input {
  flex: 2;
}

.estimate-row select {
  flex: 1;
}

button {
  background: #94e8e8;
  color: #52200a;
  border: none;
  padding: 12px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

button:hover {
  background: hwb(113 16% 18%);
}

.task {
  background: hsl(21, 73%, 53%);
  border: 1px solid #ff5425;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 18px;
  animation: fadeSlideIn 0.35s ease-out;
}

.task-urgent {
  border: 2px solid #ffb300;
}

.task-overdue {
  border: 2px solid #e30a0a;
}

.task-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.task-estimate {
  color: #ff0000;
  font-size: 0.9rem;
}

.task-gap {
  font-weight: bold;
  color: lch(30.57% 35.56 113.68);
  margin-top: 4px;
}

.task-distraction {
  color: #52091a;
  font-size: 0.8rem;
  margin-top: 2px;
  font-style: italic;
}

.category-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.category-stat {
  background: hwb(212 48% 22%);
  border: 1px solid hsl(32, 100%, 44%);
  color: #0d4aba;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
}

.task button {
  margin-top: 8px;
}

#stats {
  margin-bottom: 20px;
}

.stats-empty {
  color: #999797;
  font-size: 0.9rem;
  font-style: italic;
}

.mood-line {
  color: hsl(295, 47%, 40%);
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 6px;
}

.stats-headline {
  color: #52091a;
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(82, 9, 26, 0.25);
}

.stats-example {
  color: hsl(148, 99%, 65%);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.stats-dread {
  color: hsl(295, 20%, 45%);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.stats-locked {
  color: hsl(295, 10%, 55%);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 8px;
}

.stats-irony {
  color: #52200a;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

#prediction {
  color: #999;
  font-size: 0.85rem;
  min-height: 1.2rem;
}

.task-empty {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

.task button {
  margin-right: 8px;
}

.delete-btn {
  background: transparent;
  color: #efecec;
  border: 1px solid #9b18ff;
}

.delete-btn:hover {
  color: #e30a0a;
  border-color: #bb2442;
}

.field-label {
  color: hsl(295, 47%, 56%);
  font-size: 0.9rem;
  margin-bottom: -6px;
}

#weekly-check {
  margin-bottom: 20px;
}

.weekly-title {
  color: #52091a;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.weekly-line {
  color: hsl(109, 100%, 50%);
  font-size: 0.85rem;
}

.weekly-line-good {
  color: hsl(200, 100%, 40%);
  font-size: 0.85rem;
}

#trend {
  margin-bottom: 20px;
}

.trend-title {
  color: #52091a;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.trend-line {
  color: hsl(295, 20%, 45%);
  font-size: 0.85rem;
}

#day-total {
  margin-bottom: 16px;
}

.day-total-line {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.day-total-realistic {
  color: #52091a;
  font-weight: bold;
}

.task-procrastination {
  color: lch(30.57% 35.56 113.68);
  font-size: 0.85rem;
  margin-top: 2px;
}

.task-timer {
  font-weight: bold;
  color: #be0d0d;
  font-size: 0.99rem;
  margin-top: 4px;
}

.history-toggle {
  width: 100%;
  background: transparent;
  color: hsl(295, 47%, 56%);
  border: 1px dashed hsl(295, 47%, 56%);
  margin-top: 8px;
  font-size: 0.85rem;
}

.history-toggle:hover {
  background: rgba(0,0,0,0.05);
}
