/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f5f7fb;
  color: #333;
  padding: 0;
  min-height: 100vh;
}

/* Theme */
:root {
  --indigo: #4b0082;
  --indigo-light: #6a0dad;
  --white: #ffffff;
  --gray-light: #f0f0f0;
  --text-dark: #1c1c1c;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --radius: 10px;
}

/* Header */
.header {
  background: transparent;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: black;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.header-text {
  font-size: 2rem;
  font-weight: 600;
}

/* Add Button */
.add-btn {
  background: white;
  color: var(--indigo);
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.add-btn:hover {
  background: var(--indigo-light);
  color: white;
  transform: rotate(90deg);
}

/* Form */
.form-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 1.2rem;
  animation: fadeIn 0.3s ease forwards;
  margin-bottom: 2rem;
  border: 1px solid #ddd;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.form-container input,
.form-container select,
.form-container textarea {
  padding: 0.85rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  background-color: #fff;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-container button {
  background: var(--indigo);
  color: white;
  padding: 0.9rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.form-container button:hover {
  background: var(--indigo-light);
}

/* Cards */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px;
}

/* Individual Task Card */
.task-card {
  background: var(--white);
  padding: 1.5rem;
  border-left: 4px solid var(--indigo);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  width: 100%;
}

.task-card:hover {
  transform: translateY(-2px);
}

.task-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.task-desc {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.task-meta {
  font-size: 0.85rem;
  color: #999;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* Priority Badges */
.priority-high {
  color: #e53935;
  font-weight: 600;
}

.priority-medium {
  color: #ff9800;
  font-weight: 600;
}

.priority-low {
  color: #43a047;
  font-weight: 600;
}

/* Task Actions */
.task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.task-actions button {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.task-actions button:first-child {
  background-color: #009900;
  color: #fff;
}

.task-actions button:first-child:hover {
  background-color: #007700;
}

.task-actions button:last-child {
  background-color: #990000;
  color: #fff;
}

.task-actions button:last-child:hover {
  background-color: #770000;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
