:root {
  /* Light theme colors */
  --bg-color: #fafafa;
  --text-color: #494C6B;
  --text-secondary: #9495A5;
  --border-color: #e3e4f1;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --input-bg: #ffffff;
  --todo-bg: #ffffff;
  --footer-border: #f4f5fa;
  --todo-text: #494C6B;
  --completed-text:#D1D2DA;
  
  /* Light theme gradient colors */
  --gradient-start: #AC2DEB;
  --gradient-end: #5596FF;
}

[data-theme="dark"] {
  /* Dark theme colors */
  --bg-color: #171823;
  --text-color: #C8CBE7;
  --text-secondary: #767992;
  --border-color: #393A4B;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --input-bg: #25273D;
  --todo-bg: #25273D;
  --footer-border: #393A4B;
  --todo-text: #C8CBE7;
  --completed-text: #4D5067;

  /* Dark theme gradient colors */
  --gradient-start: #3710BD;
  --gradient-end: #A42395;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  position: relative;
}

/* Background */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 35vh;
  background: url("/images/background-image.png") no-repeat center/cover;
  z-index: -1;
}

.background::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 35vh;
  background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
  opacity: 0.7;
  z-index: 1;
  transition: background 0.5s ease;
}
.background::after {
  content: "";
  position: fixed;
  top: 35vh;
  left: 0;
  width: 100%;
  height: 65vh;
  background: var(--bg-color);
  z-index: -1;
  transition: background-color 0.5s ease;
}

/* Content */
.container {
  top: 50px;
  margin: 0 auto;
  width: 90%;
  max-width: 540px;
  border-radius: 10px;
  padding: 20px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.container .title {
  margin: 0;
  font-size: 40px;
  font-weight: bold;
  letter-spacing: 15px;
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
}
.container .title-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin: 0;
}
.container .theme-toggle {
  background: transparent;
  position: relative;
  border: none;
  cursor: pointer;
  padding: 0;
}

.container .theme-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Input container */
.input-container {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--input-bg);
  border-radius: 5px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

/* Umumiy checkbox stillari */
.checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border 0.3s ease;
}

.todo-item .checkbox {
  margin-top: 2px;
}
.todo-item.dragging {
  opacity: 0.6;
  cursor: grabbing;
  transform: scale(1.01);
  z-index: 1000;
  border: 1px dashed #ac2deb;
  transition: all 0.2s ease;
}

.todo-item {
  cursor: pointer;
  transition: all 0.2s ease;
}

.todo-item:active {
  cursor: grabbing;
}

.checkbox:hover {
  border: 2px solid #ac2deb;
}

.checkbox.checked {
  background: linear-gradient(135deg, #ac2deb, #5596ff);
  border-color: transparent;
}

.checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.input-container input {
  flex: 1;
  border: none;
  outline: none;
  background-color: var(--input-bg);
  font-size: 18px;
  font-weight: 400;
  line-height: 100%;
  font-family: 'Josefin Sans', sans-serif;
  color: #9495A5;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.input-container input::placeholder {
  color: #9495a5;
}

/* Todo list */
.todo-list {
  background: var(--todo-bg);
  border-radius: 5px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border-bottom: 1px solid var(--footer-border);
  transition: border-color 0.5s ease;
  min-height: 60px;
}

.todo-item:last-child {
  border-bottom: none;
}



.todo-item .todo-text {
  flex: 1;
  font-family: 'Josefin Sans', sans-serif;
  color: var(--todo-text);
  font-size: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.4;
  padding-right: 10px;
}

.todo-item.completed .todo-text {
  /* text decoration line-through */
  /* text-decoration: line-through; */
  color: var(--completed-text);
}
.todo-item .remove-todo {
  cursor: pointer;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: border 0.3s ease;
}
.todo-item .remove-todo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.todo-item .remove-todo:hover {
  scale: 1.1;
  transition: scale 0.3s ease;
}
/* List footer inside todo-list */
.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  color: #9495a5;
  font-size: 14px;
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Filters */
.list-footer .filters {
  display: flex;
  gap: 20px;
}

.items-left {
  font-family: 'Josefin Sans', sans-serif;
  color: #9495A5;
  font-weight: 400;
  font-size: 14px;
}

/* Filters container */
.filters-container {
  background: var(--todo-bg);
  border-radius: 5px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: none;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.filters-container .filters {
  display: flex;
  justify-content: center;
  gap: 20px;
}

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

.filter {
  cursor: pointer;
  transition: color 0.3s;
  font-family: 'Josefin Sans', sans-serif;
  color: #9495A5;
  font-size: 14px;
  font-weight: 700;
}

.filter:hover {
  color: #494C6B;
}

.filter.active {
  color: #3a7bfd;
  font-weight: 600;
}

/* Dark theme uchun active filter */
[data-theme="dark"] .filter.active {
  color: #3a7bfd;
}

.clear-completed {
  cursor: pointer;
  transition: color 0.3s;
}

.clear-completed:hover {
  color: #494c6b;
}

/* Drag and drop text */
.drag-drop-text {
  text-align: center;
  color: #9495a5;
  font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 15px;
    gap: 15px;
  }
  
  .container .title {
    font-size: 32px;
    letter-spacing: 10px;
  }
  
  .list-footer {
    display: flex;
    gap: 15px;
    text-align: center;
  }
  
  /* Filters container */
  .filters-container {
    display: block;
  }
  
  .filters-container .filters {
    gap: 30px;
  }
  
  /* Filters */
  .list-footer .filters {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    width: 98%;
    padding: 10px;
    gap: 10px;
  }
  
  .container .title {
    font-size: 28px;
    letter-spacing: 8px;
  }
  
  .input-container,
  .todo-item {
    padding: 15px;
  }
  
  .todo-item {
    align-items: flex-start;
    gap: 12px;
  }
  
  .todo-item .todo-text {
    font-size: 14px;
    line-height: 1.3;
    padding-right: 5px;
  }
  
  .filters {
    gap: 25px;
  }
}
