/* ========================================
   TTVV 吃饱吃好 - 可爱简约风格
   ======================================== */

/* ----- CSS Variables / Design Tokens ----- */
:root {
  --pink-light: #FFE4EC;
  --pink: #FFB5C7;
  --pink-dark: #FF8FA8;
  --pink-deep: #F06292;

  --beige: #FFF5E6;
  --beige-dark: #FFE4C4;
  --cream: #FFFAF3;

  --blue-light: #E3F2FD;
  --blue: #B5D8EB;
  --blue-dark: #81B9D9;

  --green-light: #E8F5E9;
  --green: #A5D6A7;

  --text-primary: #5D4037;
  --text-secondary: #8D6E63;
  --text-muted: #BCAAA4;

  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --header-height: 60px;
  --fab-size: 56px;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 4px; }

/* ========================================
   Header
   ======================================== */
#appHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--pink-light), var(--cream));
  border-bottom: 2px solid var(--pink);
  flex-shrink: 0;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-icon {
  font-size: 24px;
  animation: bounce 2s infinite;
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink-deep), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  gap: 4px;
}

.header-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:active {
  transform: scale(0.9);
  background: var(--pink-light);
}

/* ========================================
   Main Content Area
   ======================================== */
#appContent {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 20px;
}

.view {
  display: none;
  padding: 16px;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

/* ========================================
   View Header (shared)
   ======================================== */
.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--pink);
}

.back-btn {
  background: var(--white);
  border: 1.5px solid var(--pink);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 14px;
  color: var(--pink-deep);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.back-btn:active {
  background: var(--pink-light);
  transform: scale(0.95);
}

.view-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ========================================
   CALENDAR VIEW
   ======================================== */

/* Calendar Navigation */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--pink);
  border-radius: 50%;
  background: var(--white);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink-deep);
}

.nav-btn:active {
  background: var(--pink-light);
  transform: scale(0.9);
}

.month-year {
  font-size: 18px;
  font-weight: 700;
  min-width: 140px;
  text-align: center;
  color: var(--text-primary);
}

.today-btn {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.today-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}

/* Calendar Grid */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  padding: 0 4px;
}

.calendar-weekdays span:first-child { color: var(--pink-deep); }
.calendar-weekdays span:last-child { color: var(--blue-dark); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 4px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.calendar-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  min-height: 40px;
  background: transparent;
  border: none;
  color: var(--text-primary);
}

.calendar-cell:hover {
  background: var(--pink-light);
}

.calendar-cell.other-month {
  color: var(--text-muted);
  opacity: 0.4;
}

.calendar-cell.today {
  background: linear-gradient(135deg, var(--pink-light), var(--blue-light));
  font-weight: 700;
  border: 2px solid var(--pink);
}

.calendar-cell.selected {
  background: var(--pink);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 143, 168, 0.4);
}

.calendar-cell.has-record::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-deep);
}

.calendar-cell.selected.has-record::after {
  background: white;
}

.calendar-cell:active {
  transform: scale(0.9);
}

/* Today's Preview */
.today-preview {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
}

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

.today-preview-title {
  font-size: 15px;
  font-weight: 700;
}

.today-preview-date {
  font-size: 12px;
  color: var(--text-muted);
}

.today-meals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--cream);
  border-radius: var(--radius);
  border: 2px dashed var(--pink);
}

/* Daily summary container spacing */
#calendarDailySummary {
  margin-top: 4px;
}

/* ========================================
   Meal Card (used in preview & daily view)
   ======================================== */
.meal-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 12px 14px;
  border-left: 4px solid var(--pink);
  transition: all 0.2s;
}

