body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  color: #222;
  position: relative;
  overflow-x: hidden;
  background: #f5f7fa;
}
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 30% 30%, #f08c7d40 0%, #f5f7fa 70%);
  background-size: cover;
  filter: blur(2px);
  width: 100vw;
  height: 100vh;
}
.todo-game-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.75);
  border-radius: 28px;
  box-shadow: 0 8px 32px #f08c7d22, 0 2px 12px #00000010;
  padding: 36px 24px 28px 24px;
  width: 420px;
  max-width: 98vw;
  margin: 48px auto 24px auto;
  backdrop-filter: blur(8px);
  border: 1.5px solid #f08c7d33;
  box-sizing: border-box;
  text-align: center;
  transition: box-shadow 0.2s;
}
h1 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 2em;
  font-weight: 700;
  color: #38414b;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 #fff, 0 4px 12px #f08c7d22;
}
form {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
input[type="text"], input[type="number"] {
  padding: 9px 10px;
  border: 1.5px solid #f08c7d33;
  border-radius: 8px;
  font-size: 1em;
  background: #fff;
  outline: none;
  font-family: inherit;
}
input[type="text"] {
  flex: 1 1 60%;
}
input[type="number"] {
  width: 100px;
}
button[type="submit"], .reset-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(90deg, #f08c7d 60%, #f5a623 100%);
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #f08c7d11;
}
button[type="submit"]:hover, .reset-btn:hover {
  background: linear-gradient(90deg, #38414b 60%, #f08c7d 100%);
}
ul#todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 2px 12px #f08c7d11, 0 1px 4px #0001;
  transition: background 0.2s, box-shadow 0.2s;
  flex-wrap: wrap;
  position: relative;
  border: 1.5px solid #f08c7d22;
  animation: pop 0.22s;
}
li.completed {
  background: #e6fbe8;
  border: 1.5px solid #3bb27344;
  opacity: 0.8;
}
li.timer-ended {
  background: #f8d7da;
  border: 1.5px solid #f5c2c7;
  animation: shake 0.4s;
}
@keyframes pop {
  0% { transform: scale(1.13);}
  100% { transform: scale(1);}
}
@keyframes shake {
  0% { transform: translateX(0);}
  25% { transform: translateX(-4px);}
  50% { transform: translateX(4px);}
  75% { transform: translateX(-4px);}
  100% { transform: translateX(0);}
}
.task-left {
  display: flex;
  align-items: center;
  flex: 1 1 60%;
  min-width: 180px;
}
.checkbox {
  margin-right: 10px;
  accent-color: #3bb273;
  width: 1.1em;
  height: 1.1em;
}
.task-text {
  word-break: break-word;
  font-size: 1.07em;
  font-weight: 500;
}
.task-timer {
  margin-left: 12px;
  font-family: monospace;
  font-weight: 600;
  color: #f08c7d;
  min-width: 70px;
  text-align: center;
}
.task-actions {
  display: flex;
  gap: 6px;
  flex: 1 1 35%;
  justify-content: flex-end;
  min-width: 120px;
  margin-top: 8px;
}
.task-actions button {
  padding: 4px 8px;
  border: none;
  border-radius: 5px;
  font-size: 0.98em;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  background: #f08c7d;
  transition: background 0.15s;
}
.task-actions button:hover {
  background: #38414b;
}
.edit-btn {
  background: #f08c7d;
}
.delete-btn {
  background: #38414b;
}
.start-btn {
  background: #3bb273;
}
.pause-btn {
  background: #f5a623;
}
.reset-btn {
  background: #bbb;
  color: #333;
}
.save-btn {
  background: #3bb273;
}
.cancel-btn {
  background: #bbb;
  color: #333;
}
.edit-input {
  flex: 1 1 60%;
  padding: 6px 8px;
  font-size: 1em;
  border-radius: 6px;
  border: 1.5px solid #f08c7d33;
  min-width: 120px;
}
.edit-timer-input {
  width: 60px;
  margin-left: 6px;
  border-radius: 6px;
  border: 1.5px solid #f08c7d33;
  padding: 6px 8px;
  font-size: 1em;
}
.game-status {
  margin-top: 16px;
  font-size: 1.13em;
  color: #3bb273;
  font-weight: 700;
  min-height: 28px;
}
#confetti-canvas {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
  display: none;
}
footer {
  text-align: center;
  color: #888;
  font-size: 0.97em;
  margin-bottom: 10px;
  z-index: 1;
  position: relative;
}
@media (max-width: 600px) {
  .todo-game-card {
    padding: 10px 2vw;
    width: 99vw;
  }
  li {
    flex-direction: column;
    align-items: flex-start;
  }
  .task-actions {
    justify-content: flex-start;
    width: 100%;
    margin-top: 10px;
  }
  .task-timer {
    margin-left: 0;
    margin-top: 6px;
  }
}
