/* ===== CONSISTENCYPULSE - ADDICTIVE STYLES ===== */
/* Vibrant, game-like, with smooth micro-interactions */

/* ---------- CSS VARIABLES (Light Mode Base) ---------- */
:root {
  --bg-primary: #f0f4ff;
  --bg-secondary: #ffffff;
  --text-primary: #1a1e2b;
  --text-secondary: #4a5568;
  --accent-primary: #7c3aed;      /* Electric Violet */
  --accent-secondary: #f43f5e;    /* Neon Rose */
  --accent-tertiary: #06b6d4;     /* Cyan */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
  --gradient-progress: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
  --gradient-streak: linear-gradient(45deg, #ff9a9e 0%, #fecfef 100%);
  
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.02);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
  
  --border-radius-card: 24px;
  --border-radius-element: 16px;
  --border-radius-pill: 40px;
  
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides (activated by JS or prefers-color-scheme) */
body.dark-theme {
  --bg-primary: #0b0f19;
  --bg-secondary: #1a1f2e;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent-primary: #a78bfa;
  --accent-secondary: #fb7185;
  --accent-tertiary: #22d3ee;
  --gradient-card: linear-gradient(145deg, rgba(26,31,46,0.9) 0%, rgba(15,23,42,0.8) 100%);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.2);
}

/* ---------- RESET & BASE ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  position: relative;
}

/* Add a subtle animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(124,58,237,0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(244,63,94,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: bgPulse 12s infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.app {
  max-width: 500px;
  margin: 0 auto;
  padding: 16px 12px 80px;
  position: relative;
}

/* ---------- OFFLINE BANNER ---------- */
.offline-banner {
  background: var(--warning);
  color: #000;
  text-align: center;
  padding: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  border-bottom: 2px solid rgba(0,0,0,0.1);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- HEADER (Level & Points) ---------- */
.main-header {
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px var(--accent-primary));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text span {
  color: var(--accent-secondary);
}

.level-badge {
  background: var(--gradient-card);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: var(--border-radius-pill);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 1.2rem;
  transition: transform 0.2s var(--transition-bounce);
}

.level-badge:active {
  transform: scale(0.95);
}

.points-progress {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-element);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
}

.points-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
}

.points-value {
  color: var(--accent-primary);
  font-size: 1.2rem;
  font-weight: 800;
}

.level-progress-bar {
  height: 10px;
  background: rgba(0,0,0,0.1);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 6px;
}

.level-progress-fill {
  height: 100%;
  background: var(--gradient-progress);
  border-radius: 20px;
  width: 0%;
  transition: width 0.5s var(--transition-smooth);
  box-shadow: 0 0 10px #f5576c;
}

.next-level-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---------- STATS GRID (3 Cards) ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-element);
  padding: 14px 8px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s var(--transition-bounce);
  animation: cardAppear 0.5s ease backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }

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

.stat-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-glow);
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.1));
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ---------- QUOTE CARD ---------- */
.quote-card {
  background: var(--gradient-card);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-element);
  padding: 16px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  border-left: 6px solid var(--accent-primary);
  transition: transform 0.2s;
}

.quote-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
  line-height: 1.4;
}

.quote-author {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ---------- ADD HABIT FORM ---------- */
.add-habit-section {
  margin-bottom: 28px;
}

.add-habit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.habit-input {
  flex: 2 1 160px;
  padding: 16px 16px;
  border: 2px solid transparent;
  border-radius: var(--border-radius-pill);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.habit-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.2), var(--shadow-md);
  transform: scale(1.01);
}

.habit-category-select {
  flex: 1 1 100px;
  padding: 16px 8px;
  border-radius: var(--border-radius-pill);
  border: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.add-btn {
  flex: 0 0 auto;
  padding: 16px 24px;
  border-radius: var(--border-radius-pill);
  background: var(--gradient-hero);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-md), 0 0 15px rgba(102,126,234,0.5);
  cursor: pointer;
  transition: all 0.2s var(--transition-bounce);
  border: 1px solid rgba(255,255,255,0.3);
}

.add-btn:active {
  transform: scale(0.92);
  box-shadow: var(--shadow-sm);
}

.input-hint {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-left: 8px;
}

