@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;
  --bg-color: #ffffff;
  --bg-app: #f5f5f5;
  --text-main: #333333;
  --text-sub: #666666;
  --max-width: 540px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-feature-settings: "palt" 1;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
  word-break: auto-phrase;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
}

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

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: white;
  border-bottom: 2px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-main);
  text-align: center;
  flex-grow: 1;
}

.back-link {
  text-decoration: none;
  color: var(--text-main);
  font-weight: bold;
  font-size: 1.2rem;
  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: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.btn-mood {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: 0.2s;
  text-align: left;
}

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

.btn-mood .emoji {
  font-size: 2rem;
  margin-right: 15px;
}

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

.btn-mood .text strong {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.btn-mood .text small {
  font-size: 0.85rem;
  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 */
.slider-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  height: calc(100vh - 60px - 8px);
  /* 画面全体 - ヘッダー - プログレスバー */
}

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

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

.slide img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
}

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

.slide-content h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.alert {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px;
  border-radius: 4px;
  margin: 15px 0;
}

.progress-bar {
  display: flex;
  height: 8px;
  background: #eee;
}

.progress-bar .step {
  flex: 1;
  border-right: 1px solid #fff;
  background: #ddd;
  transition: background 0.3s;
}

.progress-bar .step:last-child {
  border-right: none;
}

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