:root {
  --bg-dark: #0b111d;
  --text-main: #facc15;
  --text-sub: #e5e5e5;
  --accent: #22c55e;
  --card-bg: #111827;
}

/* ======== 기본 ======== */
body {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-sub);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* ======== 헤더 ======== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; /* ✅ 줄바꿈 방지 */
  gap: 1rem;
  padding: 1.2rem 2rem;
  background: #0c1220;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
  white-space: nowrap; /* ✅ 한 줄 유지 */
}

/* ======== 언어 선택 ======== */
#languageSelector {
  flex: 1;
  background: #0e1628;
  border: 1px solid var(--text-main);
  color: var(--text-main);
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  outline: none;
  transition: 0.25s;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}
#languageSelector:hover {
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.5);
}

/* ======== Hero 섹션 ======== */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  color: var(--text-main);
}
.hero h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}
.hero p {
  font-size: 1.05rem;
  color: var(--text-sub);
  margin-bottom: 1.8rem;
}

/* ======== 버튼 ======== */
button {
  background: linear-gradient(90deg, #22c55e, #facc15);
  border: none;
  padding: 0.7rem 1.6rem;
  color: #000;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}
button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ======== 컨테이너 ======== */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

/* ======== 카드 ======== */
.card {
  background: var(--card-bg);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  color: var(--text-sub);
}
.card h3 {
  color: var(--text-main);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* ======== 폼 ======== */
label {
  display: block;
  margin: 0.6rem 0 0.2rem;
  font-weight: 500;
}
input, select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0e1628;
  color: #fff;
  font-size: 1rem;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--text-main);
  box-shadow: 0 0 5px rgba(250, 204, 21, 0.4);
}

/* ======== 결과 ======== */
.result-box {
  margin-top: 1rem;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 8px;
  padding: 0.8rem;
  color: var(--text-main);
  text-align: center;
  font-weight: 500;
}

/* ======== 영양 결과 박스 ======== */
.nutri-box {
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 12px;
  padding: 1em;
  color: #facc15;
  font-size: 1rem;
  margin-top: 1em;
  line-height: 1.6;
}
.nutri-box hr {
  border: none;
  border-top: 1px solid rgba(250, 204, 21, 0.2);
  margin: 0.8em 0;
}

/* ======== 광고 ======== */
.ad-box {
  margin: 2rem auto;
  text-align: center;
  padding: 0.5rem;
}

/* ======== 푸터 ======== */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
