@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700;800&display=swap');

:root {
  --bg-gradient: linear-gradient(135deg, #6e8efb, #a777e3);
  --container-bg: rgba(255, 255, 255, 0.9);
  --text-color: #333;
  --h1-color: #1a237e;
  --h2-color: #3f51b5;
  --li-bg: rgba(255, 255, 255, 0.7);
  --li-border: #6e8efb;
  --btn-bg: linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%);
  --btn-shadow: rgba(254, 107, 139, 0.4);
  --border-color: rgba(255, 255, 255, 0.3);
  --shadow-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode {
  --bg-gradient: linear-gradient(135deg, #121212, #1f1f2e);
  --container-bg: rgba(30, 30, 47, 0.95);
  --text-color: #e0e0e0;
  --h1-color: #9a8cff;
  --h2-color: #b197fc;
  --li-bg: rgba(45, 45, 68, 0.8);
  --li-border: #9a8cff;
  --btn-bg: linear-gradient(45deg, #7b1fa2, #4a148c);
  --btn-shadow: rgba(123, 31, 162, 0.4);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Nanum Gothic', sans-serif;
  background: var(--bg-gradient);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  color: var(--text-color);
  transition: background 0.5s ease, color 0.5s ease;
}

.container {
  background-color: var(--container-bg);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  text-align: center;
  width: 90%;
  max-width: 500px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  position: relative;
}

.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.lang-switcher {
  font-size: 0.9rem;
  color: var(--text-color);
}

.lang-switcher a {
  text-decoration: none;
  color: var(--text-color);
  opacity: 0.6;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.lang-switcher a.active {
  opacity: 1;
  font-weight: 800;
  background-color: var(--border-color);
}

.lang-switcher a:hover {
  opacity: 1;
}

/* 테마 토글 버튼 스타일 - position: relative inside top-controls */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

h1 {
  margin-bottom: 1rem;
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--h1-color);
  transition: color 0.5s ease;
}

h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--h2-color);
    transition: color 0.5s ease;
}

.menu-container {
  margin: 2.5rem 0;
  min-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.recommended-menu {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--h1-color);
  padding: 1rem 2rem;
  border-radius: 15px;
  background-color: var(--li-bg);
  box-shadow: 0 4px 15px var(--shadow-color);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.placeholder-text {
  color: var(--text-color);
  opacity: 0.6;
  font-style: italic;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

#recommend-btn {
  background: var(--btn-bg);
  color: white;
  border: none;
  padding: 1.2rem 2.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--btn-shadow);
  width: 100%;
}

#recommend-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px var(--btn-shadow);
}

.history-list {
  list-style-type: none;
  padding: 0;
  margin-top: 1.5rem;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
}

.history-list li {
  background-color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 400;
  border-left: 5px solid #6e8efb;
}

/* 스크롤바 디자인 (선택사항) */
.history-list::-webkit-scrollbar {
  width: 8px;
}
.history-list::-webkit-scrollbar-thumb {
  background: #a777e3;
  border-radius: 4px;
}
.history-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
