:root {
  --primary: #4361ee;
  --secondary: #3a0ca3;
  --success: #4cc9f0;
  --danger: #bb000096;
  --danger-border: red;
  --warning: #fca3115c;
  --warning-border: orange;
  --info: #4895ef;
  --light: #f8f9fa;
  --dark: #212529;
  --background: #121212;
  --text: #e6e6e6;
  --card-bg: #1e1e1e;
  --border: #2d2d2d;
  --shadow: rgba(0, 0, 0, 0.3);
  --completed: #2d2d2d;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: var(--transition);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.note {
  color: red;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background-color: #080e2bdb;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
}

nav {
  display: flex;
  gap: 15px;
  align-items: center;
}

nav button {
  background: #00000033;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 20px;
  transition: var(--transition);
  border: 2px solid blue;
}

nav button:hover,
nav button.active {
  background-color: rgb(66, 22, 197);
}

.section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background-color: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

h1 {
  background: linear-gradient(90deg, #6400ff, #1fff43cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

h2,
h3 {
  margin-bottom: 15px;
  color: var(--primary);
}

.welcome-popup,
.edit-popup,
.confirmation-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.welcome-content,
.edit-content,
.confirmation-content {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.welcome-content h2,
.edit-content h2,
.confirmation-content h2 {
  margin-bottom: 20px;
  color: var(--primary);
}

input,
select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text);
  font-size: 16px;
}

button {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background-color: #2e38e191;
  color: white;
  border: 2px solid blue;
}

.btn-primary:hover {
  background-color: #3639ff;
}

.btn-danger {
  background-color: var(--danger);
  border: 2px solid var(--danger-border);
  color: white;
}

.btn-danger:hover {
  background-color: #f7012e;
}

.btn-success {
  background-color: #2e38e191;
  color: white;
  border: 2px solid blue;
}

.btn-success:hover {
  background-color: #3639ff;
}

.btn-warning {
  background-color: var(--warning);
  color: white;
  border: 2px solid var(--warning-border);
}

.btn-warning:hover {
  background-color: #e59400;
}

.task-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.task-form input,
.task-form select {
  flex: 1 1 200px;
}

.task-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--border);
  background-color: var(--card-bg);
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px var(--shadow);
}

.task-item.completed {
  background-color: var(--completed);
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: #6c757d;
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-weight: 600;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-time {
  color: var(--info);
  font-size: 14px;
}

.task-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.task-actions button {
  padding: 8px 12px;
  font-size: 14px;
}

.progress-container {
  margin: 30px 0;
}

.progress-bar {
  height: 20px;
  background-color: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.progress {
  height: 100%;
  background-color: #4462ff;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.history-item {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  background-color: var(--card-bg);
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px var(--shadow);
}

.history-date {
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 5px;
}

.history-task {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.profile-form {
  max-width: 500px;
  margin: 0 auto;
}

.profile-form input {
  margin-bottom: 20px;
}

.notification-permission {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: var(--warning);
  color: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 90;
  max-width: 300px;
  display: none;
}

.notification-permission button {
  margin-top: 10px;
  background-color: white;
  color: var(--warning);
  margin-right: 5px;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: #6c757d;
}

.empty-state i {
  font-size: 50px;
  margin-bottom: 15px;
  color: var(--border);
}

.days-completed {
  background-color: #01740061;
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
}

.days-summary {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.9;
}

/* Calendar Styles */
.calendar {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.calendar-title {
  font-size: 24px;
  font-weight: bold;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-weekday {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  background-color: var(--primary);
  color: white;
  border-radius: 5px;
}

.calendar-day {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}

.calendar-day.other-month {
  opacity: 0.3;
}

.calendar-day.completed {
  background-color: #01740061;
  color: white;
  border: 2px solid #00ac2e;
}
.calendar-day.today {
  background-color: #3224babf;
  border: 2px solid #0100ff;
}

.calendar-day.partial {
  background-color: #8d5c0dd1;
  color: white;
  border: 2px solid orange;
}

.calendar-day.has-tasks {
  background-color: #bb000096;
  color: white;
  border: 2px solid red;
}

.calendar-day.empty {
  background-color: var(--border);
}

.day-details {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  border: 2px solid var(--card-bg);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.confirmation-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* Calendar Legend Styles */
.calendar-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid;
}

.legend-text {
  font-size: 14px;
}

@media (max-width: 768px) {
  .task-form {
    flex-direction: column;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 10px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .notification-permission {
    left: 20px;
    right: 20px;
    bottom: 100px;
  }

  .calendar-day {
    height: 35px;
    font-size: 14px;
  }

  .confirmation-buttons {
    flex-direction: column;
  }

  .calendar-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

.welcome-popup,
.edit-popup,
.confirmation-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  backdrop-filter: blur(8px); /* This creates the blur effect */
  -webkit-backdrop-filter: blur(8px); /* Safari support */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.welcome-content,
.edit-content,
.confirmation-content {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}
