:root {
  --bg-color: #ffffff;
  --text-color: #111827;
  --input-bg: #f3f4f6;
  --button-bg: #2563eb;
  --delete-bg: #dc2626;
}

body.dark {
  --bg-color: #1f2937;
  --text-color: #f9fafb;
  --input-bg: #374151;
  --button-bg: #3b82f6;
  --delete-bg: #ef4444;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  transition: background-color 0.3s ease;
}

.container {
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 700px;
  padding: 30px;
}


h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
}

.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.input-group input,
.input-group button {
  padding: 10px;
  border-radius: 6px;
  font-size: 1rem;
  flex: 1;
  border: 1px solid #ccc;
  background-color: var(--input-bg);
  color: var(--text-color);
}

.input-group button {
  background-color: var(--button-bg);
  color: white;
  border: none;
  cursor: pointer;
}

.alert {
  color: var(--delete-bg);
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

.result .task-item {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background-color: var(--input-bg);
  border-radius: 6px;
}

.result .task-item input {
  border: none;
  background: transparent;
  color: var(--text-color);
}

.result .task-item button {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.result .task-item .edit-btn {
  background-color: #facc15;
  color: #111;
}

.result .task-item .delete-btn {
  background-color: var(--delete-bg);
  color: white;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

@media (max-width: 500px) {
  .input-group, .top-bar {
    flex-direction: column;
  }
  .result .task-item {
    grid-template-columns: 1fr;
  }
}
/* Add any additional styles for smaller screens here */

/* Filter Container */
.filters {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 15px;
}

/* Filter Dropdown Styling */
#filter-select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  width: 200px; /* Default width */
  max-width: 100%;
}

/* Hover effect */
#filter-select:hover {
  border-color: #888;
}

/* Focus effect */
#filter-select:focus {
  border-color: #ff5252;
  box-shadow: 0 0 5px rgba(255, 82, 82, 0.5);
}

/* Remove default arrow and add custom arrow */
#filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23333' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  padding-right: 35px;
}

/* Tablet Responsive */
@media (max-width: 768px) {
  #filter-select {
    width: 160px;
    font-size: 13px;
    padding: 7px 10px;
  }
}


body.dark #filter-select {

  border: 1px solid #ccc;

  background-color: #333;

  color: #fff;
 
}

body.dark .container {
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(255,255,255,0.2);
  width: 100%;
  max-width: 700px;
  padding: 30px;
}
body.dark #filter-select {
 
background-image: url("data:image/svg+xml;utf8,<svg fill='%23ffffff' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");

 
}
/* toggle css to switch light/dark mode */
/* Toggle Container */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 15px;
}

/* Hide default checkbox */
.switch input {
  display: none;
}

/* Switch Track */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

/* Slider Style */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}

/* Slider Circle */
.slider:before {
  position: absolute;
  content: "";
  height: 20px; 
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* When Checked */
input:checked + .slider {
  background-color: #ff5252; /* Active Color */
}

input:checked + .slider:before {
  transform: translateX(24px);
}
