:root {
  --bg: #121212;
  --card: #1e1e1e;
  --text: #e0e0e0;
  --gray: #a0a0a0;
  --primary: #bb86fc;
  --primary-dark: #9b67dc;
  --kcal: #81c784;
  --allergy: #ff8a80;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px 12px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

h1 {
  color: var(--primary);
  font-size: 2.1rem;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--gray);
  font-size: 1.05rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.controls input,
.controls select,
.controls button {
  padding: 10px 14px;
  font-size: 1rem;
  border: 1px solid #333;
  border-radius: 8px;
  background: #2a2a2a;
  color: var(--text);
}

.controls button {
  background: var(--primary);
  color: #121212;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: 0.15s;
}

.controls button:hover {
  background: var(--primary-dark);
}

.main-container {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  flex: 1;
  min-width: 300px;
}

.section-title {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 16px;
  text-align: center;
}

.loading,
.no-data,
.error {
  text-align: center;
  padding: 40px;
  font-size: 1.1rem;
  color: var(--gray);
}

.error {
  color: #ef5350;
}

.date-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 20px 0 12px;
  color: var(--text);
  text-align: center;
}

.meal-type {
  font-size: 1.3rem;
  color: var(--primary);
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 4px solid var(--primary);
}

.menu-list {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  padding: 16px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.menu-list p {
  margin: 4px 0;
  color: var(--text);
}

/* 상세 정보 버튼 & 내용 스타일 */
.detail-toggle {
  font-size: 0.88rem;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s;
}

.detail-toggle:hover {
  background: rgba(187, 134, 252, 0.15);
}

.meal-detail {
  display: none;
  margin-top: 10px;
  padding: 12px;
  background: #252525;
  border-radius: 8px;
  border: 1px solid #333;
  font-size: 0.92rem;
}

.meal-detail.show {
  display: block;
}

.kcal {
  color: var(--kcal);
  font-weight: bold;
}

.allergy {
  color: var(--allergy);
  font-size: 0.85rem;
  margin-top: 10px;
  line-height: 1.5;
}

.timetable-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
}

.timetable-table th,
.timetable-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #333;
}

.timetable-table th {
  background: #2a2a2a;
  color: var(--primary);
}

.footer {
  text-align: center;
  margin-top: 60px;
  color: var(--gray);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .main-container {
    flex-direction: column;
  }
}