.meal-card.breakfast { border-left-color: #FFB74D; }
.meal-card.lunch { border-left-color: #81C784; }
.meal-card.dinner { border-left-color: #7986CB; }
.meal-card.snack { border-left-color: #F06292; }

.meal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.meal-card-type {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meal-card-person {
  display: flex;
  align-items: center;
  gap: 4px;
}

.person-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.person-tag.TT {
  background: var(--pink-light);
  color: var(--pink-deep);
}

.person-tag.VV {
  background: var(--blue-light);
  color: var(--blue-dark);
}

.person-tag.TTVV {
  background: linear-gradient(135deg, var(--pink-light), var(--blue-light));
  color: var(--pink-deep);
}

.meal-card-body {
  font-size: 13px;
  color: var(--text-secondary);
}

.meal-card-body .item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.meal-card-body .item-emoji {
  font-size: 14px;
}

.meal-card-price {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pink-deep);
  text-align: right;
}

.meal-card-images {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.meal-card-images img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.meal-card-images img:active {
  transform: scale(0.95);
}

.meal-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.meal-card-actions button {
  background: var(--white);
  border: 1px solid var(--pink);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.meal-card-actions button:active {
  background: var(--pink-light);
  transform: scale(0.95);
}

.meal-card-actions .delete-btn {
  color: #ef5350;
  border-color: #ef9a9a;
}

.meal-card-actions .delete-btn:active {
  background: #FFEBEE;
}

/* ========================================
   DAILY VIEW
   ======================================== */
.daily-meals-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

/* ========================================
   ADD RECORD FORM
   ======================================== */
.add-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
}

.form-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.option-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.option-btn {
  flex: 1;
  min-width: 70px;
  padding: 10px 12px;
  border: 2px solid var(--beige-dark);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  text-align: center;
}

.option-btn:active {
  transform: scale(0.95);
}

.option-btn.selected {
  border-color: var(--pink);
  background: var(--pink-light);
  color: var(--pink-deep);
  box-shadow: 0 2px 8px rgba(255, 143, 168, 0.2);
}

.person-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 100px;
}

/* Avatar Styles */
.avatar-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  position: relative;
}

/* TT — 博美 (Pomeranian) */
.avatar-tt {
  background: linear-gradient(135deg, #FDE8D0, #F5C98A);
  border: 2px solid #F5B07A;
}
.avatar-tt::before {
  content: '🐶';
  font-size: 20px;
  line-height: 1;
  display: block;
  margin-top: -6px;
}
.avatar-tt::after {
  content: '🎀';
  font-size: 10px;
  position: absolute;
  top: -4px;
  right: -4px;
  line-height: 1;
}

/* VV — 哈士奇 (Husky) */
.avatar-vv {
  background: linear-gradient(135deg, #E8EEF5, #B8CBE0);
  border: 2px solid #8EA9C6;
}
.avatar-vv::before {
  content: '🐺';
  font-size: 20px;
  line-height: 1;
  display: block;
  margin-top: -4px;
}
.avatar-vv::after {
  content: '💙';
  font-size: 9px;
  position: absolute;
  top: -3px;
  right: -3px;
  line-height: 1;
}

/* TTVV — 博美 + 哈士奇 合照 */
.avatar-ttvv {
  background: linear-gradient(135deg, #FDE8D0 30%, #E8EEF5 70%);
  border: 2px solid #D4A5C4;
  gap: 1px;
  font-size: 0;
}
.avatar-ttvv::before {
  content: '🐶';
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  margin-top: -2px;
}
.avatar-ttvv::after {
  content: '🐺';
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  margin-top: -2px;
}

/* Input with add button */
.input-with-add {
  display: flex;
  gap: 8px;
}

.form-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--beige-dark);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
  background: var(--cream);
  color: var(--text-primary);
}

.form-input:focus {
  border-color: var(--pink);
  background: white;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.add-item-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--pink);
  border-radius: 50%;
  background: var(--pink-light);
  color: var(--pink-deep);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.add-item-btn:active {
  transform: scale(0.9);
  background: var(--pink);
  color: white;
}

/* Tag list for items */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-height: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--pink-light);
  color: var(--pink-deep);
  animation: tagIn 0.2s ease;
}

.tag .tag-remove {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.2s;
  margin-left: 2px;
}

.tag .tag-remove:hover {
  opacity: 1;
}

.tag.price-tag {
  background: var(--green-light);
  color: #388E3C;
}

/* Total price */
.total-price {
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: var(--pink-deep);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--beige-dark);
}

/* Image upload */
.image-upload-area {
  border: 2px dashed var(--pink);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--pink-light);
}

.image-upload-area:active {
  transform: scale(0.98);
  background: var(--pink);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.upload-icon {
  font-size: 32px;
}

.image-preview-list {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item .remove-image {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Save button */
.save-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(255, 143, 168, 0.3);
}

.save-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(255, 143, 168, 0.2);
}

/* ========================================
   FLOATING ACTION BUTTON
   ======================================== */
.fab {
  position: fixed;
  bottom: 24px;
  right: calc(50% - 240px + 24px);
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--pink-dark), var(--pink-deep));
  color: white;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(240, 98, 146, 0.4);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.fab:active {
  transform: scale(0.9);
  box-shadow: 0 2px 8px rgba(240, 98, 146, 0.3);
}

@media (min-width: 480px) {
  .fab {
    right: calc(50% - 240px + 24px);
  }
}

@media (max-width: 480px) {
  .fab {
    right: 20px;
  }
}

/* ========================================
   STATISTICS VIEW
   ======================================== */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
}

.stats-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stats-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-period-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.stats-period-btn {
  padding: 6px 16px;
  border: 1.5px solid var(--pink);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.stats-period-btn.selected {
  background: var(--pink);
  color: white;
}

.stats-period-btn:active {
  transform: scale(0.95);
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--beige-dark);
  font-size: 13px;
}

.stats-row:last-child {
  border-bottom: none;
}

.stats-row .label {
  color: var(--text-secondary);
}

.stats-row .value {
  font-weight: 700;
  color: var(--text-primary);
}

.stats-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--pink-deep);
  text-align: center;
  padding: 16px 0;
}

/* ========================================
   IMAGE MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  animation: fadeIn 0.2s;
}

.modal-body {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  animation: scaleIn 0.25s ease;
}

.modal-body img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}

.toast.hidden {
  display: none;
}

/* ========================================
   MOOD BADGE
   ======================================== */
