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

:root {
  --coral: #FF6B5B;
  --coral-light: #FF8A7D;
  --orange: #F7931E;
  --orange-light: #FFB347;
  --cream: #FFF8F0;
  --cream-dark: #F5E6D3;
  --forest: #2D6A4F;
  --forest-light: #40916C;
  --text-dark: #2D3436;
  --text-light: #636E72;
  --shadow: rgba(0, 0, 0, 0.1);
  --pink: #FF6B9D;
  --pink-light: #FFB3C6;
  --rose: #FF8FAB;
}

.dark-mode {
  --cream: #1A1A2E;
  --cream-dark: #16213E;
  --text-dark: #EAEAEA;
  --text-light: #B8B8B8;
  --shadow: rgba(0, 0, 0, 0.3);
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--coral) 0%, var(--orange) 50%, var(--pink) 100%);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 10 L35 25 L30 20 L25 25 Z' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.header-content {
  flex: 1;
  min-width: 200px;
  position: relative;
  z-index: 1;
}

.app-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  animation: titlePop 0.5s ease-out;
}

@keyframes titlePop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.app-tagline {
  color: rgba(255,255,255,0.95);
  font-size: 1.1rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Virtual Dog */
.virtual-dog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.dog-halo {
  position: absolute;
  top: -25px;
  font-size: 1.8rem;
  animation: haloGlow 1s ease-in-out infinite alternate;
}

@keyframes haloGlow {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

.dog-body {
  width: 80px;
  height: 80px;
  position: relative;
}

.dog-head {
  width: 60px;
  height: 50px;
  background: #C9A66B;
  border-radius: 50% 50% 45% 45%;
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset -5px -5px 10px rgba(0,0,0,0.1);
}

.dog-ear {
  width: 20px;
  height: 30px;
  background: #A67C52;
  position: absolute;
  top: 5px;
  border-radius: 50% 50% 0 0;
}

.dog-ear-left { left: 5px; transform: rotate(-15deg); }
.dog-ear-right { right: 5px; transform: rotate(15deg); }

.dog-eyes {
  display: flex;
  gap: 12px;
  margin-top: -5px;
}

.dog-eyes.heart-eyes {
  gap: 8px;
}

.heart-eye {
  font-size: 12px;
  animation: heartBeat 0.5s ease-in-out infinite;
}

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

.dog-eye {
  width: 10px;
  height: 10px;
  background: #2D3436;
  border-radius: 50%;
  position: relative;
}

.dog-eye::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  top: 1px;
  left: 2px;
}

.dog-nose {
  width: 12px;
  height: 8px;
  background: #2D3436;
  border-radius: 50%;
  margin-top: 2px;
}

.dog-mouth {
  width: 20px;
  height: 8px;
  border-bottom: 3px solid #8B6914;
  border-radius: 0 0 50% 50%;
}

.dog-tail {
  width: 8px;
  height: 25px;
  background: #A67C52;
  position: absolute;
  bottom: 10px;
  right: 0;
  border-radius: 4px;
  transform-origin: bottom center;
  animation: tailWag 0.3s ease-in-out infinite alternate;
}

@keyframes tailWag {
  0% { transform: rotate(-20deg); }
  100% { transform: rotate(20deg); }
}

.dog-happy .dog-body {
  animation: bounce 0.5s ease infinite;
}

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

.dog-excited .dog-body {
  animation: spin 0.5s ease;
}

@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

.dog-sleepy .dog-eye {
  height: 3px;
}

.dog-loving .dog-body {
  animation: lovingBounce 0.6s ease infinite;
}

@keyframes lovingBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

.dog-name {
  background: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  color: var(--coral);
  cursor: pointer;
  transition: transform 0.2s;
  font-size: 0.9rem;
}

.dog-name:hover {
  transform: scale(1.05);
}

.dog-name-input {
  width: 80px;
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--coral);
  border-radius: 20px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
}

/* Main Content */
.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* Savings Dashboard */
.savings-dashboard {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px var(--shadow);
}

.dark-mode .savings-dashboard {
  background: var(--cream-dark);
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--forest);
  margin-bottom: 1.5rem;
  text-align: center;
}

.dashboard-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Treat Jar */
.treat-jar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.treat-jar {
  width: 120px;
  height: 160px;
  position: relative;
}

.treat-jar-lid {
  width: 100px;
  height: 25px;
  background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
  border-radius: 10px 10px 5px 5px;
  position: absolute;
  top: 0;
  left: 10px;
  z-index: 2;
}

.treat-jar-body {
  width: 100px;
  height: 130px;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(200,200,200,0.2) 100%);
  border: 3px solid rgba(200,200,200,0.5);
  border-radius: 15px 15px 30px 30px;
  position: absolute;
  bottom: 0;
  left: 10px;
  overflow: hidden;
}

