:root {
  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  
  /* Theme colors */
  --theme-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --theme-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --theme-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --theme-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --theme-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --theme-gradient-6: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-primary);
  background: var(--bg-secondary);
  line-height: 1.7;
  overflow-x: hidden;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(2px);
  min-height: 100vh;
  box-shadow: var(--shadow-lg);
}

/* Top Bar */
.top-bar {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  transition: background 0.5s ease;
}

.top-bar.theme-default {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.top-bar.theme-1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.top-bar.theme-2 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.top-bar.theme-3 {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.top-bar.theme-4 {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.top-bar.theme-5 {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.top-bar.theme-6 {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.app-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.greeting {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.95;
  letter-spacing: 0.01em;
}

.date-time-display {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.current-time {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.header-right {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.score-display, .streak-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.score-label {
  font-size: 0.75rem;
  opacity: 0.9;
}

.score-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.streak-icon {
  font-size: 1.2rem;
}

.streak-value {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Navigation */
.nav-tabs {
  display: flex;
  background: white;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
}

.nav-tab {
  flex: 1;
  padding: 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid transparent;
  min-width: 100px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
}

.nav-tab::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.nav-tab:hover {
  color: #667eea;
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.nav-tab:hover::before {
  width: 100%;
}

.nav-tab.active {
  color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-bottom-color: transparent;
}

.nav-tab.active::before {
  width: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 1.5rem;
  animation: fadeIn 0.3s;
}

.tab-content.active {
  display: block;
}

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

/* Task Header */
.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.task-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.quick-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.625rem 1.25rem;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.filter-btn.active {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
  color: white;
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.5);
  transform: translateY(-1px);
}

.filter-btn.active:hover {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%) !important;
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.3s;
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.task-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.task-card.completed {
  opacity: 0.6;
  background: var(--bg-secondary);
}

.task-card.completed .task-title {
  text-decoration: line-through;
}

.task-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.task-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.task-notes {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
  opacity: 0.85;
}

.task-completed-info {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.08) 100%);
  border-left: 4px solid var(--secondary-color);
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.completed-timestamp {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.task-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.task-priority {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
}

.task-priority.daddy-chill {
  background: #e0e7ff;
  color: #3730a3;
}

.task-priority.medium {
  background: #fef3c7;
  color: #92400e;
}

.task-priority.high {
  background: #fee2e2;
  color: #991b1b;
}

.task-priority.super-high {
  background: #fecaca;
  color: #7f1d1d;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.task-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-primary:active {
  transform: translateY(0) scale(1);
}

/* Futuristic Add Task Button - Must override .btn-primary */
#addTaskBtn.btn-primary,
#addTaskBtn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 0.875rem 1.75rem !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

#addTaskBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

#addTaskBtn:hover::before {
  left: 100%;
}

#addTaskBtn:hover,
#addTaskBtn.btn-primary:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6) !important;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

#addTaskBtn:active {
  transform: translateY(0) scale(1);
}

#addTaskBtn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#addTaskBtn:active::after {
  width: 300px;
  height: 300px;
}

.btn-secondary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white !important;
  border: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-secondary:hover::before {
  left: 100%;
}

.btn-secondary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.btn-secondary:active {
  transform: translateY(0) scale(1);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white !important;
  border: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-success:hover::before {
  left: 100%;
}

.btn-success:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.btn-success:active {
  transform: translateY(0) scale(1);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
}

/* Hydration */
.hydration-header {
  margin-bottom: 2rem;
}

.hydration-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hydration-goal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hydration-goal input {
  width: 60px;
  padding: 0.5rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
}

.hydration-progress {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.progress-ring {
  position: relative;
  width: 200px;
  height: 200px;
}

.progress-circle {
  transform: rotate(-90deg);
}

.progress-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 10;
}

.progress-fill {
  fill: none;
  stroke: var(--secondary-color);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-text span:first-child {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

.progress-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hydration-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hydration-custom {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: 12px;
  border: 2px solid var(--border-color);
}

.custom-hydration-input {
  margin-bottom: 1rem;
}

.custom-hydration-input label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.water-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.water-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.water-btn:hover::before {
  left: 100%;
}

.water-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.water-btn:active {
  transform: translateY(0) scale(1);
}

/* AI Calculator Unit Buttons */
#heightUnitBtn, #heightUnitBtnFt, #weightUnitBtnKg, #weightUnitBtnLbs {
  border: 2px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#heightUnitBtn.active, #heightUnitBtnFt.active, #weightUnitBtnKg.active, #weightUnitBtnLbs.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#heightUnitBtn:hover:not(.active), #heightUnitBtnFt:hover:not(.active), 
#weightUnitBtnKg:hover:not(.active), #weightUnitBtnLbs:hover:not(.active) {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  transform: translateY(-1px);
}

.hydration-log {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hydration-entry {
  background: var(--bg-secondary);
  padding: 0.75rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* AI Calculator */
.ai-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.disclaimer {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  line-height: 1.6;
}

.ai-calculator {
  max-width: 500px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color 0.3s;
  background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
  font-weight: 400;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.results {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: none;
}

.results.show {
  display: block;
  animation: fadeIn 0.3s;
}

.result-item {
  margin-bottom: 1rem;
}

.result-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Settings */
.settings-header h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.setting-group {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.setting-group:last-child {
  border-bottom: none;
}

.setting-group h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.setting-group p {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.75rem;
  line-height: 1.6;
  opacity: 0.85;
}

.quote-item {
  transition: all 0.3s ease;
}

.quote-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#motivationalQuote {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white !important;
  border: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-danger:hover::before {
  left: 100%;
}

.btn-danger:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.btn-danger:active {
  transform: translateY(0) scale(1);
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.has-background {
  background-color: rgba(255, 255, 255, 0.92);
}

.modal-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
  color: white;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: space-around;
  }

  .task-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .hydration-actions {
    flex-direction: column;
  }

  .water-btn {
    width: 100%;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Title Input with History */
.title-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-input-wrapper input {
  flex: 1;
}

.btn-icon {
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: #667eea;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.title-history-list {
  margin-top: 0.5rem;
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: white;
  display: none;
}

.title-history-list.show {
  display: block;
}

.title-history-item {
  padding: 0.5rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.title-history-item:hover {
  background: var(--bg-secondary);
}

.title-history-item .delete-title {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  opacity: 1;
}

.title-history-item .delete-title:hover {
  transform: translateY(-1px) scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

/* Title Suggestions */
.title-suggestions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.title-suggestion-item {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #667eea;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.title-suggestion-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.title-suggestion-item:hover::before {
  left: 100%;
}

.title-suggestion-item:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.title-suggestion-item:active {
  transform: translateY(0) scale(1);
}

/* Quick Time Buttons */
.time-selection {
  margin-top: 0.5rem;
}

.quick-time-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-time {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: #667eea;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-time::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.btn-time:hover::before {
  left: 100%;
}

.btn-time:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Medications List */
.medications-header, .duties-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.medications-header h2, .duties-header h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.medications-list, .duties-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.medication-card, .duty-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.3s;
}

.medication-card:hover, .duty-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.medication-header, .duty-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.medication-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.medication-type {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.medication-type.medication {
  background: #fee2e2;
  color: #991b1b;
}

.medication-type.vitamin {
  background: #dbeafe;
  color: #1e40af;
}

.medication-type.supplement {
  background: #d1fae5;
  color: #065f46;
}

.medication-info, .duty-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.medication-reminders, .duty-frequency {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.reminder-time-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.reminder-time-item input {
  flex: 1;
}

.reminder-time-item button {
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.reminder-time-item button:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.duties-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* Checkbox Label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.checkbox-label span {
  user-select: none;
}

/* Countdown Timer */
.countdown-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-left: 0.5rem;
}

.countdown-timer.urgent {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


