/* CSS Variables for theming */
:root {
  /* Light theme colors - Modern app UI */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Global Non-Selectable Styles */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow text selection for input fields and textareas */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Dark theme colors */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --border-color: #334155;
  --border-light: #475569;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  
  --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: all 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Mobile app-like behavior */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  /* Mobile app-like header */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.logo:hover .logo-icon {
  color: var(--accent-color);
  transform: rotate(15deg) scale(1.1);
}

.logo:hover .fire-effect {
  opacity: 1;
}

.fire-effect {
  transition: opacity 0.3s ease;
}

.fire-flame-1 {
  animation: fireFlicker 1.2s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

.fire-flame-2 {
  animation: fireFlicker 0.9s ease-in-out infinite alternate-reverse;
  transform-origin: center bottom;
}

.fire-flame-3 {
  animation: fireFlicker 1.1s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

.fire-flame-4 {
  animation: fireFlicker 0.7s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

.fire-flame-5 {
  animation: fireFlicker 1.3s ease-in-out infinite alternate-reverse;
  transform-origin: center bottom;
}

.fire-flame-6 {
  animation: fireFlicker 1.0s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

@keyframes fireFlicker {
  0% {
    transform: scale(1) rotate(-3deg) translateY(0px);
    opacity: 0.7;
  }
  25% {
    transform: scale(1.15) rotate(2deg) translateY(-1px);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05) rotate(-1deg) translateY(-2px);
    opacity: 1;
  }
  75% {
    transform: scale(1.2) rotate(3deg) translateY(-1px);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.95) rotate(-2deg) translateY(0px);
    opacity: 0.9;
  }
}

.tagline {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0;
}

.header-controls {
  display: flex;
  gap: 0.5rem;
}

.theme-toggle,
.reset-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.theme-toggle:hover,
.reset-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-color);
}

/* Quote Section */
.quote-section {
  padding: 2rem 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), rgba(59, 130, 246, 0.02));
}

.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.quote-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 1rem 1rem 0 0;
}

.quote-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
  pointer-events: none;
  transition: all 0.3s ease;
}

.quote-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.quote-card:hover::after {
  transform: scale(1.1);
}

.quote-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  opacity: 0.8;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.quote-text {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.6;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.quote-text::before {
  content: '"';
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.3;
  position: absolute;
  top: -0.5rem;
  left: -1rem;
  font-family: serif;
  line-height: 1;
}

.quote-text::after {
  content: '"';
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.3;
  position: absolute;
  bottom: -1.5rem;
  right: -1rem;
  font-family: serif;
  line-height: 1;
}

.quote-author {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.quote-author::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -2rem;
  width: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color));
  transform: translateY(-50%);
}

.quote-author::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -2rem;
  width: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-color), transparent);
  transform: translateY(-50%);
}

/* Main Content */
.main {
  padding: 1.5rem 0;
  min-height: calc(100vh - 120px);
}

/* Dashboard */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.filters {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Goals Grid */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* Mobile app-like touch targets */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.goal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.goal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.goal-card:hover::before {
  transform: scaleX(1);
}

.goal-card.completed {
  opacity: 0.7;
  border-color: var(--success-color);
}

.goal-card.completed::before {
  background: var(--success-color);
  transform: scaleX(1);
}

.goal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0.5rem;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem 1rem -0.5rem;
}

.goal-header:hover {
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

/* Mobile-specific clickable indicator */
@media (max-width: 768px) {
  .goal-header {
    position: relative;
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 255, 255, 0.1));
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin: -0.75rem -0.75rem 1rem -0.75rem;
  }
  
  .goal-header::after {
    /* content: "👆"; */
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.6;
    pointer-events: none;
    animation: tapHint 2s ease-in-out infinite;
  }
  
  .goal-header:hover::after,
  .goal-header:active::after {
    opacity: 1;
    animation: none;
  }
}

@keyframes tapHint {
  0%, 100% { 
    opacity: 0.6;
    transform: translateY(-50%) scale(1);
  }
  50% { 
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
  }
}

.goal-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  flex: 1;
  transition: color 0.2s ease;
}

.goal-header:hover .goal-title {
  color: var(--accent-color);
}

.goal-category {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.5rem;
  border: 1px solid var(--border-light);
}

.goal-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.goal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.goal-meta > div {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.goal-meta i {
  font-size: 0.7rem;
  color: var(--primary-color);
}

.goal-deadline {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.goal-deadline.overdue {
  color: var(--danger-color);
  font-weight: 500;
}

.goal-progress {
  margin-bottom: 1rem;
}

.progress-bar {
  background: var(--bg-tertiary);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 4px;
  transition: width 0.8s ease;
  position: relative;
}

.progress-fill.updating {
  animation: progressPulse 0.6s ease;
}

@keyframes progressPulse {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(1.1); }
  100% { transform: scaleY(1); }
}

.progress-fill.completed {
  background: var(--success-color);
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

  .progress-text {
    display: none;
  }

.progress-percentage {
  color: var(--primary-color);
}

.goal-tasks {
  margin-top: 1rem;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem !important;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.375rem;
  overflow: hidden;
  position: relative;
}

.task-item:hover {
  background: var(--bg-secondary);
  transform: translateX(4px);
}

.task-checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  transform: scale(1);
  flex-shrink: 0;
  margin: 0 0.25rem 0 0;
}

.task-checkbox:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.1);
  animation: checkboxBounce 0.4s ease;
}

.task-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
  animation: checkmarkAppear 0.3s ease 0.1s both;
}

@keyframes checkboxBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1.1); }
}

@keyframes checkmarkAppear {
  0% { 
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.task-text {
  flex: 1;
  color: var(--text-secondary);
}

.task-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border-radius: 0.75rem;
  border: 2px dashed var(--border-color);
}

.empty-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  /* Mobile app-like buttons */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px; /* iOS recommended touch target size */
}

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

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

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

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

.btn-danger:hover {
  background: #ef4444;
  transform: translateY(-1px);
}

/* Floating Add Button */
.floating-add-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  z-index: 1000;
  /* Mobile app-like FAB */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 56px;
  min-height: 56px;
}

.floating-add-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

/* Hide quote section and floating add button when viewing goal detail */
.goal-detail-view .quote-section,
.goal-detail-view .floating-add-btn {
  display: none !important;
}

/* Goal Detail View */
.goal-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.back-btn:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

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