.treat-jar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--orange-light) 0%, var(--orange) 100%);
  transition: height 0.5s ease-out;
  border-radius: 0 0 25px 25px;
}

.treat-bone {
  position: absolute;
  width: 20px;
  height: 8px;
  background: #F5DEB3;
  border-radius: 10px;
}

.treat-bone::before,
.treat-bone::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 12px;
  background: #F5DEB3;
  border-radius: 50%;
  top: -2px;
}

.treat-bone::before { left: -3px; }
.treat-bone::after { right: -3px; }

.jar-label {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--forest);
}

/* Stats */
.savings-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 16px;
  background: var(--cream);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dark-mode .stat-card {
  background: rgba(255,255,255,0.05);
}

.stat-card:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px var(--shadow);
}

.kindness-stat {
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--rose) 100%);
}

.kindness-stat .stat-value {
  color: #C9184A;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--forest);
  margin-left: auto;
}

/* Goal Progress */
.goal-progress {
  margin-top: 1.5rem;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--text-light);
}

.progress-bar {
  height: 20px;
  background: var(--cream-dark);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest-light) 0%, var(--forest) 100%);
  border-radius: 10px;
  transition: width 0.5s ease-out;
  position: relative;
}

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

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

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Tip Generator */
.tip-generator {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px var(--shadow);
}

.dark-mode .tip-generator {
  background: var(--cream-dark);
}

.generate-tip-btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, var(--coral) 0%, var(--orange) 100%);
  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.generate-tip-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(247, 147, 30, 0.3);
}

.generate-tip-btn.spinning {
  animation: shake 0.5s ease infinite;
}

@keyframes shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.tip-bubble {
  margin-top: 1.5rem;
  background: var(--cream);
  padding: 1.25rem;
  border-radius: 16px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.dark-mode .tip-bubble {
  background: rgba(255,255,255,0.05);
}

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

.tip-bubble-arrow {
  position: absolute;
  top: -10px;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--cream);
}

.tip-bubble p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-dark);
  font-weight: 600;
}

/* Savings Form */
.savings-form {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dark-mode .savings-form {
  background: var(--cream-dark);
}

.type-toggle {
  display: flex;
  gap: 0.5rem;
}

.toggle-btn {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

.toggle-btn:hover:not(.active) {
  border-color: var(--coral);
}

.form-input {
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  transition: border-color 0.2s;
  background: var(--cream);
  font-weight: 600;
}

.form-input:focus {
  outline: none;
  border-color: var(--coral);
}

.pledge-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--pink-light) 0%, rgba(255,179,198,0.3) 100%);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.pledge-checkbox:hover {
  transform: scale(1.02);
}

.pledge-checkbox input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.pledge-label {
  font-weight: 700;
  color: var(--text-dark);
}

.pledge-amount {
  color: #C9184A;
  font-weight: 800;
}

.submit-btn {
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, var(--forest-light) 0%, var(--forest) 100%);
  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(45, 106, 79, 0.3);
}

/* Give Back Corner */
.give-back-corner {
  background: linear-gradient(135deg, #FFF5F7 0%, #FFE4EC 100%);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 10px 40px var(--shadow);
}

.dark-mode .give-back-corner {
  background: linear-gradient(135deg, #2D1F2F 0%, #3D2840 100%);
}

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

.give-back-header h3 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #C9184A;
  margin-bottom: 0.5rem;
}

.kindness-quote {
  font-style: italic;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
}

.give-back-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.give-back-stat {
  text-align: center;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(201, 24, 74, 0.1);
}

.dark-mode .give-back-stat {
  background: rgba(255,255,255,0.1);
}

.give-back-stat .stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: #C9184A;
}

.give-back-stat .stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

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

.charity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: transform 0.2s;
}

.dark-mode .charity-card {
  background: rgba(255,255,255,0.1);
}

.charity-card:hover {
  transform: scale(1.05);
}

.charity-icon {
  font-size: 2rem;
}

.log-donation-btn {
  display: block;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, var(--pink) 0%, #C9184A 100%);
  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.log-donation-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(201, 24, 74, 0.3);
}

.donation-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

.donation-actions {
  display: flex;
  gap: 1rem;
}

.submit-donation-btn {
  flex: 1;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, var(--pink) 0%, #C9184A 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.cancel-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.dedication-section {
  background: white;
  padding: 1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.dark-mode .dedication-section {
  background: rgba(255,255,255,0.1);
}

.dedication-section label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.dedication-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  border: 2px solid var(--pink-light);
  border-radius: 12px;
  background: var(--cream);
  font-weight: 600;
}

.dedication-input:focus {
  outline: none;
  border-color: var(--pink);
}

