* {
  box-sizing: border-box;
}

* {
  font-family: "Onest", sans-serif;
}

body {
  font-size: 1rem;
  line-height: 1.5;
  background-color: #ccc;
  padding: 20px;
  margin: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  width: 100%;
  max-height: calc(100vh - 40px);
  background-color: white;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e7edf4;
  border-radius: 8px 8px 0 0;
}

header h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 2.25rem;
}

nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0d151c;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #0a80ed;
}

.main-content {
  scroll-behavior: smooth;
  flex: 1;
  overflow-y: auto;
  padding: 1rem 2rem;
}

.main-content::-webkit-scrollbar {
  width: 6px;
  background-color: transparent;
}
.main-content::-webkit-scrollbar-thumb {
  background-color: #aaa;
  border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

#add-task-form {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-bottom: 1rem;
}

#task-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 2px solid #ccc;
  width: 400px;
  transition: all 0.3s ease;
}

#task-input:focus {
  border-color: #0a80ed;
  outline: none;
  transform: scale(1.03);
}

#add-task-btn {
  border: none;
  background-color: #0a80ed;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 24px;
  transition: all 0.3s ease;
}

#add-task-btn:hover {
  background-color: #0969c4;
  transform: translateY(-2px) scale(1.03);
  cursor: pointer;
}

#tasks {
  list-style: none;
  padding: 0;
  margin: 0;
}

#completed-tasks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.task-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.task-text-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;

  & p {
    margin: 0;
    font-weight: 500;
  }
}

.task-date {
  font-size: 0.875rem;
  color: #9ca3af;
}

.buttons {
  display: flex;
  gap: 0.5rem;
}

.complete-task,
.delete-task {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
}

.complete-task {
  background-color: #10b981;
  color: white;
  transition: all 0.3s ease;
}

.complete-task:hover {
  background-color: #059669;
  transform: translateY(-2px) scale(1.05);
}

.delete-task {
  background-color: #ef4444;
  color: white;
  transition: all 0.3s ease;
}

.delete-task:hover {
  background-color: #dc2626;
  transform: translateY(-2px) scale(1.05);
}

.no-tasks-message {
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
  margin-top: 1rem;
}
