/* Fresh Meadow Theme */
[data-theme="meadow"] {
  --color-primary: #10b981;
  --color-primary-rgb: 16, 185, 129;
  --color-primary-dark: #059669;
  --color-secondary: #3b82f6;
  --color-secondary-button: #3b82f6; /* Button-friendly secondary color */
  --color-accent: #f59e0b;
  --color-bg: #f0fdf4;
  --color-card: #ffffff;
  --color-text: #064e3b;
  --color-text-light: #6b7280;
  --color-success: #22c55e;
  --color-warning: #ef4444;
  --color-border: #d1fae5;

  --gradient-complete: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-streak: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --shadow-card: 0 1px 3px rgba(16, 185, 129, 0.1);
  --shadow-button: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Sunset Citrus Theme */
[data-theme="citrus"] {
  --color-primary: #f97316;
  --color-primary-rgb: 249, 115, 22;
  --color-primary-dark: #ea580c;
  --color-secondary: #14b8a6;
  --color-secondary-button: #14b8a6; /* Button-friendly secondary color */
  --color-accent: #fbbf24;
  --color-bg: #fffbeb;
  --color-card: #ffffff;
  --color-text: #7c2d12;
  --color-text-light: #78716c;
  --color-success: #10b981;
  --color-warning: #ef4444;
  --color-border: #fed7aa;

  --gradient-complete: linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
  --gradient-streak: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  --shadow-card: 0 1px 3px rgba(249, 115, 22, 0.1);
  --shadow-button: 0 4px 12px rgba(249, 115, 22, 0.4);
}

/* Ocean Depth Theme */
[data-theme="ocean"] {
  --color-primary: #1e40af;
  --color-primary-rgb: 30, 64, 175;
  --color-primary-dark: #1e3a8a;
  --color-secondary: #e0e7ff; /* Light indigo - matches stat card borders */
  --color-secondary-button: #3b82f6; /* Sky blue - visible with white text */
  --color-accent: #34d399;
  --color-bg: #eff6ff; /* Light blue tint - modern feel like other themes */
  --color-card: #ffffff;
  --color-text: #0f172a;
  --color-text-light: #64748b;
  --color-success: #059669;
  --color-warning: #dc2626;
  --color-border: #dbeafe; /* Slightly darker blue border for better definition */

  --gradient-complete: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  --gradient-streak: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --shadow-card: 0 1px 3px rgba(30, 64, 175, 0.1);
  --shadow-button: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Ocean theme: light secondary buttons need dark text */
[data-theme="ocean"] .btn-secondary {
  color: #1e40af;
  border: 1px solid #c7d2fe;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

.container {
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
}

/* Header styles - Modern gradient */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--gradient-complete);
  color: white;
  margin: -1rem -1rem 1.5rem -1rem;
  border-radius: 0 0 20px 20px;
  box-shadow:
    0 4px 20px rgba(var(--color-primary-rgb), 0.25),
    0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
}

.header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

.header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Card styles - Modern glassmorphism */
.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card.chore-card {
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.9);
}

.card.chore-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 40px rgba(var(--color-primary-rgb), 0.15),
    0 4px 12px rgba(0, 0, 0, 0.05);
}

.card.chore-card.completed {
  border-left-color: var(--color-success);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.08) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
}

/* Button styles - Modern with depth */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-complete);
  color: white;
  box-shadow:
    0 4px 14px rgba(var(--color-primary-rgb), 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgba(var(--color-primary-rgb), 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 2px 8px rgba(var(--color-primary-rgb), 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
}

.btn-secondary:hover {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.15);
}

.btn-warning {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.45);
}

/* Full-width button variant */
.btn-block {
  display: flex;
  width: 100%;
}

/* Frequency segmented control - shared by AddChoreModal and TemplateSelector */
.frequency-segmented {
  display: flex;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.frequency-segmented.disabled {
  opacity: 0.6;
}

.frequency-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  background: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-text-light);
}

.frequency-btn:not(:last-child) {
  border-right: 1px solid var(--color-border);
}

.frequency-btn.active:not(:last-child) {
  border-right-color: var(--color-primary);
}

.frequency-btn:hover:not(:disabled):not(.active) {
  background: var(--color-bg);
}

.frequency-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.frequency-btn.active:hover {
  background: white;
  color: var(--color-primary);
}

.frequency-btn:disabled {
  cursor: not-allowed;
}

