/* 오늘 뭐 먹지? - AI 음식 추천 */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --warm: #d97706;
  --warm2: #b45309;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif; font-size: 14px; }

.wrap { max-width: 100%; padding: 0 0 60px; }

/* ── 헤더 ── */
.top { padding: 20px 0 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
h1 { font-size: 22px; font-weight: 700; }
.sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── 카드 ── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* ── 카테고리 필터 ── */
.cat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.cat-btn {
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--line);
  background: var(--bg); cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--muted); transition: all .12s; white-space: nowrap;
}
.cat-btn.active { background: var(--warm); border-color: var(--warm); color: #fff; }

/* ── 랜덤 버튼 ── */
.pick-btn {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; border: none; border-radius: 12px;
  font-size: 18px; font-weight: 800; cursor: pointer;
  transition: transform .1s, opacity .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pick-btn:hover { opacity: .9; transform: translateY(-1px); }
.pick-btn:active { transform: translateY(0); }

/* ── AI 버튼 ── */
.ai-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; border: none; border-radius: 12px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: opacity .12s; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ai-btn:hover { opacity: .9; }
.ai-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── 결과 카드 ── */
.result-food {
  text-align: center; padding: 30px 20px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #fcd34d; border-radius: 14px;
  margin-bottom: 16px; display: none; animation: popIn .3s ease;
}
.result-food.show { display: block; }
@keyframes popIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rf-emoji { font-size: 64px; line-height: 1; margin-bottom: 10px; }
.rf-name { font-size: 32px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.rf-cat { font-size: 13px; color: var(--muted); }
.rf-desc { font-size: 13px; color: #92400e; margin-top: 10px; line-height: 1.6; }

/* ── AI 결과 ── */
.ai-result {
  padding: 16px; background: #f5f3ff; border: 1px solid #c4b5fd;
  border-radius: 12px; font-size: 13px; line-height: 1.7; color: #5b21b6;
  margin-bottom: 12px; display: none;
}
.ai-result.show { display: block; }
.ai-result strong { color: #4f46e5; }

/* ── AI 입력 ── */
.ai-input-row { display: flex; gap: 8px; margin-bottom: 8px; }
.ai-input {
  flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 13px; outline: none; transition: border-color .12s;
}
.ai-input:focus { border-color: #7c3aed; }

/* ── 즐겨찾기 ── */
.fav-section { margin-top: 8px; }
.fav-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.fav-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fav-item {
  padding: 4px 12px; background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 20px; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.fav-item:hover { border-color: var(--warm); }
.fav-item .fav-del { color: #dc2626; font-size: 14px; margin-left: 2px; }
.fav-empty { font-size: 12px; color: var(--muted); }

/* ── 즐겨찾기 버튼 ── */
.fav-btn {
  margin-top: 10px; padding: 8px 16px; border-radius: 8px;
  border: 1.5px solid #fed7aa; background: #fff7ed; color: var(--warm);
  font-size: 12px; font-weight: 700; cursor: pointer; transition: all .12s;
}
.fav-btn:hover { border-color: var(--warm); background: #ffedd5; }

/* ── 로딩 스피너 ── */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 사용 안내 섹션 공통 ── */
.guide-section {
  margin-top: 24px; background: rgba(246,248,255,.6);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.guide-section h2 { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.guide-section h2:not(:first-child) { margin-top: 18px; }
.guide-steps, .guide-features, .guide-usecase {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8;
}
.guide-steps li, .guide-features li, .guide-usecase li { margin-bottom: 4px; }
.guide-steps strong, .guide-features strong { color: var(--ink); }
.guide-privacy {
  margin-top: 16px; background: #eff6ff; border: 1px solid rgba(37,99,235,.22);
  border-radius: 12px; padding: 12px 14px; font-size: 12px; color: #1e40af; line-height: 1.55;
}