/* ---------- HABIT LIST (Cards) ---------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.icon-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.2s;
}

.icon-btn:active {
  background: rgba(0,0,0,0.05);
}

.habit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.habit-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-card);
  padding: 18px 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s var(--transition-smooth);
  animation: slideIn 0.4s ease backwards;
  position: relative;
  overflow: hidden;
}

.habit-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--gradient-progress);
}

.habit-card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

.habit-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.habit-name {
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.habit-category-tag {
  background: rgba(124,58,237,0.15);
  padding: 4px 8px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.streak-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-flame {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px #f59e0b);
  animation: flameFlicker 1.5s infinite alternate;
}

@keyframes flameFlicker {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(1.1); opacity: 1; }
}

.streak-count {
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--gradient-streak);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.habit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Custom check button (big satisfying tap) */
.done-btn {
  background: var(--success);
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-weight: 700;
  color: white;
  font-size: 1rem;
  box-shadow: 0 6px 0 #0b5e42, 0 4px 10px rgba(16,185,129,0.4);
  cursor: pointer;
  transition: all 0.05s linear;
  border: 1px solid rgba(255,255,255,0.3);
  transform: translateY(-3px);
}

.done-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #0b5e42, 0 4px 8px rgba(16,185,129,0.4);
}

.done-btn:disabled {
  background: #94a3b8;
  box-shadow: 0 4px 0 #475569;
  transform: translateY(-2px);
  opacity: 0.7;
  cursor: not-allowed;
}

.more-options-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  padding: 6px;
  border-radius: 30px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.2s;
}

.more-options-btn:active {
  background: rgba(0,0,0,0.05);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-card);
  opacity: 0.8;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

/* ---------- WEEKLY HEATMAP ---------- */
.weekly-section {
  margin: 28px 0;
}

.week-range {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.weekly-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: var(--bg-secondary);
  padding: 18px 12px;
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(4px);
}

.heatmap-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.day-label {
  font-weight: 700;
  color: var(--text-secondary);
}

.heat-cell {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  transition: all 0.2s;
  border: 2px solid rgba(255,255,255,0.3);
}