.mood-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

/* ========================================
   DAILY SUMMARY CARD
   ======================================== */
.daily-summary-card {
  background: linear-gradient(135deg, var(--pink-light), var(--cream));
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 12px;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--pink);
  animation: fadeIn 0.3s ease;
}

.summary-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
}

.summary-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.summary-value {
  font-weight: 700;
}

.summary-value.tt-color { color: var(--pink-deep); }
.summary-value.vv-color { color: var(--blue-dark); }
.summary-value.ttvv-color {
  background: linear-gradient(135deg, var(--pink-deep), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1.5px dashed var(--pink);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-total-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--pink-deep);
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ========================================
   ANNIVERSARY MARKER (Calendar)
   ======================================== */
.calendar-cell.has-anniversary::after {
  content: '❤️';
  font-size: 8px;
  position: absolute;
  bottom: 2px;
  line-height: 1;
}

.calendar-cell.has-anniversary.has-record::after {
  content: '❤️';
  font-size: 8px;
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
}

.calendar-cell.has-anniversary {
  border-color: var(--anniv-color, #FF6B8A);
}

.calendar-cell.today.has-anniversary {
  border-color: var(--anniv-color, #FF6B8A);
  box-shadow: 0 0 0 2px var(--anniv-color, #FF6B8A);
}

/* ========================================
   ANNIVERSARY MODAL
   ======================================== */
.anniv-modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 90vw;
  width: 380px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  animation: scaleIn 0.25s ease;
  box-shadow: var(--shadow-lg);
}

.anniv-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--pink);
}

.anniv-modal-title {
  font-size: 17px;
  font-weight: 700;
}

.anniv-modal-header .modal-close {
  position: static;
}

.anniv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 40px;
}

.anniv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--beige-dark);
  animation: fadeIn 0.2s ease;
}

.anniv-heart {
  font-size: 20px;
  animation: heartbeat 1.5s ease-in-out infinite;
}

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

.anniv-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.anniv-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.anniv-date {
  font-size: 12px;
  color: var(--text-muted);
}

.anniv-delete {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.anniv-delete:hover {
  opacity: 1;
}

.anniv-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 2px dashed var(--beige-dark);
}

.anniv-form-row {
  display: flex;
  gap: 8px;
}

.anniv-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mood button tint */
.mood-btn[data-value="0"] { border-color: #E0E0E0; }
.mood-btn[data-value="1"] { border-color: #FFE0B2; }
.mood-btn[data-value="2"] { border-color: #FFCC80; }
.mood-btn[data-value="3"] { border-color: #FFB74D; }

.mood-btn.selected[data-value="0"] { background: #F5F5F5; border-color: #BDBDBD; }
.mood-btn.selected[data-value="1"] { background: #FFF3E0; border-color: #FFB74D; }
.mood-btn.selected[data-value="2"] { background: #FFE0B2; border-color: #FF9800; }
.mood-btn.selected[data-value="3"] { background: #FFCC80; border-color: #F57C00; }

/* ========================================
   EXPORT DROPDOWN
   ======================================== */
.export-menu {
  position: absolute;
  top: 100%;
  right: 8px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 50;
  min-width: 140px;
  animation: scaleIn 0.15s ease;
  transform-origin: top right;
}

.export-menu button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: background 0.15s;
}

.export-menu button:active {
  background: var(--pink-light);
}

.hidden {
  display: none !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes tagIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes heartFloat {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-40px) scale(1.5); opacity: 0; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 360px) {
  .option-btn {
    font-size: 12px;
    padding: 8px;
    min-width: 60px;
  }

  .person-btn {
    min-width: 80px;
  }

  .app-title {
    font-size: 15px;
  }
}

@media (min-width: 768px) {
  #app {
    border-left: 1px solid var(--beige-dark);
    border-right: 1px solid var(--beige-dark);
    box-shadow: var(--shadow-lg);
  }
}

/* ========================================
   PRINT / EXPORT STYLES
   ======================================== */
@media print {
  .fab, #appHeader, .back-btn, .meal-card-actions, .header-right {
    display: none !important;
  }

  #app {
    max-width: 100%;
    border: none;
    box-shadow: none;
  }

  .view {
    display: block !important;
  }
}

/* ========================================
   USER IDENTITY MODAL
   ======================================== */
.user-modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 90vw;
  width: 340px;
  padding: 20px;
  animation: scaleIn 0.25s ease;
  box-shadow: var(--shadow-lg);
}

.user-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--pink);
}

.user-modal-header .modal-close {
  position: static;
}

.user-select-options {
  display: flex;
  gap: 12px;
}

.user-option-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border: 2px solid var(--beige-dark);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.user-option-btn:active {
  transform: scale(0.95);
  border-color: var(--pink);
  background: var(--pink-light);
}

.user-option-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-option-desc {
  font-size: 12px;
  color: var(--text-muted);
}

#userBtn {
  position: relative;
  font-size: 16px;
}