.kindness-note {
  text-align: center;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Community Board */
.community-board {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border-radius: 24px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 40px var(--shadow);
}

.dark-mode .community-board {
  background: linear-gradient(135deg, #1B3D1F 0%, #2D5A32 100%);
}

.community-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.community-icon {
  font-size: 2.5rem;
}

.community-amount {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--forest);
}

.community-label {
  color: var(--text-light);
  font-weight: 600;
}

.community-message {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}

.share-kindness-btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, var(--forest-light) 0%, var(--forest) 100%);
  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.share-kindness-btn:hover {
  transform: translateY(-3px);
}

/* Quick Tips */
.quick-tips {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px var(--shadow);
  overflow: hidden;
}

.dark-mode .quick-tips {
  background: var(--cream-dark);
}

.tips-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--coral) var(--cream);
}

.tips-carousel::-webkit-scrollbar {
  height: 6px;
}

.tips-carousel::-webkit-scrollbar-track {
  background: var(--cream);
  border-radius: 3px;
}

.tips-carousel::-webkit-scrollbar-thumb {
  background: var(--coral);
  border-radius: 3px;
}

.tip-card {
  flex: 0 0 280px;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 600;
  transition: transform 0.2s;
}

.tip-card:hover {
  transform: scale(1.02);
}

.tip-card.kindness-tip {
  background: linear-gradient(135deg, var(--pink-light) 0%, rgba(255,179,198,0.5) 100%);
}

/* Savings History */
.savings-history {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px var(--shadow);
}

.dark-mode .savings-history {
  background: var(--cream-dark);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--forest);
  color: white;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.empty-message {
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
  font-style: italic;
  font-weight: 600;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--cream);
  border-radius: 12px;
  transition: transform 0.2s;
  position: relative;
}

.history-item:hover {
  transform: translateX(5px);
}

.history-item.pledged-item {
  border-left: 4px solid var(--pink);
}

.pledge-heart {
  position: absolute;
  top: -5px;
  right: 40px;
  font-size: 0.9rem;
}

.item-icon {
  font-size: 1.5rem;
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.item-product {
  font-weight: 700;
  color: var(--text-dark);
}

.item-date {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.item-note {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

.item-amount {
  font-weight: 800;
  color: var(--forest);
  font-size: 1.1rem;
}

.delete-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}

.delete-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Memorial Ribbon */
.memorial-ribbon-container {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
}

.memorial-ribbon {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 5px 20px var(--shadow);
  transition: transform 0.3s;
}

.memorial-ribbon:hover {
  transform: scale(1.1);
}

.memorial-popup {
  position: absolute;
  top: 60px;
  left: 0;
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  width: 280px;
  box-shadow: 0 10px 40px var(--shadow);
  animation: slideIn 0.2s ease;
}

.dark-mode .memorial-popup {
  background: var(--cream-dark);
}

.memorial-popup h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #C9184A;
  font-weight: 800;
}

.memorial-popup p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-weight: 600;
}

.user-dedication {
  color: var(--text-dark) !important;
  font-style: italic;
  background: var(--cream);
  padding: 0.5rem;
  border-radius: 8px;
}

.memorial-note {
  font-style: italic;
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

.settings-toggle {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 5px 20px var(--shadow);
  transition: transform 0.3s;
}

.settings-toggle:hover {
  transform: rotate(90deg);
}

.settings-menu {
  position: absolute;
  top: 60px;
  right: 0;
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  min-width: 240px;
  box-shadow: 0 10px 40px var(--shadow);
  animation: slideIn 0.2s ease;
}

.dark-mode .settings-menu {
  background: var(--cream-dark);
}

@keyframes slideIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.settings-menu h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 800;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.setting-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.setting-item input[type="number"] {
  width: 70px;
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--cream-dark);
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cream-dark);
}

.action-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.action-btn:hover {
  background: var(--cream-dark);
}

.action-btn.danger {
  background: #ffebee;
  color: #c62828;
}

.action-btn.danger:hover {
  background: #ffcdd2;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 2rem;
  background: var(--cream-dark);
  margin-top: 2rem;
}

.fun-fact {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-style: italic;
  font-weight: 600;
}

.memorial-footer {
  font-size: 0.9rem;
  color: #C9184A;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-link {
  color: var(--coral);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--forest);
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: fall linear forwards;
}

.confetti-piece.heart-confetti {
  background: transparent !important;
  font-size: 1.2rem;
  width: auto;
  height: auto;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .app-header {
    flex-direction: column;
    text-align: center;
  }
  
  .header-content {
    order: 2;
  }
  
  .virtual-dog {
    order: 1;
  }
  
  .dashboard-content {
    flex-direction: column;
  }
  
  .two-column {
    grid-template-columns: 1fr;
  }
  
  .type-toggle {
    flex-direction: column;
  }
  
  .filter-tabs {
    flex-wrap: wrap;
  }
  
  .settings-panel {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .memorial-ribbon-container {
    top: 0.5rem;
    left: 0.5rem;
  }
  
  .settings-toggle,
  .memorial-ribbon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .give-back-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .charity-categories {
    flex-direction: column;
  }
}