/* Intensity levels (0-4) */
.intensity-0 { background: #e2e8f0; }
.intensity-1 { background: #fecdd3; }
.intensity-2 { background: #fb923c; }
.intensity-3 { background: #f97316; }
.intensity-4 { background: #ea580c; box-shadow: 0 0 12px #f97316; }

body.dark-theme .intensity-0 { background: #334155; }
body.dark-theme .intensity-1 { background: #be123c; }
body.dark-theme .intensity-2 { background: #e11d48; }
body.dark-theme .intensity-3 { background: #f43f5e; }
body.dark-theme .intensity-4 { background: #fb7185; }

.completion-badge {
  font-size: 0.7rem;
  font-weight: 600;
}
/* ---------- BADGES & ACHIEVEMENTS ---------- */
.badges-section {
  margin: 28px 0;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.badge-item {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 20px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  border: 1px solid rgba(124,58,237,0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.badge-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #f43f5e);
  opacity: 0;
  transition: opacity 0.3s;
}

.badge-item.unlocked::before {
  opacity: 1;
}

.badge-item.locked {
  opacity: 0.5;
  filter: grayscale(0.4);
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
}

.badge-item.unlocked {
  animation: badgeGlow 2.5s infinite alternate;
  border-color: #fbbf24;
}

@keyframes badgeGlow {
  from { 
    box-shadow: 0 8px 16px rgba(0,0,0,0.08), 0 0 8px rgba(250,204,21,0.3); 
  }
  to { 
    box-shadow: 0 8px 16px rgba(0,0,0,0.12), 0 0 20px rgba(250,204,21,0.6); 
  }
}

.badge-emoji {
  font-size: 2.8rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.badge-item.locked .badge-emoji {
  filter: grayscale(0.6) drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.badge-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.badge-progress {
  font-size: 0.8rem;
  background: rgba(124,58,237,0.12);
  padding: 5px 12px;
  border-radius: 30px;
  color: #7c3aed;
  font-weight: 700;
  border: 1px solid rgba(124,58,237,0.2);
}

.badge-item.unlocked .badge-progress {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: white;
  border: none;
}

/* Dark mode support */
body.dark-theme .badge-item {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-color: rgba(124,58,237,0.3);
}

body.dark-theme .badge-item.locked {
  background: linear-gradient(145deg, #334155, #1e293b);
}

body.dark-theme .badge-name {
  color: #f1f5f9;
}

body.dark-theme .badge-progress {
  background: rgba(167,139,250,0.15);
  color: #a78bfa;
}
/* ---------- REMINDER CARD ---------- */
.reminder-section {
  margin: 24px 0;
}

.reminder-card {
  background: linear-gradient(135deg, #667eea15, #764ba215);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

body.dark-theme .reminder-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-color: rgba(167, 139, 250, 0.3);
}

.reminder-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reminder-icon {
  font-size: 2.2rem;
  animation: ring 2.5s infinite;
}

@keyframes ring {
  0%, 100% { transform: rotate(0); }
  5% { transform: rotate(12deg); }
  10% { transform: rotate(-8deg); }
  15% { transform: rotate(4deg); }
  20% { transform: rotate(0); }
}

.reminder-card h3 {
  margin-bottom: 4px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.reminder-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Enable Button Specific Styling */
#enableRemindersButton {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: white;
  border: none;
  border-radius: 40px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 12px rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

#enableRemindersButton:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.4);
}

body.dark-theme #enableRemindersButton {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  color: #0f172a;
}
/* Streak Freeze Buy Button */
#buyFreezeBtn {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  color: white;
  border: none;
  border-radius: 40px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
  transition: all 0.2s;
  cursor: pointer;
}

#buyFreezeBtn:active {
  transform: scale(0.95);
}

#buyFreezeBtn:disabled {
  opacity: 0.5;
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}
/* ---------- STREAK FREEZE SHOP ---------- */
.streak-freeze-shop {
  margin: 20px 0 30px;
}

.freeze-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 60px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(6,182,212,0.2);
}

body.dark-theme .freeze-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.freeze-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 4px 6px rgba(6,182,212,0.3));
}

.freeze-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.freeze-title {
  font-weight: 700;
  font-size: 1rem;
}

.freeze-cost {
  font-size: 0.8rem;
  color: #06b6d4;
  font-weight: 700;
}

.freeze-note {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 6px;
  padding-left: 12px;
}
/* ---------- FOCUS TIMER SECTION ---------- */
.focus-timer-section {
  margin: 28px 0 20px;
}

.timer-panel {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 24px;
  padding: 20px 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border: 1px solid rgba(124,58,237,0.15);
  transition: all 0.3s ease;
}

body.dark-theme .timer-panel {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.timer-panel.collapsed {
  display: none;
}

.timer-display {
  font-size: 4.2rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 10px 0 15px;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(124,58,237,0.3);
}

.timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 16px 0;
}

.timer-controls .btn {
  flex: 1;
  padding: 12px 16px;
  font-weight: 700;
  border-radius: 40px;
  transition: all 0.2s ease;
}

.timer-presets {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 5px;
}

.preset {
  padding: 8px 18px;
  border-radius: 40px;
  border: 2px solid #7c3aed;
  background: transparent;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

body.dark-theme .preset {
  color: #f1f5f9;
  border-color: #a78bfa;
}

.preset.active {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

.preset:active {
  transform: scale(0.95);
}

.timer-note {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 14px;
  font-style: italic;
}

/* ---------- HISTORY LOG SECTION ---------- */
.history-log-section {
  margin: 24px 0 20px;
}

.activity-log {
  list-style: none;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 20px;
  padding: 8px 6px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(124,58,237,0.1);
}

body.dark-theme .activity-log {
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.log-entry {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.9rem;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

body.dark-theme .log-entry {
  color: #cbd5e1;
  border-bottom-color: rgba(255,255,255,0.05);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry:hover {
  background: rgba(124,58,237,0.04);
}

.text-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

body.dark-theme .text-btn {
  border-color: #475569;
  color: #94a3b8;
}

.text-btn:active {
  background: rgba(124,58,237,0.1);
  border-color: #7c3aed;
  color: #7c3aed;
}

/* ---------- DATA MANAGEMENT ---------- */
.data-management {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0 30px;
}

.data-management .btn {
  flex: 1 0 90px;
  padding: 12px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 40px;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  color: #1e293b;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: all 0.2s;
}

body.dark-theme .data-management .btn {
  background: linear-gradient(145deg, #334155, #1e293b);
  color: #f1f5f9;
}

.data-management .btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-management .btn-danger {
  background: linear-gradient(145deg, #fecaca, #fca5a5);
  color: #991b1b;
}

body.dark-theme .data-management .btn-danger {
  background: linear-gradient(145deg, #7f1d1d, #991b1b);
  color: #fecaca;
}

/* ---------- SECTION HEADER (for Focus & Activity titles) ---------- */
.focus-timer-section .section-header,
.history-log-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.focus-timer-section .section-title,
.history-log-section .section-title {
  font-size: 1.3rem;
  margin-bottom: 0;
}

/* ---------- ICON BUTTON (for expand/collapse) ---------- */
.icon-btn {
  background: rgba(124,58,237,0.08);
  border: none;
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 30px;
  cursor: pointer;
  color: #7c3aed;
  transition: all 0.2s;
  font-weight: 600;
}

body.dark-theme .icon-btn {
  background: rgba(167,139,250,0.1);
  color: #a78bfa;
}

.icon-btn:active {
  background: rgba(124,58,237,0.2);
  transform: scale(0.95);
}
#feedbackBtn {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  border: none;
  border-radius: 60px;
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.25);
  font-weight: 700;
}

#feedbackBtn:active {
  transform: scale(0.97);
}
/* ---------- SUPER ENHANCED FOOTER ---------- */
.app-footer {
  margin-top: 40px;
  padding: 32px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, 
    rgba(124, 58, 237, 0.03) 0%, 
    rgba(244, 63, 94, 0.05) 50%, 
    rgba(6, 182, 212, 0.03) 100%);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #7c3aed, #f43f5e, #06b6d4, #f59e0b, #7c3aed) 1;
  border-image-slice: 1;
}

/* Animated background glow */
.app-footer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(244, 63, 94, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
  animation: footerGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes footerGlow {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
  50% { transform: translate(2%, -2%) rotate(2deg); opacity: 1; }
  100% { transform: translate(-1%, 1%) rotate(-2deg); opacity: 0.7; }
}

/* Floating particles in footer */
.app-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(124, 58, 237, 0.3), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(244, 63, 94, 0.3), transparent),
    radial-gradient(2px 2px at 60% 20%, rgba(6, 182, 212, 0.3), transparent),
    radial-gradient(2px 2px at 80% 60%, rgba(245, 158, 11, 0.3), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(124, 58, 237, 0.4), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(244, 63, 94, 0.4), transparent),
    radial-gradient(2px 2px at 50% 90%, rgba(6, 182, 212, 0.3), transparent),
    radial-gradient(1px 1px at 70% 10%, rgba(245, 158, 11, 0.3), transparent);
  animation: twinkle 3s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes twinkle {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.footer-content {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-logo {
  font-size: 2rem;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
  animation: flameDance 2s ease-in-out infinite;
}

@keyframes flameDance {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8)); }
  25% { transform: scale(1.15) rotate(-5deg); filter: drop-shadow(0 0 20px rgba(245, 158, 11, 1)); }
  50% { transform: scale(1.05) rotate(3deg); filter: drop-shadow(0 0 15px rgba(245, 100, 11, 0.9)); }
  75% { transform: scale(1.2) rotate(-3deg); filter: drop-shadow(0 0 22px rgba(255, 180, 11, 1.1)); }
}

.footer-name {
  font-weight: 800;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #7c3aed 0%, #f43f5e 40%, #06b6d4 70%, #f59e0b 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-style: italic;
  letter-spacing: 0.5px;
  animation: fadeSlideUp 0.8s ease-out;
}

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

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  padding: 10px 20px;
  background: rgba(124, 58, 237, 0.05);
  border-radius: 40px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(124, 58, 237, 0.15);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}

.footer-links a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 6px 14px;
  border-radius: 30px;
  position: relative;
}

.footer-links a:hover {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: white;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.footer-links a:active {
  transform: scale(0.95);
}

.footer-divider {
  color: var(--text-secondary);
  opacity: 0.3;
  font-weight: 300;
}

.footer-version {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.85;
  line-height: 1.8;
  animation: fadeSlideUp 1s ease-out;
}

.footer-copyright strong {
  font-weight: 700;
}

.footer-location {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  padding: 4px 14px;
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.03) 0%, 
    rgba(0, 0, 0, 0.01) 100%);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  animation: pulseFlag 2s ease-in-out infinite;
}

@keyframes pulseFlag {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(0,0,0,0); }
  50% { transform: scale(1.03); box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
}

/* Dark Mode Footer */
body.dark-theme .app-footer {
  background: linear-gradient(180deg, 
    rgba(167, 139, 250, 0.03) 0%, 
    rgba(251, 113, 133, 0.04) 50%, 
    rgba(34, 211, 238, 0.02) 100%);
  border-image: linear-gradient(90deg, #a78bfa, #fb7185, #22d3ee, #fbbf24, #a78bfa) 1;
  border-image-slice: 1;
}

body.dark-theme .footer-links {
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.2);
}

body.dark-theme .footer-version {
  background: rgba(167, 139, 250, 0.1);
}

body.dark-theme .footer-location {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.03) 0%, 
    rgba(255, 255, 255, 0.01) 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Responsive Footer */
@media (max-width: 400px) {
  .app-footer {
    padding: 24px 14px 18px;
  }
  .footer-logo {
    font-size: 1.6rem;
  }
  .footer-name {
    font-size: 1.2rem;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 6px;
  }
}
