/* ===== McFit 薯条减脂 - 马卡龙红黄风格 ===== */

/* 防止移动端缩放和拖拽 */
html, body {
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}
button, input, select, a, .exercise-check {
  touch-action: manipulation;
}

/* 薯条飘落动画 */
@keyframes fryFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(3deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(8px) rotate(-3deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes numberBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes checkPop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* 页面切换 */
.page { animation: fadeInUp 0.4s ease-out; }
.page.hidden { display: none; }

/* 底部导航 */
.nav-btn {
  color: #9A8EA8;
  position: relative;
}
.nav-btn.active {
  /* 颜色由 inline style 控制 */
}
.nav-btn.active::after {
  content: '';
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 2px;
  background: linear-gradient(90deg, #E85D5D, #F5D76E);
  border-radius: 0 0 2px 2px;
}

/* 选择按钮 */
.sq-btn.selected, .bf-btn.selected, .b12-btn.selected {
  background: rgba(232, 93, 93, 0.08) !important;
  border-color: #E85D5D !important;
  color: #D94A4A !important;
}

/* 饮食评分 */
.diet-perfect {
  background: rgba(232, 93, 93, 0.08);
  color: #D94A4A;
}
.diet-good {
  background: rgba(240, 168, 104, 0.08);
  color: #E89850;
}
.diet-bad {
  background: rgba(240, 184, 200, 0.08);
  color: #D08090;
}

/* 运动卡片 */
.exercise-day-card {
  border: 1px solid rgba(245, 215, 110, 0.15);
  transition: all 0.2s;
}
.exercise-day-card:hover {
  border-color: rgba(245, 215, 110, 0.3);
  box-shadow: 0 2px 8px rgba(245, 215, 110, 0.06);
}
.exercise-day-card.today {
  border-color: #E85D5D;
  background: rgba(232, 93, 93, 0.03);
}
.exercise-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s;
}
.exercise-item.completed {
  opacity: 0.6;
  text-decoration: line-through;
}
.exercise-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #F5D76E;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.exercise-check:hover {
  border-color: #E85D5D;
  background: rgba(232, 93, 93, 0.1);
}
.exercise-check.checked {
  background: #E85D5D;
  border-color: #E85D5D;
  animation: checkPop 0.3s ease-out;
}
.exercise-check.checked::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: bold;
}
.exercise-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.exercise-tag.anaerobic {
  background: rgba(232, 93, 93, 0.1);
  color: #D94A4A;
}
.exercise-tag.aerobic {
  background: rgba(245, 215, 110, 0.15);
  color: #C8A030;
}
.exercise-tag.carried {
  background: rgba(240, 168, 104, 0.1);
  color: #E89850;
}

/* AI 推荐 */
#ai-recommendation .rec-section {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: rgba(232, 93, 93, 0.04);
  border-radius: 12px;
  border-left: 3px solid #E85D5D;
  animation: fadeIn 0.5s ease-out;
}
#ai-recommendation .rec-section h3,
#ai-recommendation .rec-section p,
#ai-recommendation .rec-section li,
#ai-recommendation .rec-section strong {
  font-size: 14px; line-height: 1.7; color: #3A3040;
}
#ai-recommendation .rec-section h3 {
  font-weight: 600; margin-bottom: 6px;
}

/* 加载动画 */
.ai-loading {
  display: flex; align-items: center; gap: 8px;
  color: #E85D5D; font-size: 14px; padding: 20px;
}
.ai-loading .dot-pulse { display: flex; gap: 4px; }
.ai-loading .dot-pulse span {
  width: 6px; height: 6px;
  background: #E85D5D; border-radius: 50%;
  animation: pulse-soft 1s infinite;
}
.ai-loading .dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading .dot-pulse span:nth-child(3) { animation-delay: 0.4s; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(232, 93, 93, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(232, 93, 93, 0.4); }

/* 编辑表单动画 */
.animate-fade-in {
  animation: fadeIn 0.25s ease-out;
}

/* 响应式 */
@media (max-width: 768px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .lg\:grid-cols-2 { grid-template-columns: 1fr !important; }
}

@media print {
  header, nav { display: none; }
}