/* Dark/Light Mode */
:root {
  --bg-gradient-light: linear-gradient(135deg, #663399 0%, #008080 100%);
  --bg-gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d4545 100%);
  --text-color-light: #333;
  --text-color-dark: #fff;
  --card-bg-light: rgba(255, 255, 255, 0.9);
  --card-bg-dark: rgba(30, 30, 30, 0.9);
  --menu-bg-light: rgba(255, 255, 255, 0.95);
  --menu-bg-dark: rgba(40, 40, 40, 0.95);
}

/* Side Menu Styles */
#menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

#menu-btn {
  font-size: 24px;
  padding: 8px 15px;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#menu-btn:hover {
  transform: scale(1.1);
}

.side-menu {
  position: fixed;
  left: -300px;
  top: 0;
  width: 300px;
  height: 100vh;
  background: var(--menu-bg-light);
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
  z-index: 1001;
  overflow-y: auto;
}

.dark-mode .side-menu {
  background: var(--menu-bg-dark);
}

.side-menu.open {
  left: 0;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

#close-menu {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
}

.menu-content {
  padding: 20px;
}

.menu-section {
  margin-bottom: 30px;
}

.menu-section h4 {
  margin-bottom: 15px;
  color: #663399;
}

/* Timer Styles */
#pomodoro-container {
  text-align: center;
  padding: 15px;
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
}

#timer {
  font-size: 32px;
  font-weight: bold;
  margin: 10px 0;
  color: #008080;
}

#timer-type {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
}

/* Tags Styles */
#tags-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  margin: 3px;
  border-radius: 15px;
  color: white;
  font-size: 12px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0;
}

/* Charts Styles */
canvas {
  margin: 15px 0;
  max-width: 100%;
  background: white;
  border-radius: 8px;
  padding: 10px;
}

.icon-menu {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.icon-grid span {
  font-size: 20px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.icon-grid span:hover {
  background: #f0f0f0;
}


/* Existing Styles Below */
body {
  font-family: Arial, sans-serif;
  background: var(--bg-gradient-light);
  margin: 0;
  padding: 20px;
  color: var(--text-color-light);
  transition: all 0.3s ease;
}


/* Statistics Dashboard */
#stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-card h3 {
  margin: 0 0 10px 0;
  color: #663399;
}

/* Category Management */
#category-management {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

#new-category-input {
  flex: 1;
  padding: 10px;
  border: 2px solid #663399;
  border-radius: 6px;
}

#category-color {
  padding: 5px;
  border: none;
  border-radius: 6px;
  height: 40px;
  width: 60px;
  cursor: pointer;
}

/* Warning Box for Overdue Tasks */
.warning-box {
  background: linear-gradient(45deg, #ff6b6b, #ff8585);
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Task Due Date Styling */
.task-overdue {
  background-color: #ffe0e0 !important;
  border-left: 4px solid #ff4444 !important;
}

.task-upcoming {
  background-color: #fff3cd !important;
  border-left: 4px solid #ffc107 !important;
}

body.dark-mode {
  background: var(--bg-gradient-dark);
  color: var(--text-color-dark);
}

#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

#theme-switch {
  font-size: 24px;
  padding: 8px 12px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid currentColor;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#theme-switch:hover {
  transform: rotate(360deg);
}

#auth-section, #app-section {
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
  background-color: var(--card-bg-light);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  color: var(--text-color-light);
  animation: fadeIn 0.5s ease-out;
}

.dark-mode #auth-section,
.dark-mode #app-section {
  background-color: var(--card-bg-dark);
  color: var(--text-color-dark);
}

#auth-section input {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  font-size: 16px;
  border: 2px solid #663399;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#auth-section input:focus {
  border-color: #008080;
  box-shadow: 0 0 8px rgba(0,128,128,0.3);
  outline: none;
}

button {
  padding: 12px 20px;
  margin-right: 10px;
  background: linear-gradient(45deg, #663399, #008080);
  border: none;
  color: #160808;
  cursor: pointer;
  font-size: 16px;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:active {
  transform: translateY(1px);
}

/* Progress Circle */
#progress-container {
  text-align: center;
  margin: 20px 0;
}

.progress-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(#008080 0%, #663399 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
}

.progress-circle::before {
  content: '';
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  position: absolute;
}

.progress-text {
  position: relative;
  z-index: 1;
  font-weight: bold;
  color: #333;
}

/* Search and Filter */
#search-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#search-input {
  flex: 1;
  padding: 10px;
  border: 2px solid #663399;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#status-filter {
  padding: 10px;
  border: 2px solid #663399;
  border-radius: 6px;
  background: white;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

form input, 
form select, 
form button {
  width: 100%;
  padding: 12px;
  margin: 0;
  border: 2px solid #663399;
  border-radius: 6px;
  transition: all 0.3s ease;
}

form input:focus,
form select:focus {
  border-color: #008080;
  box-shadow: 0 0 8px rgba(0,128,128,0.3);
  outline: none;
}

#sort-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#sort-buttons button {
  flex: 1;
  min-width: 100px;
  padding: 10px;
  background: linear-gradient(45deg, #663399, #008080);
  color: white;
  border: none;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (min-width: 768px) {
  form {
    flex-direction: row;
    flex-wrap: wrap;
  }

  form input, 
  form select {
    flex: 1;
    min-width: 150px;
  }
}

ul#chore-list {
  list-style-type: none;
  padding: 0;
}

ul#chore-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  margin-bottom: 12px;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

ul#chore-list li:hover {
  transform: translateX(5px);
}

ul#chore-list li.completed {
  text-decoration: line-through;
  opacity: 0.7;
}

li button.delete {
  background: linear-gradient(45deg, #ff4444, #cc0000);
  border: none;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

#due-date {
  padding: 10px;
  font-size: 16px;
  margin: 0 10px;
}

.due-date {
  margin: 0 10px;
  color: #666;
}

#priority {
  padding: 10px;
  font-size: 16px;
  margin: 0 10px;
}

ul#chore-list li[data-id].priority-high { 
  border-left: 4px solid #ff4444;
}

ul#chore-list li[data-id].priority-medium { 
  border-left: 4px solid #ffa500;
}

ul#chore-list li[data-id].priority-low { 
  border-left: 4px solid #4CAF50;
}

#category {
  padding: 10px;
  font-size: 16px;
  margin: 0 10px;
}

.category-tag {
  padding: 4px 8px;
  border-radius: 12px;
  margin-left: 10px;
  font-size: 12px;
  background: linear-gradient(45deg, #663399, #008080);
  color: white;
}

.task-icon {
  font-size: 20px;
  margin-right: 10px;
}

.repeat-tag {
  background: #e0e0e0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 10px;
}


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