.goal-detail-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* Desktop Goal Detail Content Card-Based Design */
@media (min-width: 769px) {
  .goal-detail-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin: 0;
  }
  
  .goal-detail-content .goal-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-weight: 700;
  }
  
  .goal-detail-content .goal-category {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.75rem;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
  }
  
  .goal-detail-content .goal-type-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    margin-left: 0.5rem;
    border-radius: 1rem;
  }
  
  .goal-detail-content .goal-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
  }
  
  .goal-detail-content .goal-meta {
    gap: 1rem;
    margin: 1.5rem 0;
  }
  
  .goal-detail-content .meta-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
  }
  
  .goal-detail-content .meta-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
  }
  
  .goal-detail-content .meta-item i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    color: var(--primary-color);
  }
  
  .goal-detail-content .goal-progress {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
  }
  
  .goal-detail-content .goal-progress h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
  }
  
  .goal-detail-content .progress-bar {
    height: 16px;
    border-radius: 8px;
    margin-bottom: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .goal-detail-content .goal-tasks {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
  }
  
  .goal-detail-content .goal-tasks h3 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
  }
  
  .goal-detail-content .task-item {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
  }
  
  .goal-detail-content .task-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: var(--bg-primary);
  }
  
  .goal-detail-content .task-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
  }
  
  .goal-detail-content .task-checkbox:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
  }
  
  .goal-detail-content .task-text {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
  }
  
  .goal-detail-content .task-text.completed {
    color: var(--text-muted);
    text-decoration: line-through;
  }
  
  .goal-detail-content .no-tasks {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 0.75rem;
    border: 2px dashed var(--border-color);
  }
  
  .goal-detail-content .goal-footer-actions {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-form {
  padding: 1.5rem;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.tasks-container {
  margin-bottom: 1rem;
}

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

.task-input {
  flex: 1;
  margin: 0;
}

.remove-task-btn {
  background: var(--danger-color);
  border: none;
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.remove-task-btn:hover {
  background: #ef4444;
}

.add-task-btn {
  width: 100%;
  justify-content: center;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3000;
}

/* Mobile App Enhancements */
@media (max-width: 768px) {
  /* Prevent zoom on input focus */
  input, textarea, select {
    font-size: 16px !important;
  }
  
  /* Better touch targets */
  .task-checkbox {
    min-width: 24px;
    min-height: 24px;
    width: 24px;
    height: 24px;
  }
  
  /* Larger touch targets for all interactive elements */
  .goal-card {
    min-height: 120px;
  }
  
  .modal-close {
    min-width: 44px;
    min-height: 44px;
    padding: 0.75rem;
  }
  
  .remove-task-btn {
    min-width: 32px;
    min-height: 32px;
    padding: 0.5rem;
  }
  
  /* Smooth scrolling for mobile */
  .goals-grid {
    scroll-behavior: smooth;
  }
  
  /* Better modal behavior on mobile */
  .modal-overlay {
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  
  .modal {
    margin: 0;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
  }
  
  /* Mobile-optimized form inputs */
  .form-group input,
  .form-group textarea,
  .form-group select {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 8px;
  }
  
  /* Better button touch feedback */
  .btn:active {
    transform: scale(0.98);
  }
  
  .goal-card:active {
    transform: scale(0.98);
  }
  
  .floating-add-btn:active {
    transform: scale(0.95);
  }
}

/* Mobile-First Responsive Design */

/* Large Mobile / Small Tablet */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .header {
    padding: 0.5rem 0;
  }
  
  .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .logo-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .tagline {
    display: none;
  }
  
  .header-controls {
    gap: 0.25rem;
  }
  
  .theme-toggle,
  .reset-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
    min-width: 44px;
    min-height: 44px;
  }
  
  .quote-section {
    padding: 1.5rem 0;
  }
  
  .quote-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
  }
  
  .quote-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .quote-text {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .quote-text::before,
  .quote-text::after {
    font-size: 2rem;
  }
  
  .quote-text::before {
    top: -0.3rem;
    left: -0.5rem;
  }
  
  .quote-text::after {
    bottom: -1rem;
    right: -0.5rem;
  }
  
  .quote-author {
    font-size: 0.85rem;
  }
  
  .quote-author::before,
  .quote-author::after {
    width: 1rem;
  }
  
  .quote-author::before {
    left: -1.5rem;
  }
  
  .quote-author::after {
    right: -1.5rem;
  }
  
  .main {
    padding: 1rem 0;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .dashboard-header h2 {
    font-size: 1.5rem;
    text-align: center;
  }
  
  .filters {
    justify-content: center;
    gap: 0.125rem;
    padding: 0.125rem;
  }
  
  .filter-btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    min-height: 40px;
  }
  
  .goals-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .goal-card {
    padding: 1.25rem;
    border-radius: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
  }
  
  .goal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 1rem 1rem 0 0;
  }
  
  .goal-card.completed::before {
    background: linear-gradient(90deg, var(--success-color), #10b981);
  }
  
  .goal-card.daily-goal::before {
    background: linear-gradient(90deg, var(--accent-color), #f59e0b);
  }
  
  .goal-card.one-time-goal::before {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  }
  
  .goal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    transition: color 0.2s ease;
  }
  
  .goal-header:hover .goal-title {
    color: var(--accent-color);
  }
  
  .goal-category {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
  }
  
  .goal-description {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }
  
  .goal-meta {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .goal-meta > div {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .goal-meta i {
    font-size: 0.65rem;
    color: var(--primary-color);
  }
  
  .goal-progress {
    margin-top: 1.25rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 255, 255, 0.05));
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
  }
  
  .progress-bar {
    height: 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
  }
  
  .progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
    position: relative;
  }
  
  .progress-fill.completed {
    background: linear-gradient(90deg, var(--success-color), #10b981);
  }
  
  .progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
  }
  
  .progress-percentage {
    color: var(--primary-color);
    font-weight: 700;
  }
  
  .task-item {
    padding: 0.75rem 0.75rem 0.75rem 1.25rem !important;
    font-size: 0.85rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    gap: 0.75rem;
  }
  
  .task-item:hover {
    background: var(--bg-primary);
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
  }
  
  .task-item:last-child {
    margin-bottom: 0;
  }
  
  .task-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0 0.25rem 0 0;
    position: relative;
  }
  
  .task-checkbox:checked {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    transform: scale(1.1);
  }
  
  .task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
  }
  
  .goal-detail-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    flex-wrap: nowrap;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
  }
  
  .back-btn {
    padding: 0.625rem 0.875rem;
    font-size: 0.85rem;
    justify-content: center;
    min-height: 40px;
    border-radius: 0.5rem;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
  }
  
  .back-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
  }
  
  .goal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  
  .goal-actions .btn {
    padding: 0;
    font-size: 0;
    min-height: 44px;
    min-width: 44px;
    border-radius: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  
  .goal-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.75rem;
  }
  
  .goal-actions .btn:hover::before {
    opacity: 0.1;
  }
  
  .goal-actions .btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
  }
  
  .goal-actions .btn.danger:hover {
    color: var(--danger-color);
  }
  
  .goal-actions .btn.danger::before {
    background: var(--danger-color);
  }
  
  .goal-actions .btn i {
    font-size: 1.1rem;
    z-index: 1;
    position: relative;
    transition: all 0.3s ease;
  }
  
  /* Desktop Info Button in Header */
  .goal-header-actions.desktop-only {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  
  .goal-header-actions .info-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
  }
  
  .goal-header-actions .info-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }
  
  .goal-header-actions .info-btn i {
    font-size: 1rem;
  }
  
  /* Mobile Info Button at Bottom */
  .goal-footer-actions.mobile-only {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
  }
  
  .goal-footer-actions .info-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    min-height: 48px;
  }
  
  .goal-footer-actions .info-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  .goal-footer-actions .info-btn i {
    font-size: 1rem;
  }
  
  .goal-footer-actions .info-btn span {
    font-size: 0.9rem;
  }
  
  
  .goal-detail-content {
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin: 0 0.5rem;
    box-shadow: var(--shadow-md);
  }
  
  /* Goal Detail Content Mobile Improvements */
  .goal-detail-content .goal-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }
  
  .goal-detail-content .goal-category {
    font-size: 0.55rem;
    padding: 0.15rem 0.3rem;
    border-radius: 0.5rem;
  }
  
  .goal-detail-content .goal-type-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.375rem;
  }
  
  .goal-detail-content .goal-description {
    font-size: 1rem;
    line-height: 1.6;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-color);
  }
  
  .goal-detail-content .goal-meta {
    gap: 0.75rem;
    margin: 1.25rem 0;
  }
  
  .goal-detail-content .meta-item {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
  }
  
  .goal-detail-content .meta-item i {
    font-size: 1rem;
    margin-right: 0.5rem;
  }
  
  .goal-detail-content .goal-progress {
    margin: 1.5rem 0;
  }
  
  .goal-detail-content .goal-progress h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .goal-detail-content .progress-bar {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 0.75rem;
  }
  
  .goal-detail-content .progress-text {
    display: none;
  }
  
  .goal-detail-content .tasks-section {
    margin: 1.5rem 0;
  }
  
  .goal-detail-content .tasks-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .goal-detail-content .task-item {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .goal-detail-content .task-item:hover {
    background: var(--bg-card);
    transform: translateX(2px);
    border-color: var(--primary-color);
  }
  
  .goal-detail-content .task-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
  }
  
  .goal-detail-content .task-text {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  
  .floating-add-btn {
    bottom: 1rem;
    right: 1rem;
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
    min-width: 56px;
    min-height: 56px;
  }
  
  .modal {
    width: 95%;
    margin: 0.5rem;
    border-radius: 0.5rem;
  }
  
  .modal-header {
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top, 1rem));
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
  }
  
  .modal-header h3 {
    font-size: 1.1rem;
  }
  
  .modal-form {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .modal-form-content {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.375rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.625rem;
    font-size: 0.85rem;
    border-radius: 0.375rem;
  }
  
  .task-input {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
  
  .remove-task-btn {
    padding: 0.375rem;
    font-size: 0.7rem;
  }
  
  .add-task-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    position: relative;
    flex-shrink: 0;
    z-index: 10;
  }
  
  .modal-actions .btn {
    padding: 1rem;
    font-size: 1rem;
    justify-content: center;
    min-height: 48px;
  }
  
  .goal-type-selector {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .goal-type-card {
    padding: 1rem;
    min-height: 100px;
  }
  
  .goal-type-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .goal-type-card strong {
    font-size: 0.9rem;
  }
  
  .goal-type-card small {
    font-size: 0.75rem;
  }
  
  .empty-state {
    padding: 2rem 1rem;
  }
  
  .empty-icon {
    font-size: 3rem;
  }
  
  .empty-state h3 {
    font-size: 1.25rem;
  }
  
  .empty-state p {
    font-size: 0.9rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .header {
    padding: 0.375rem 0;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .logo-icon {
    width: 1.1rem;
    height: 1.1rem;
  }
  
  .header-controls {
    gap: 0.125rem;
  }
  
  .theme-toggle,
  .reset-btn {
    padding: 0.625rem;
    font-size: 0.85rem;
    min-width: 44px;
    min-height: 44px;
  }
  
  .quote-section {
    padding: 1rem 0;
  }
  
  .quote-card {
    padding: 1.25rem;
    border-radius: 0.5rem;
  }
  
  .quote-icon {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  .quote-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .quote-text::before,
  .quote-text::after {
    font-size: 1.5rem;
  }
  
  .quote-text::before {
    top: -0.2rem;
    left: -0.3rem;
  }
  
  .quote-text::after {
    bottom: -0.8rem;
    right: -0.3rem;
  }
  
  .quote-author {
    font-size: 0.75rem;
  }
  
  .quote-author::before,
  .quote-author::after {
    width: 0.75rem;
  }
  
  .quote-author::before {
    left: -1rem;
  }
  
  .quote-author::after {
    right: -1rem;
  }
  
  .main {
    padding: 0.75rem 0;
  }
  
  .dashboard-header h2 {
    font-size: 1.25rem;
  }
  
  .filter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-height: 36px;
  }
  
  .goals-grid {
    gap: 0.75rem;
  }
  
  .goal-card {
    padding: 0.75rem;
  }
  
  .goal-title {
    font-size: 1rem;
  }
  
  .goal-category {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }
  
  .goal-description {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .goal-meta {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
  }
  
  .progress-bar {
    height: 4px;
  }
  
  .progress-text {
    display: none;
  }
  
  .task-item {
    padding: 0.25rem 0;
    font-size: 0.75rem;
  }
  
  .task-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
  }
  
  .goal-detail-content {
    padding: 0.75rem;
  }
  
  .floating-add-btn {
    bottom: 0.75rem;
    right: 0.75rem;
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
    min-width: 56px;
    min-height: 56px;
  }
  
  .modal {
    width: 98%;
    margin: 0.25rem;
  }
  
  .modal-header {
    padding: 0.75rem;
    padding-top: max(0.75rem, env(safe-area-inset-top, 0.75rem));
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
  }
  
  .modal-header h3 {
    font-size: 1rem;
  }
  
  .modal-form {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .modal-form-content {
    padding: 0.75rem;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0;
  }
  
  .form-group {
    margin-bottom: 0.75rem;
  }
  
  .form-group label {
    font-size: 0.8rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .task-input {
    font-size: 0.75rem;
    padding: 0.375rem;
  }
  
  .remove-task-btn {
    padding: 0.25rem;
    font-size: 0.65rem;
  }
  
  .add-task-btn {
    padding: 0.625rem;
    font-size: 0.85rem;
    min-height: 44px;
  }
  
  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding: 1rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    position: relative;
    flex-shrink: 0;
    z-index: 10;
  }
  
  .modal-actions .btn {
    padding: 0.875rem;
    font-size: 0.95rem;
    min-height: 48px;
  }
  
  .empty-state {
    padding: 1.5rem 0.75rem;
  }
  
  .empty-icon {
    font-size: 2.5rem;
  }
  
  .empty-state h3 {
    font-size: 1.1rem;
  }
  
  .empty-state p {
    font-size: 0.85rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  .logo-icon {
    width: 1rem;
    height: 1rem;
  }
  
  .theme-toggle,
  .reset-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
    min-width: 44px;
    min-height: 44px;
  }
  
  .quote-card {
    padding: 1rem;
    border-radius: 0.5rem;
  }
  
  .quote-icon {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .quote-text {
    font-size: 0.85rem;
    line-height: 1.3;
  }
  
  .quote-text::before,
  .quote-text::after {
    font-size: 1.25rem;
  }
  
  .quote-text::before {
    top: -0.1rem;
    left: -0.2rem;
  }
  
  .quote-text::after {
    bottom: -0.6rem;
    right: -0.2rem;
  }
  
  .quote-author {
    font-size: 0.7rem;
  }
  
  .quote-author::before,
  .quote-author::after {
    width: 0.5rem;
  }
  
  .quote-author::before {
    left: -0.75rem;
  }
  
  .quote-author::after {
    right: -0.75rem;
  }
  
  .dashboard-header h2 {
    font-size: 1.1rem;
  }
  
  .filter-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    min-height: 32px;
  }
  
  .goal-card {
    padding: 0.5rem;
  }
  
  .goal-title {
    font-size: 0.95rem;
  }
  
  .goal-category {
    font-size: 0.6rem;
    padding: 0.1rem 0.25rem;
  }
  
  .goal-description {
    font-size: 0.75rem;
  }
  
  .goal-meta {
    font-size: 0.65rem;
  }
  
  .progress-text {
    display: none;
  }
  
  .task-item {
    font-size: 0.7rem;
  }
  
  .task-checkbox {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
  }
  
  .goal-detail-content {
    padding: 0.5rem;
  }
  
  .floating-add-btn {
    bottom: 0.5rem;
    right: 0.5rem;
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
    min-width: 56px;
    min-height: 56px;
  }
  
  .modal {
    width: 99%;
    margin: 0.125rem;
  }
  
  .modal-header {
    padding: 0.5rem;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0.5rem));
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
  }
  
  .modal-header h3 {
    font-size: 0.95rem;
  }
  
  .modal-form {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .modal-form-content {
    padding: 0.5rem;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0;
  }
  
  .form-group {
    margin-bottom: 0.5rem;
  }
  
  .form-group label {
    font-size: 0.75rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.375rem;
    font-size: 0.75rem;
  }
  
  .task-input {
    font-size: 0.7rem;
    padding: 0.25rem;
  }
  
  .remove-task-btn {
    padding: 0.2rem;
    font-size: 0.6rem;
  }
  
  .add-task-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
    min-height: 44px;
  }
  
  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding: 1rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0.5rem));
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    position: relative;
    flex-shrink: 0;
    z-index: 10;
  }
  
  .modal-actions .btn {
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 48px;
  }
  
  .empty-state {
    padding: 1rem 0.5rem;
  }
  
  .empty-icon {
    font-size: 2rem;
  }
  
  .empty-state h3 {
    font-size: 1rem;
  }
  
  .empty-state p {
    font-size: 0.8rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.goal-card {
  animation: fadeIn 0.5s ease;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Success animations */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

.bounce {
  animation: bounce 1s ease;
}

/* Touch feedback for mobile */
.touch-active {
  transform: scale(0.98) !important;
  opacity: 0.8 !important;
  transition: all 0.1s ease !important;
}

/* Goal Type Selector */
.goal-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.goal-type-option {
  cursor: pointer;
  position: relative;
}

.goal-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.goal-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--bg-card);
  transition: all 0.3s ease;
  text-align: center;
  min-height: 120px;
  justify-content: center;
}