/* Day pills for custom frequency */
.day-pills {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.day-pill {
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  background: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.day-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Recurring chore hint */
.recurring-hint {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(var(--color-primary-rgb), 0.1);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--color-primary-dark);
}

/* Chore styles */
.chore-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.chore-name {
  font-weight: 600;
  font-size: 1rem;
}

.chore-points {
  background: linear-gradient(135deg, var(--color-accent) 0%, #f97316 100%);
  color: white;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.chore-description {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

/* Leaderboard styles - Modern glass */
.leaderboard {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.leaderboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.875rem;
  border-radius: 10px;
  margin-bottom: 0.375rem;
  transition: all 0.15s ease;
}

.leaderboard-row:hover {
  background: rgba(var(--color-primary-rgb), 0.06);
}

.leaderboard-row:first-child {
  background: linear-gradient(
    135deg,
    rgba(var(--color-primary-rgb), 0.12) 0%,
    rgba(var(--color-primary-rgb), 0.04) 100%
  );
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
}

.leaderboard-rank {
  font-weight: 700;
  width: 1.75rem;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.leaderboard-name {
  flex-grow: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.leaderboard-points {
  font-weight: 700;
  background: var(--gradient-complete);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.95rem;
}

.streak {
  background: var(--gradient-streak);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

/* Activity feed - Modern */
.activity-feed {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--color-primary-rgb), 0.2) transparent;
}

.activity-feed::-webkit-scrollbar {
  width: 6px;
}

.activity-feed::-webkit-scrollbar-track {
  background: transparent;
}

.activity-feed::-webkit-scrollbar-thumb {
  background: rgba(var(--color-primary-rgb), 0.2);
  border-radius: 3px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.08);
  transition: background 0.15s ease;
}

.activity-item:hover {
  background: rgba(var(--color-primary-rgb), 0.04);
}

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

.activity-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.activity-time {
  font-size: 0.7rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.live-indicator {
  color: var(--color-success);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Modal styles - Modern glass */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.75rem;
  max-width: 90%;
  width: 400px;
  max-height: 90%;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

/* PIN entry - Modern */
.pin-display {
  display: flex;
  justify-content: center;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.pin-dot {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(var(--color-primary-rgb), 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-dot.filled {
  background: var(--gradient-complete);
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.4);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  aspect-ratio: 1;
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--color-text);
}

.pin-key:hover {
  background: rgba(var(--color-primary-rgb), 0.1);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  transform: scale(1.02);
}

.pin-key:active {
  background: var(--gradient-complete);
  color: white;
  transform: scale(0.98);
}

/* Celebration styles - Modern */
.celebration {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(
    180deg,
    rgba(var(--color-primary-rgb), 0.08) 0%,
    transparent 100%
  );
  border-radius: 16px;
}

.celebration-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: celebrateBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes celebrateBounce {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  70% {
    transform: scale(0.95) rotate(-2deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.celebration-points {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-complete);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.375rem;
  letter-spacing: -0.02em;
}

.celebration-total {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Form styles - Modern */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.form-input:hover {
  border-color: rgba(var(--color-primary-rgb), 0.35);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
  background: white;
}

/* ========================================
   HIGH-IMPACT POLISH (Jan 20, 2026)
   ======================================== */

/* 1. Smooth focus states for all inputs */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transition: all 0.15s ease;
}

/* 2. Interactive button transitions */
button,
.btn {
  transition: all 0.15s ease;
}

/* btn-primary:hover already defined in button section above */

/* btn-secondary:hover already defined in button section above */

/* 3. Disabled button state */
button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* 4. Clear emoji selection */
.emoji-option {
  border: 2px solid transparent;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  background: white;
}

.emoji-option:hover {
  background-color: #f3f4f6;
}

.emoji-option.selected {
  border-color: #2563eb;
  background-color: #eff6ff;
}

/* 6. Event Name + Emoji Row (compact, responsive) */
.name-emoji-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 8px;
  align-items: center;
}

.event-name-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  min-width: 0; /* Allows shrinking in grid */
}

.emoji-select {
  width: 70px;
  height: 44px; /* iOS touch target */
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1.25rem;
  background: var(--color-card);
  cursor: pointer;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.emoji-select:hover {
  border-color: var(--color-primary);
}

/* Responsive: wrap emoji below name on narrow screens */
@media (max-width: 380px) {
  .name-emoji-row {
    grid-template-columns: 1fr;
  }
  .emoji-select {
    justify-self: end;
  }
}

/* 5. Modal footer separator */
.modal-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

/* Utility classes */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-8 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-8 {
  margin-top: 2rem;
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-4 {
  gap: 1rem;
}

.hidden {
  display: none;
}

/* Stats grid - Modern bento style */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-complete);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.12);
}

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

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-complete);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.125rem;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Highlight important stats */
.stat-item.highlight {
  background: linear-gradient(
    135deg,
    rgba(var(--color-primary-rgb), 0.1) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  border-color: rgba(var(--color-primary-rgb), 0.25);
}

.stat-item.highlight::before {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
  }

  .header {
    margin: -0.5rem -0.5rem 1rem -0.5rem;
  }

  .modal {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* =============================================================================
   CELEBRATION ANIMATIONS
   Used by confetti.js for chore completion feedback
   ============================================================================= */

/* Standard chore completion - Green pulse effect */
.chore-card-success {
  animation: success-pulse 0.6s ease-out forwards;
  position: relative;
  z-index: 10;
}

@keyframes success-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  30% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 10px rgba(16, 185, 129, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 40px 20px rgba(16, 185, 129, 0);
  }
}

/* Milestone achievement - Golden shimmer effect */
.milestone-glow {
  animation: milestone-shimmer 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  z-index: 20;
}

@keyframes milestone-shimmer {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  20% {
    transform: scale(1.08);
    box-shadow: 0 0 15px #f59e0b, 0 0 30px #fbbf24, 0 0 45px #fcd34d;
    filter: brightness(1.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 60px 30px rgba(245, 158, 11, 0);
    filter: brightness(1);
  }
}

/* Weekly finale - Screen shake effect */
.weekly-finale-shake {
  animation: screen-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screen-shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Bonus points - Amber glow (for bonus_points type) */
.bonus-glow {
  animation: bonus-pulse 0.7s ease-out forwards;
}

@keyframes bonus-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  30% {
    transform: scale(1.06);
    box-shadow: 0 0 25px 12px rgba(245, 158, 11, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 50px 25px rgba(245, 158, 11, 0);
  }
}

/* =============================================================================
   ACCESSIBILITY - Reduced Motion
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover,
  .stat-item:hover,
  .btn:hover,
  .leaderboard-row:hover {
    transform: none;
  }
}
