:root {
  --bg-gradient: linear-gradient(135deg, #FFF9F2 0%, #FFF0F5 50%, #F0F4FF 100%);
  --primary: #FF5A5F;
  --primary-hover: #E0484D;
  --secondary: #6C5CE7;
  --accent-yellow: #FFD166;
  --accent-green: #06D6A0;
  --accent-blue: #118AB2;
  --text-dark: #2D3436;
  --text-muted: #636E72;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(255, 255, 255, 0.6);
  --shadow: 0 10px 25px -5px rgba(108, 92, 231, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-dark);
  padding: 20px 16px 80px;
  overflow-x: hidden;
}

.container {
  max-width: 540px;
  margin: 0 auto;
}

/* Header & Mascot */
.header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.mascot {
  font-size: 3.2rem;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
  cursor: pointer;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}

.title {
  font-size: 1.85rem;
  font-weight: 800;
  background: linear-gradient(45deg, #FF5A5F, #6C5CE7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Day Streak Banner */
.stats-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 107, 107, 0.15);
}

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

.streak-fire {
  font-size: 2rem;
  animation: pulse 1.5s infinite;
}

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

.streak-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.streak-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-quick-link {
  background: #F3E8FF;
  color: var(--secondary);
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.badge-quick-link:hover {
  background: #E9D5FF;
  transform: translateY(-1px);
}

/* Tabs */
.tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: white;
  color: var(--text-dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Whimsical Idea Cards */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.refresh-btn {
  background: none;
  border: none;
  color: var(--secondary);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.whimsy-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 2px solid white;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.whimsy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.whimsy-card.completed {
  background: rgba(240, 253, 244, 0.95);
  border-color: var(--accent-green);
}

.whimsy-card.completed .card-text {
  text-decoration: line-through;
  color: #557A60;
}

.card-check {
  margin-top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.whimsy-card.completed .card-check {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

.card-content {
  flex: 1;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.tag-daily { background: #FFE8D6; color: #D45113; }
.tag-custom { background: #E0E7FF; color: #4338CA; }
.tag-spontaneous { background: #DCFCE7; color: #15803D; }
.tag-mischief { background: #FEE2E2; color: #B91C1C; }
.tag-treats { background: #FCE7F3; color: #BE185D; }
.tag-adventure { background: #E0F2FE; color: #0369A1; }
.tag-style { background: #FEF3C7; color: #B45309; }
.tag-kindness { background: #EDE9FE; color: #6D28D9; }
.tag-imagination { background: #CCFBF1; color: #0F766E; }

.card-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1E293B;
}

.delete-custom-btn {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.2s;
}

.delete-custom-btn:hover {
  color: #EF4444;
}

/* Custom Prompt Section */
.custom-input-box {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.custom-input-box input {
  flex: 1;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.custom-input-box input:focus {
  border-color: var(--primary);
}

.btn-add {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add:hover {
  background: var(--primary-hover);
}

/* Badges Showcase Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.badge-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px 14px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.badge-card.unlocked {
  border-color: #FCD34D;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF5 100%);
}

.badge-card.locked {
  filter: grayscale(0.85);
  opacity: 0.65;
}

.badge-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  display: inline-block;
}

.badge-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #0F172A;
}

.badge-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  min-height: 32px;
}

.badge-share-btn {
  background: linear-gradient(45deg, #FF6B6B, #FF8E53);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.badge-req-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: #F1F5F9;
  color: #64748B;
  padding: 4px 8px;
  border-radius: 12px;
  display: inline-block;
}

/* Modal Popup for Badge Celebration & Share */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  border-radius: 28px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  text-align: center;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #F1F5F9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-card-preview {
  background: linear-gradient(135deg, #6C5CE7, #a363d9);
  color: white;
  border-radius: 20px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 10px 25px rgba(108, 92, 231, 0.3);
}

.share-badge-icon {
  font-size: 4rem;
  margin-bottom: 6px;
  animation: bounce 1s infinite alternate ease-in-out;
}

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

.share-badge-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.share-badge-desc {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 4px;
}

.share-quote {
  margin-top: 12px;
  font-style: italic;
  font-size: 0.8rem;
  opacity: 0.85;
}

.social-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.btn-social {
  padding: 12px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.btn-native-share {
  background: var(--primary);
  color: white;
}

.btn-download-card {
  background: #F1F5F9;
  color: var(--text-dark);
}

.btn-twitter {
  background: #000;
  color: white;
}

.btn-copy {
  background: #EDE9FE;
  color: var(--secondary);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1E293B;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1500;
}