@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap");
:root {
  --background: #0f172a;
  --primary-color: #1e293b;
  --secondary-color: #475569;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --text-color: #f8fafc;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --low-priority: #10b981;
  --medium-priority: #f59e0b;
  --high-priority: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: "Jost", sans-serif;
  font-size: 16pt;
  color: var(--text-color);
}

body {
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 30px;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.date-text {
  font-size: 1rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats {
  display: flex;
  gap: 20px;
}

.counter {
  padding: 6px 15px;
  background: var(--primary-color);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

#completed-counter {
  color: var(--success-color);
  background: rgba(16, 185, 129, 0.1);
}

.wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

#todo-input {
  flex: 1;
  padding: 18px 25px;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid var(--secondary-color);
  border-radius: 12px;
  font: inherit;
  font-size: 1.1rem;
  color: var(--text-color);
  caret-color: var(--accent-color);
  transition: all 0.3s ease;
}

#todo-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#add-button {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  padding: 0 35px;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

#add-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.priority-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
}

.priority-selector span {
  color: var(--secondary-color);
  font-weight: 500;
}

.priority-buttons {
  display: flex;
  gap: 10px;
}

.priority-btn {
  padding: 8px 20px;
  background: var(--primary-color);
  border: 2px solid var(--secondary-color);
  border-radius: 20px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.priority-btn.active {
  border-color: var(--accent-color);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
}

.priority-btn[data-priority="low"].active {
  border-color: var(--low-priority);
  background: rgba(16, 185, 129, 0.1);
  color: var(--low-priority);
}

.priority-btn[data-priority="medium"].active {
  border-color: var(--medium-priority);
  background: rgba(245, 158, 11, 0.1);
  color: var(--medium-priority);
}

.priority-btn[data-priority="high"].active {
  border-color: var(--high-priority);
  background: rgba(239, 68, 68, 0.1);
  color: var(--high-priority);
}

.filter-section {
  display: flex;
  gap: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.filter-btn {
  flex: 1;
  padding: 12px;
  background: var(--primary-color);
  border: 2px solid transparent;
  border-radius: 10px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.todo {
  margin-bottom: 12px;
  padding: 20px;
  background: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  border-left: 4px solid var(--secondary-color);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.todo:hover {
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.todo[data-priority="low"] {
  border-left-color: var(--low-priority);
}

.todo[data-priority="medium"] {
  border-left-color: var(--medium-priority);
}

.todo[data-priority="high"] {
  border-left-color: var(--high-priority);
}

.todo .todo-text {
  flex-grow: 1;
  padding: 0 10px;
  cursor: pointer;
  transition: 200ms ease;
  word-break: break-word;
}

.todo-text.editing {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px;
}

.delete-button {
  padding: 8px;
  background: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.delete-button:hover {
  opacity: 1;
  transform: scale(1.1);
}

.delete-button:hover svg {
  fill: var(--danger-color);
}

.custom-checkbox {
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  min-height: 24px;
  min-width: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: 200ms ease;
  cursor: pointer;
}

input[type="checkbox"]:checked ~ .custom-checkbox {
  background-color: var(--accent-color);
}

input[type="checkbox"]:checked ~ .custom-checkbox svg {
  fill: var(--primary-color);
}

input[type="checkbox"]:checked ~ .todo-text {
  text-decoration: line-through;
  color: var(--secondary-color);
}

input[type="checkbox"] {
  display: none;
}

.priority-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.priority-indicator.low {
  background: var(--low-priority);
}

.priority-indicator.medium {
  background: var(--medium-priority);
}

.priority-indicator.high {
  background: var(--high-priority);
}

.footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
  flex: 1;
  padding: 12px;
  background: var(--primary-color);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.action-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.action-btn.danger {
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--secondary-color);
  display: none;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
  opacity: 0.5;
}

.instructions {
  margin-top: 30px;
  padding: 15px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  text-align: center;
  color: var(--accent-color);
  font-size: 0.9rem;
}

.instructions i {
  margin-right: 8px;
}

@media (max-width: 768px) {
  html {
    font-size: 14pt;
  }

  .container {
    padding: 20px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .header-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .input-group {
    flex-direction: column;
  }

  #add-button {
    width: 100%;
    justify-content: center;
    padding: 18px;
  }

  .priority-selector {
    flex-direction: column;
    align-items: flex-start;
  }

  .priority-buttons {
    width: 100%;
  }

  .priority-btn {
    flex: 1;
    text-align: center;
  }

  .filter-section {
    flex-wrap: wrap;
  }

  .filter-btn {
    min-width: calc(50% - 5px);
  }

  .footer-actions {
    flex-direction: column;
  }
}

@media (max-width: 500px) {
  html {
    font-size: 12pt;
  }

  h1 {
    font-size: 2rem;
  }

  .todo {
    padding: 15px;
  }

  .filter-btn {
    min-width: 100%;
  }
}
