:root {
  --bg-color: #f1f3f5;
  --container-bg: #ffffff;
  --text-main: #111111;
  --text-muted: #333333;
  --accent-color: #087f23;
  --accent-soft: #e8f5e9;
  --accent-border: #2e7d32;
  --divider-color: #dee2e6;
  --input-border: #adb5bd;
  --btn-secondary: #212529;
  --shadow: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
  --bg-color: #121212;
  --container-bg: #1e1e1e;
  --text-main: #ffffff;
  --text-muted: #dddddd;
  --accent-color: #81c784;
  --accent-soft: #263238;
  --accent-border: #4caf50;
  --divider-color: #444444;
  --input-border: #666666;
  --btn-secondary: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background-color: var(--bg-color);
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  color: var(--text-main);
  transition: background-color 0.2s, color 0.2s;
}

.container {
  background: var(--container-bg);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow);
  width: 100%;
  max-width: 500px;
  position: relative;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.theme-toggle-wrapper {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

#theme-toggle {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

header h1 {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-top: 0;
  text-align: center;
  font-weight: 800;
}

header p {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.result-box {
  background: var(--accent-soft);
  border: 2px dashed var(--accent-border);
  border-radius: 15px;
  padding: 2.5rem 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#menu-display {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-color);
  display: inline-block;
}

/* 추가 버튼들 */
#action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.link-btn {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  text-decoration: none;
  background: var(--container-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent-color);
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  background: var(--accent-soft);
}

.primary-btn {
  width: 100%;
  padding: 1.1rem;
  background-color: var(--accent-border);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.8rem;
}

.text-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  margin-bottom: 1rem;
}

/* 히스토리 섹션 */
.history-container {
  margin-top: 2rem;
  padding: 1.2rem;
  background: var(--bg-color);
  border-radius: 12px;
}

.history-container h3 {
  font-size: 0.95rem;
  margin-top: 0;
  margin-bottom: 0.8rem;
}

#history-list {
  list-style: none;
  padding: 0;
  margin-bottom: 0.8rem;
  max-height: 120px;
  overflow-y: auto;
}

#history-list li {
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--divider-color);
  color: var(--text-muted);
}

#clear-history {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 0.75rem;
  cursor: pointer;
}

.divider {
  border: 0;
  height: 1px;
  background: var(--divider-color);
  margin: 2.5rem 0;
}

/* 문의 섹션 */
.contact-section {
  max-width: 380px;
  margin: 0 auto;
}

.contact-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--text-main);
}

.contact-section p {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

input, textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--input-border);
  background-color: var(--container-bg);
  color: var(--text-main);
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1rem;
}

.secondary-btn {
  width: 100%;
  padding: 0.9rem;
  background-color: var(--btn-secondary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.comment-section {
  margin-top: 1.5rem;
  background: var(--container-bg);
  padding: 10px;
  border-radius: 12px;
}

#disqus_thread { background: var(--container-bg); }

footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 슬롯머신 애니메이션 효과 */
.rolling {
  animation: roll 0.1s infinite linear;
}

@keyframes roll {
  0% { transform: translateY(10px); opacity: 0.3; }
  100% { transform: translateY(-10px); opacity: 0.3; }
}

.pop {
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hidden { display: none !important; }
