:root {
  --primary-color: #4a6fa5;
  --secondary-color: #6b8cae;
  --accent-color: #ff7e5f;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --success-color: #4caf50;
  --warning-color: #ff9933;
  --danger-color: #bb3333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: var(--dark-color);
  line-height: 1.5;
  padding-top: 60px;
  padding-bottom: 60px;
  min-height: 100vh;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-content {
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 100%;
  margin: 0 auto;
}

h1 {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.2rem;
  margin-right: 10px;
}

.total-progress {
  display: flex;
  align-items: center;
  background-color: #e9ecef;
  border-radius: 20px;
  height: 10px;
  flex-grow: 1;
  max-width: 200px;
  overflow: hidden;
}

.total-progress-bar {
  height: 100%;
  width: 0%;
  transition: width 0.5s ease;
}

.total-percent {
  margin-left: 5px;
  font-weight: 600;
  min-width: 30px;
  text-align: right;
  transition: color 0.3s;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

.category {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.category:hover {
  transform: translateY(-3px);
}

.category-header {
  background-color: var(--primary-color);
  color: white;
  padding: 5px 10px;
  font-size: 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.category-title {
  display: flex;
  align-items: center;
}

.category-progress {
  display: flex;
  align-items: center;
}

.category-percent {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.9rem;
  margin-left: 10px;
  transition: all 0.3s;
  width: 60px;
  text-align: center;
}

.category-header::before {
  content: "▶";
  margin-right: 10px;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.category-header.active::before {
  transform: rotate(90deg);
}

.subcategory {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}

.subcategory:last-child {
  border-bottom: none;
}

.subcategory-header {
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  margin-bottom: 0px;
  position: relative;
  padding-left: 24px;
  min-height: 24px;
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.check-item:hover .checkmark {
  background-color: #ddd;
  transform: scale(1.05);
}

.check-item input:checked~.checkmark {
  background-color: var(--success-color);
  animation: checkAnim 0.4s ease;
}

@keyframes checkAnim {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-item input:checked~.checkmark:after {
  display: block;
}

.check-item label {
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

.check-item input:checked~label {
  color: #888;
  text-decoration: line-through;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
  padding: 10px 25px;
  z-index: 100;
}

.actions {
  display: flex;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
}

@media (max-width: 300px) {
  body {
    padding-top: 100px;
    padding-bottom: 70px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 15px;
  }

  h1 {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }

  .total-progress {
    max-width: 100%;
  }

  .checklist {
    grid-template-columns: 1fr;
  }

  button {
    padding: 5px 10px;
    font-size: 0.9rem;
  }

  .category-percent {
    display: none;
  }
}