.goal-type-card i {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.goal-type-card strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.goal-type-card small {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.goal-type-option input[type="radio"]:checked + .goal-type-card {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.goal-type-option input[type="radio"]:checked + .goal-type-card i {
  color: var(--primary-color);
}

.goal-type-option:hover .goal-type-card {
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.goal-type-option:hover .goal-type-card i {
  color: var(--primary-color);
}

/* Daily Goal Specific Styles */
.daily-only {
  transition: all 0.3s ease;
}

.goal-card.daily-goal {
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.goal-card.daily-goal::before {
  background: var(--accent-color);
}

.goal-card.daily-goal:hover {
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
  border-color: var(--accent-color);
}

/* One-time Goal Specific Styles */
.goal-card.one-time-goal {
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.goal-card.one-time-goal::before {
  background: var(--primary-color);
}

.goal-card.one-time-goal:hover {
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
  border-color: var(--primary-color);
}

.streak-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--warning-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.streak-indicator.fire {
  background: linear-gradient(45deg, #ff6b35, #f7931e);
  animation: fireGlow 2s ease-in-out infinite alternate;
}

@keyframes fireGlow {
  from { box-shadow: 0 0 5px rgba(255, 107, 53, 0.5); }
  to { box-shadow: 0 0 15px rgba(255, 107, 53, 0.8); }
}

.missed-goals-panel {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.missed-goals-panel h3 {
  color: var(--danger-color);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.missed-goals-panel h3 i {
  font-size: 1.1rem;
}

.missed-goal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

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

.missed-goal-item .goal-title {
  color: var(--text-primary);
  font-weight: 500;
}

.catch-up-btn {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.catch-up-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Missed Goal Overlay on Cards */
.goal-card.has-missed-goals {
  position: relative;
  overflow: visible;
}

.missed-goal-overlay {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.missed-goal-overlay:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.missed-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.25rem;
}

.missed-overlay-icon {
  font-size: 1.2rem;
  margin-bottom: 0.125rem;
}

.missed-overlay-text {
  font-size: 0.6rem;
  line-height: 1.2;
}

.missed-overlay-text strong {
  display: block;
  font-weight: 600;
}

.missed-overlay-text span {
  display: block;
  opacity: 0.9;
  font-size: 0.5rem;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Missed Goal Modal */
.missed-goal-modal {
  max-width: 400px;
  width: 90%;
}

.missed-goal-modal .modal-content {
  padding: 1.5rem;
}

.missed-goal-info h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.missed-goal-info .motivational-message {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.missed-goal-info .instruction-text {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.missed-goal-info .instruction-text i {
  color: var(--warning-color);
  font-size: 1rem;
}

.missed-goal-info .streak-info {
  display: flex;
  justify-content: space-between;
  background: var(--bg-secondary);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
}

.missed-goal-info .current-streak {
  color: var(--warning-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.missed-goal-info .target-streak {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.missed-goal-modal .modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.missed-goal-modal .focus-today-btn {
  background: var(--success-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  flex: 1;
  justify-content: center;
}

.missed-goal-modal .focus-today-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.missed-goal-modal .skip-btn {
  background: var(--text-muted);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.missed-goal-modal .skip-btn:hover {
  background: var(--text-secondary);
  transform: translateY(-1px);
}

/* Missed Tasks Section */
.missed-tasks-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.1);
  border-radius: 0.5rem;
}

.missed-tasks-section h5 {
  color: var(--danger-color);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.missed-tasks-section h5 i {
  font-size: 1rem;
}

.missed-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.missed-task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.1);
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.missed-task-item:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.missed-task-item i {
  color: var(--danger-color);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.missed-task-text {
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.4;
  flex: 1;
}

/* Enhanced Missed Goals Panel */
.missed-goals-panel {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.missed-goals-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--danger-color), var(--warning-color));
}

.missed-goals-header {
  text-align: center;
  margin-bottom: 1rem;
}

.missed-goals-panel h3 {
  color: var(--danger-color);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.missed-goals-panel h3 i {
  font-size: 1.2rem;
}

.motivational-message {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

.missed-goals-content {
  margin-bottom: 1rem;
}

.instruction-text {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.instruction-text i {
  color: var(--warning-color);
  font-size: 1rem;
}

.missed-goal-item {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.missed-goal-item:last-child {
  margin-bottom: 0;
}

.missed-goal-info {
  flex: 1;
}

.missed-goal-info .goal-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  display: block;
  margin-bottom: 0.25rem;
}

.streak-info {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}

.missed-goal-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.focus-today-btn {
  background: var(--success-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
}

.focus-today-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.skip-btn {
  background: var(--text-muted);
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.skip-btn:hover {
  background: var(--text-secondary);
  transform: translateY(-1px);
}

.missed-goals-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(239, 68, 68, 0.1);
}

.encouragement-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.encouragement-text i {
  color: var(--danger-color);
}

/* Consistency Tracker */
.consistency-tracker {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.consistency-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.consistency-label i {
  color: var(--primary-color);
}

.consistency-dots {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.consistency-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.3s ease;
}

.consistency-dot.completed {
  background: var(--success-color);
  border-color: var(--success-color);
}

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

.consistency-dot.missed {
  background: var(--danger-color);
  border-color: var(--danger-color);
}

.consistency-dot.missed::after {
  content: '✕';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 6px;
  font-weight: bold;
}

.consistency-dot.pending {
  background: var(--warning-color);
  border-color: var(--warning-color);
}

.consistency-dot.no-data {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

.consistency-dot.today {
  border-width: 2px;
  transform: scale(1.2);
}

.consistency-dot.today.completed {
  border-color: var(--success-color);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.consistency-dot.today.pending {
  border-color: var(--warning-color);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* Notifications */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  max-width: 400px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
}

.notification-message {
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.notification-success {
  border-left: 4px solid var(--success-color);
}

.notification-info {
  border-left: 4px solid var(--primary-color);
}

.notification-warning {
  border-left: 4px solid var(--warning-color);
}

.notification-danger {
  border-left: 4px solid var(--danger-color);
}

/* Goal Badges */
.goal-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.goal-streak,
.goal-target {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.goal-streak i {
  color: var(--warning-color);
}

.goal-target i {
  color: var(--primary-color);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .goal-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .streak-indicator {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .missed-goals-panel {
    margin-bottom: 1rem;
    padding: 0.75rem;
  }
  
  .missed-goal-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }
  
  .catch-up-btn {
    align-self: flex-start;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .goal-type-selector {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .goal-type-card {
    padding: 0.75rem;
    min-height: 80px;
  }
  
  .goal-type-card i {
    font-size: 1.25rem;
    margin-bottom: 0.375rem;
  }
  
  .goal-type-card strong {
    font-size: 0.85rem;
  }
  
  .goal-type-card small {
    font-size: 0.7rem;
  }
  
  /* Mobile responsive for missed goals panel */
  .missed-goals-panel {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  .missed-goal-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .missed-goal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .focus-today-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 0.85rem;
  }
  
  .skip-btn {
    width: 100%;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .instruction-text {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }
  
  .notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  /* Mobile responsive for consistency tracker */
  .consistency-tracker {
    padding: 0.5rem;
  }
  
  .consistency-dots {
    gap: 0.2rem;
  }
  
  .consistency-dot {
    width: 10px;
    height: 10px;
  }
  
  .consistency-dot.today {
    transform: scale(1.1);
  }
  
  /* Mobile responsive for missed goal overlay */
  .missed-goal-overlay {
    width: 50px;
    height: 50px;
    top: -8px;
    right: -8px;
  }
  
  .missed-overlay-icon {
    font-size: 1rem;
  }
  
  .missed-overlay-text {
    font-size: 0.55rem;
  }
  
  .missed-overlay-text span {
    font-size: 0.45rem;
  }
  
  .missed-goal-modal {
    width: 95%;
    max-width: 350px;
  }
  
  .missed-goal-modal .modal-content {
    padding: 1rem;
  }
  
  .missed-goal-modal .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .missed-goal-modal .focus-today-btn,
  .missed-goal-modal .skip-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Mobile responsive for missed tasks section */
  .missed-tasks-section {
    margin: 1rem 0;
    padding: 0.75rem;
  }
  
  .missed-tasks-section h5 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  
  .missed-task-item {
    padding: 0.375rem;
    gap: 0.5rem;
  }
  
  .missed-task-item i {
    font-size: 0.8rem;
  }
  
  .missed-task-text {
    font-size: 0.8rem;
  }
}


/* Settings Button */
.settings-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

.settings-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.settings-btn i {
  font-size: 1rem;
}

.settings-icon {
  width: 1rem;
  height: 1rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.settings-btn:hover .settings-icon {
  color: white;
  transform: rotate(90deg);
}

/* Settings Modal */
.settings-modal {
  max-width: 420px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.settings-modal .modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 1rem 1.5rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.settings-modal .modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  pointer-events: none;
}

.settings-modal .modal-header h3 {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.settings-modal .modal-header h3 i {
  font-size: 1rem;
  opacity: 0.9;
}

.settings-modal .modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.settings-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.settings-modal .modal-content {
  padding: 0;
  max-height: calc(80vh - 60px);
  overflow-y: auto;
  background: var(--bg-primary);
}

.settings-section {
  margin: 0;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  transition: background-color 0.2s ease;
}

.settings-section:hover {
  background: var(--bg-secondary);
}

.settings-section:last-child {
  border-bottom: none;
  border-radius: 0 0 16px 16px;
}

.settings-section h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.settings-section h4 i {
  color: var(--primary-color);
  font-size: 0.9rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.setting-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
}

.setting-item label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
}

.setting-item .theme-toggle,
.setting-item .reset-btn,
.setting-item .export-btn,
.setting-item .import-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 36px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.setting-item .theme-toggle::before,
.setting-item .reset-btn::before,
.setting-item .export-btn::before,
.setting-item .import-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s ease;
}

.setting-item .theme-toggle:hover::before,
.setting-item .reset-btn:hover::before,
.setting-item .export-btn:hover::before,
.setting-item .import-btn:hover::before {
  left: 100%;
}

.setting-item .theme-toggle {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
}

.setting-item .theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.setting-item .reset-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.setting-item .reset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.setting-item .export-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.setting-item .export-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.setting-item .import-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.setting-item .import-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.setting-item .install-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.setting-item .install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.setting-item .test-notification-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.setting-item .test-notification-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.install-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success-color);
  font-size: 0.8rem;
  font-weight: 500;
}

.install-status i {
  font-size: 1rem;
}

.version-info,
.stats-info {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  min-width: 50px;
  text-align: center;
}

/* Compact Stats Row */
.compact-section {
  padding: 0.75rem 1.5rem !important;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 0.5rem 0.25rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.stat-item:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Toggle Switch */
.toggle-switch,
label.toggle-switch,
.setting-item .toggle-switch,
.settings-section .toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px !important;
  height: 22px !important;
  cursor: pointer;
  flex-shrink: 0;
  max-width: 40px !important;
  min-width: 40px !important;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
  border: 1px solid transparent;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(59, 130, 246, 0.2),
    0 2px 8px rgba(59, 130, 246, 0.3);
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Hover effects */
.toggle-switch:hover .toggle-slider {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch:hover input:checked + .toggle-slider {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 4px rgba(59, 130, 246, 0.25),
    0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Active state */
.toggle-switch:active .toggle-slider:before {
  transform: scale(0.95);
}

.toggle-switch:active input:checked + .toggle-slider:before {
  transform: translateX(18px) scale(0.95);
}

/* Mobile Settings */
@media (max-width: 768px) {
  .settings-modal {
    width: 95%;
    margin: 0.5rem;
    max-height: 85vh;
    border-radius: 12px;
  }
  
  .settings-modal .modal-header {
    padding: 0.875rem 1.25rem;
    border-radius: 12px 12px 0 0;
  }
  
  .settings-modal .modal-header h3 {
    font-size: 1.1rem;
  }
  
  .settings-modal .modal-close {
    width: 30px;
    height: 30px;
  }
  
  .settings-section {
    padding: 0.875rem 1.25rem;
  }
  
  .settings-section h4 {
    font-size: 0.9rem;
    margin-bottom: 0.625rem;
  }
  
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.625rem 0;
  }
  
  .setting-item:not(:last-child) {
    margin-bottom: 0.625rem;
    padding-bottom: 0.625rem;
  }
  
  .setting-item label {
    font-size: 0.85rem;
    font-weight: 600;
  }
  
  .setting-item .theme-toggle,
  .setting-item .reset-btn,
  .setting-item .export-btn,
  .setting-item .import-btn,
  .setting-item .install-btn,
  .setting-item .test-notification-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    min-height: 44px;
    font-size: 0.9rem;
  }
  
  /* Horizontal layout for all setting items on mobile */
  .setting-item:has(.theme-toggle),
  .setting-item:has(.reset-btn),
  .setting-item:has(.export-btn),
  .setting-item:has(.import-btn),
  .setting-item:has(.install-btn),
  .setting-item:has(.test-notification-btn),
  .setting-item:has(.toggle-switch) {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  
  .setting-item:has(.theme-toggle) label,
  .setting-item:has(.reset-btn) label,
  .setting-item:has(.export-btn) label,
  .setting-item:has(.import-btn) label,
  .setting-item:has(.install-btn) label,
  .setting-item:has(.test-notification-btn) label,
  .setting-item:has(.toggle-switch) label {
    margin-bottom: 0 !important;
  }
  
  .setting-item:has(.theme-toggle) .theme-toggle,
  .setting-item:has(.reset-btn) .reset-btn,
  .setting-item:has(.export-btn) .export-btn,
  .setting-item:has(.import-btn) .import-btn,
  .setting-item:has(.install-btn) .install-btn,
  .setting-item:has(.test-notification-btn) .test-notification-btn {
    width: auto !important;
    min-width: 120px;
    padding: 0.6rem 1rem !important;
  }
  
  .setting-item:has(.toggle-switch) .toggle-switch {
    width: 40px !important;
    min-width: 40px;
    max-width: 40px !important;
  }
  
  .version-info,
  .stats-info {
    width: 100%;
    text-align: center;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }
  
  .compact-section {
    padding: 0.625rem 1.25rem !important;
  }
  
  .stats-row {
    gap: 0.375rem;
    margin-top: 0.375rem;
  }
  
  .stat-item {
    padding: 0.375rem 0.125rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
    margin-bottom: 0.125rem;
  }
  
  .stat-value {
    font-size: 0.8rem;
  }
  
  .toggle-switch {
    width: 40px !important;
    height: 22px !important;
    max-width: 40px !important;
    min-width: 40px !important;
  }
  
  .toggle-slider:before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
  }
  
  input:checked + .toggle-slider:before {
    transform: translateX(18px);
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .settings-modal {
    width: 98%;
    margin: 0.25rem;
    max-height: 90vh;
  }
  
  .settings-modal .modal-header {
    padding: 0.75rem 1rem;
  }
  
  .settings-modal .modal-header h3 {
    font-size: 1rem;
  }
  
  .settings-section {
    padding: 0.75rem 1rem;
  }
  
  .settings-section h4 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  
  .setting-item {
    padding: 0.5rem 0;
  }
  
  .setting-item:not(:last-child) {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .setting-item label {
    font-size: 0.8rem;
  }
  
  .setting-item .theme-toggle,
  .setting-item .reset-btn,
  .setting-item .export-btn,
  .setting-item .import-btn,
  .setting-item .install-btn,
  .setting-item .test-notification-btn {
    padding: 0.625rem 0.875rem;
    min-height: 40px;
    font-size: 0.85rem;
  }
  
  /* Horizontal layout for all setting items on extra small mobile */
  .setting-item:has(.theme-toggle),
  .setting-item:has(.reset-btn),
  .setting-item:has(.export-btn),
  .setting-item:has(.import-btn),
  .setting-item:has(.install-btn),
  .setting-item:has(.test-notification-btn),
  .setting-item:has(.toggle-switch) {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  
  .setting-item:has(.theme-toggle) label,
  .setting-item:has(.reset-btn) label,
  .setting-item:has(.export-btn) label,
  .setting-item:has(.import-btn) label,
  .setting-item:has(.install-btn) label,
  .setting-item:has(.test-notification-btn) label,
  .setting-item:has(.toggle-switch) label {
    margin-bottom: 0 !important;
  }
  
  .setting-item:has(.theme-toggle) .theme-toggle,
  .setting-item:has(.reset-btn) .reset-btn,
  .setting-item:has(.export-btn) .export-btn,
  .setting-item:has(.import-btn) .import-btn,
  .setting-item:has(.install-btn) .install-btn,
  .setting-item:has(.test-notification-btn) .test-notification-btn {
    width: auto !important;
    min-width: 100px;
    padding: 0.5rem 0.75rem !important;
  }
  
  .setting-item:has(.toggle-switch) .toggle-switch {
    width: 40px !important;
    min-width: 40px;
    max-width: 40px !important;
  }
  
  .version-info,
  .stats-info {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .compact-section {
    padding: 0.5rem 1rem !important;
  }
  
  .stats-row {
    gap: 0.25rem;
    margin-top: 0.25rem;
  }
  
  .stat-item {
    padding: 0.25rem 0.125rem;
  }
  
  .stat-label {
    font-size: 0.6rem;
    margin-bottom: 0.125rem;
  }
  
  .stat-value {
    font-size: 0.75rem;
  }
}

/* Custom Confirmation Modal */
.confirm-modal {
  max-width: 320px;
  width: 90%;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.confirm-modal .modal-header {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 12px 12px 0 0;
  padding: 0.75rem 1rem;
}

.confirm-modal .modal-header h3 {
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.confirm-modal .modal-header h3 i {
  font-size: 0.9rem;
  opacity: 0.9;
}

.confirm-modal .modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.confirm-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.confirm-content {
  text-align: center;
  padding: 1rem 1rem 1.25rem 1rem;
}

.confirm-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.75rem;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fecaca;
}

.confirm-icon i {
  font-size: 1.25rem;
  color: #ef4444;
}

.confirm-content h4 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.confirm-content p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 1rem 0;
}

.confirm-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.btn-cancel,
.btn-confirm {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 36px;
  min-width: 80px;
  justify-content: center;
}

.btn-cancel {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-cancel:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-confirm {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-delete {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-reset {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.btn-reset:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Mobile Confirmation Modal */
@media (max-width: 768px) {
  .confirm-modal {
    width: 90%;
    margin: 1rem;
    border-radius: 10px;
    max-width: 280px;
  }
  
  .confirm-modal .modal-header {
    padding: 0.625rem 0.875rem;
    border-radius: 10px 10px 0 0;
  }
  
  .confirm-modal .modal-header h3 {
    font-size: 0.9rem;
  }
  
  .confirm-content {
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
  }
  
  .confirm-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
  }
  
  .confirm-icon i {
    font-size: 1rem;
  }
  
  .confirm-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
  
  .confirm-content p {
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
  }
  
  .confirm-actions {
    gap: 0.375rem;
  }
  
  .btn-cancel,
  .btn-confirm {
    padding: 0.5rem 0.875rem;
    min-height: 40px;
    font-size: 0.8rem;
    min-width: 70px;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .confirm-modal {
    width: 85%;
    margin: 1.5rem;
    max-width: 260px;
  }
  
  .confirm-modal .modal-header {
    padding: 0.5rem 0.75rem;
  }
  
  .confirm-modal .modal-header h3 {
    font-size: 0.85rem;
  }
  
  .confirm-content {
    padding: 0.375rem 0.375rem 0.625rem 0.375rem;
  }
  
  .confirm-icon {
    width: 35px;
    height: 35px;
    margin-bottom: 0.375rem;
  }
  
  .confirm-icon i {
    font-size: 0.9rem;
  }
  
  .confirm-content h4 {
    font-size: 0.85rem;
    margin-bottom: 0.125rem;
  }
  
  .confirm-content p {
    font-size: 0.65rem;
    margin-bottom: 0.625rem;
  }
  
  .confirm-actions {
    gap: 0.25rem;
  }
  
  .btn-cancel,
  .btn-confirm {
    padding: 0.45rem 0.75rem;
    min-height: 36px;
    font-size: 0.75rem;
    min-width: 65px;
  }
}

/* Goal Type Badge */
.goal-type-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-left: 0.5rem;
}

.goal-type-badge.daily {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Goal Header Actions */
.goal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

.info-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.info-btn i {
  font-size: 1rem;
}

/* Goal Info Modal */
.goal-info-modal {
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.goal-info-modal .modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 1rem 1rem 0 0;
  padding: 1.5rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.goal-info-modal .modal-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.goal-info-modal .modal-header h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.goal-info-modal .modal-content {
  padding: 2rem;
  max-height: calc(85vh - 100px);
  overflow-y: auto;
  background: var(--bg-primary);
}

.goal-info-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.goal-info-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 0.75rem 0.75rem 0 0;
}

.goal-info-header h4 {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.goal-category-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 0.75rem 0.75rem 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.daily-stats-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.daily-stats-section h5 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.consistency-tracker-info {
  margin: 1rem 0;
  text-align: center;
}

.consistency-tracker-info h6 {
  color: var(--text-primary);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.consistency-tracker-info .consistency-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.missed-days-info {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.1);
  border-radius: 0.5rem;
}

.missed-days-info h6 {
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.missed-days-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.missed-day-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem;
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.1);
  border-radius: 0.375rem;
  font-size: 0.8rem;
}

.missed-day-item i {
  color: var(--danger-color);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.missed-day-item span {
  color: var(--text-primary);
  font-weight: 500;
}

.more-missed-days {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-style: italic;
  padding: 0.25rem;
}

.goal-timeline {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.goal-timeline h6 {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.timeline-item i {
  color: var(--primary-color);
  font-size: 1rem;
  flex-shrink: 0;
}

.timeline-item.completed i {
  color: var(--success-color);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.timeline-content strong {
  color: var(--text-primary);
  font-size: 0.85rem;
}

.timeline-content span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Mobile responsive for goal info modal */
@media (max-width: 768px) {
  .goal-info-modal {
    width: 95%;
    max-height: 90vh;
    border-radius: 1rem;
    margin: 1rem;
  }
  
  .goal-info-modal .modal-header {
    padding: 1.25rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
  }
  
  .goal-info-modal .modal-header h3 {
    font-size: 1.2rem;
  }
  
  .goal-info-modal .modal-content {
    padding: 1.5rem;
    max-height: calc(90vh - 90px);
    overflow-y: auto;
  }
  
  .goal-header-actions {
    gap: 0.5rem;
  }
  
  .info-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 0.5rem;
    border-radius: 0.5rem;
  }
  
  .info-btn i {
    font-size: 1rem;
  }
  
  .goal-info-header {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
  }
  
  .goal-info-header h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }
  
  .goal-category-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.875rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .stat-card {
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  .stat-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  
  .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .daily-stats-section {
    margin: 1.25rem 0;
    padding: 1rem;
    border-radius: 0.75rem;
  }
  
  .daily-stats-section h5 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  
  .consistency-tracker-info {
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
  }
  
  .consistency-tracker-info h6 {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }
  
  .consistency-tracker-info .consistency-dots {
    gap: 0.375rem;
  }
  
  .missed-days-info {
    margin-top: 1rem;
    padding: 0.875rem;
    border-radius: 0.5rem;
  }
  
  .missed-days-info h6 {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }
  
  .missed-day-item {
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
  }
  
  .missed-day-item i {
    font-size: 0.75rem;
  }
  
  .goal-timeline {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 0.75rem;
  }
  
  .goal-timeline h6 {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  
  .timeline-item {
    padding: 0.5rem 0;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .timeline-item:last-child {
    border-bottom: none;
  }
  
  .timeline-item i {
    font-size: 1rem;
    flex-shrink: 0;
  }
  
  .timeline-content strong {
    font-size: 0.85rem;
    margin-bottom: 0.125rem;
  }
  
  .timeline-content span {
    font-size: 0.75rem;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .goal-detail-header {
    gap: 0.375rem;
    margin-bottom: 0.875rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
  }
  
  .back-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-height: 36px;
    border-radius: 0.375rem;
  }
  
  .goal-actions {
    gap: 0.375rem;
    padding: 0.2rem;
    border-radius: 0.75rem;
  }
  
  .goal-actions .btn {
    padding: 0;
    font-size: 0;
    min-height: 40px;
    min-width: 40px;
    border-radius: 0.625rem;
  }
  
  .goal-actions .btn i {
    font-size: 1rem;
  }
  
  /* Mobile responsive for info buttons */
  .goal-header-actions.desktop-only {
    display: none;
  }
  
  .goal-footer-actions.mobile-only {
    display: flex;
  }
  
  .goal-detail-content {
    padding: 1rem;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
  }
  
  .goal-detail-content .goal-title {
    font-size: 1.25rem;
  }
  
  .goal-detail-content .goal-description {
    font-size: 0.95rem;
    padding: 0.875rem;
  }
  
  .goal-detail-content .meta-item {
    padding: 0.625rem;
    font-size: 0.85rem;
  }
  
  .goal-detail-content .task-item {
    padding: 0.625rem;
    font-size: 0.9rem;
  }
  
  .goal-detail-content .task-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
  }
  
  .goal-info-modal {
    width: 98%;
    margin: 0.5rem;
    border-radius: 0.75rem;
  }
  
  .goal-info-modal .modal-content {
    padding: 1.25rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }
  
  .stat-card {
    padding: 1rem;
    border-radius: 0.75rem;
  }
  
  .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .stat-value {
    font-size: 1.4rem;
  }
  
  .daily-stats-section {
    padding: 0.875rem;
  }
  
  .goal-timeline {
    padding: 0.875rem;
  }
  
  .timeline-item {
    padding: 0.375rem 0;
    gap: 0.5rem;
  }
  
  .timeline-item i {
    font-size: 0.9rem;
  }
  
  .timeline-content strong {
    font-size: 0.8rem;
  }
  
  .timeline-content span {
    font-size: 0.7rem;
  }
}
