@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Noto+Serif+JP:wght@200..900&display=swap');

:root {
  --primary-color: #f26622;
  --secondary-color: #2c3e50;
  --accent-color: #ffc107;
  --bg-color: #ffffff;
  --bg-app: #fcfcfc;
  --text-main: #222222;
  --text-sub: #666666;
  --max-width: 480px;
  /* More mobile focused */
  --border-radius: 12px;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', "Noto Sans JP", sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-color);
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  /* position: sticky; */
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #f0f0f0;
}

header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--secondary-color);
  text-align: center;
  flex-grow: 1;
}

.back-link {
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  width: 24px;
}

/* Home */
.hero {
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/hero_bg.png') no-repeat center;
  background-size: cover;
  color: white;
}

.hero h2 {
  margin: 0;
  font-size: 1.8rem;
}

.hero p {
  margin: 10px 0 0 0;
  font-size: 1rem;
}

.mood-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 20px;
}

.btn-mood {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: left;
}

.btn-mood:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.btn-mood:active {
  transform: scale(0.98);
}

.btn-mood .emoji {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.btn-mood .text {
  display: flex;
  flex-direction: column;
}

.btn-mood .text strong {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--primary-color);
}

.btn-mood .text small {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-sub);
}

/* Handle the 7th item (last odd) */
.btn-mood:last-child:nth-child(odd) {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  background: #f8f8f8;
  border-style: dashed;
}

.btn-mood:last-child:nth-child(odd) .emoji {
  margin-bottom: 0;
  margin-right: 20px;
  font-size: 2rem;
}

.btn-mood:last-child:nth-child(odd) .text strong {
  color: var(--text-sub);
}

.pickup {
  padding: 20px;
}

.pickup h3 {
  margin-top: 0;
}

/* Recipe Card */
.recipe-card {
  display: block;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  margin-bottom: 20px;
}

.recipe-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-info {
  padding: 15px;
}

.card-info h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.card-info .time,
.card-info .difficulty {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-right: 10px;
}

/* List */
.filter-tags {
  padding: 15px 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.tag {
  padding: 5px 15px;
  background: #eee;
  border-radius: 20px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tag.active {
  background: var(--primary-color);
  color: white;
}

.list-main {
  padding: 0 20px 20px;
}

/* Detail */
/* Hero Section */
.detail-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  object-fit: cover;
}

.detail-hero .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
}

.scene-name {
  font-size: 0.9rem;
  font-weight: 400;
  display: block;
  margin-bottom: 5px;
  opacity: 0.9;
}

.dish-name {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Section Common */
.content-section {
  padding: 30px 20px;
  border-bottom: 8px solid #f9f9f9;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.25rem;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Ingredients */
.ingredients-card {
  background: #fdfdfd;
  border: 1px solid #f0f0f0;
  border-radius: var(--border-radius);
  padding: 20px;
}

.servings {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 15px;
  display: block;
}

.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ingredient-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}

.ingredient-item:last-child {
  border-bottom: none;
}

.ingredient-group-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 10px;
  color: var(--text-sub);
}

/* Attention (Failure Avoidance) */
.attention-box {
  background: #fff9e6;
  border: 1px solid #ffeeba;
  border-radius: var(--border-radius);
  padding: 20px;
}

.attention-item {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.attention-item:last-child {
  margin-bottom: 0;
}

.attention-icon {
  color: var(--accent-color);
  font-weight: bold;
}

.attention-text {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Steps (Slider) */
.steps-container {
  padding: 0;
}

.slider-wrapper {
  position: relative;
  background: #000;
}

.slider-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
}

.slider-container::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: white;
  display: flex;
  flex-direction: column;
}

.slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.slide-content {
  padding: 25px 20px;
  flex-grow: 1;
}

.slide-content h3 {
  margin-top: 0;
  font-size: 1.4rem;
  color: var(--primary-color);
}

/* Progress Bar */
.progress-container {
  padding: 10px 20px;
  background: white;
}

.progress-bar {
  display: flex;
  height: 6px;
  gap: 4px;
}

.step {
  flex: 1;
  background: #eee;
  border-radius: 3px;
  transition: 0.3s;
}

.step.active {
  background: var(--primary-color);
}



/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.8rem;
  color: #999;
}