:root {
  --bg-1: #fff7fb;
  --bg-2: #f3e8ff;
  --bg-radial-1: rgba(255, 228, 242, 0.95);
  --bg-radial-2: rgba(233, 213, 255, 0.9);
  --ink: #2b2440;
  --muted: #6b5f8a;
  --card: rgba(255, 255, 255, 0.85);
  --card-border: rgba(255, 255, 255, 0.7);
  --card-glow: rgba(255, 160, 210, 0.22);
  --shadow: 0 20px 45px rgba(124, 90, 255, 0.18);
  --ring: 0 0 0 4px rgba(255, 160, 210, 0.35);
  --accent: #ff7ab6;
  --accent-strong: #ff4fa0;
  --ghost: #ffffff;
  --ghost-border: rgba(116, 90, 255, 0.18);
  --result-bg: rgba(255, 255, 255, 0.7);
  --result-border: rgba(139, 92, 246, 0.25);
  --input-bg: rgba(255, 255, 255, 0.92);
  --input-border: rgba(116, 90, 255, 0.2);
  --input-border-focus: rgba(255, 122, 182, 0.55);
  --input-shadow: 0 10px 18px rgba(80, 60, 170, 0.08);
}

:root[data-theme="dark"] {
  --bg-1: #0f1020;
  --bg-2: #1a1630;
  --bg-radial-1: rgba(255, 122, 182, 0.18);
  --bg-radial-2: rgba(139, 92, 246, 0.22);
  --ink: #f7f4ff;
  --muted: #c9c2ea;
  --card: rgba(24, 22, 45, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-glow: rgba(255, 122, 182, 0.18);
  --shadow: 0 24px 60px rgba(8, 7, 24, 0.6);
  --ring: 0 0 0 4px rgba(255, 122, 182, 0.25);
  --ghost: #1c1a33;
  --ghost-border: rgba(255, 255, 255, 0.12);
  --result-bg: rgba(30, 27, 56, 0.78);
  --result-border: rgba(196, 181, 253, 0.38);
  --input-bg: rgba(24, 22, 45, 0.92);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-border-focus: rgba(255, 122, 182, 0.6);
  --input-shadow: 0 14px 26px rgba(8, 7, 24, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at -10% -20%, var(--bg-radial-1) 0%, transparent 60%),
    radial-gradient(1000px 500px at 120% 10%, var(--bg-radial-2) 0%, transparent 65%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  display: grid;
  place-items: center;
  padding: 24px;
  transition: background 220ms ease, color 220ms ease;
}

.app {
  width: min(720px, 100%);
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 36px clamp(20px, 4vw, 44px) 40px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -30%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--card-glow), transparent 70%);
  pointer-events: none;
  transform: rotate(12deg);
}

.badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: #a83a73;
  background: linear-gradient(120deg, #ffd6ec, #ffe9f6);
  border: 1px solid rgba(255, 122, 182, 0.35);
  box-shadow: 0 10px 18px rgba(255, 122, 182, 0.2);
}

.title {
  margin: 4px 0 8px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.subtitle {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 15px;
}

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}

button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

button:active {
  transform: translateY(1px) scale(0.995);
}

button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.theme-btn {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  color: var(--ink);
  background: var(--ghost);
  border: 1px solid var(--ghost-border);
  box-shadow: 0 8px 16px rgba(80, 60, 170, 0.12);
}

.theme-btn:hover {
  border-color: rgba(116, 90, 255, 0.38);
}

.generate-btn {
  flex: 1;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 16px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow:
    0 14px 26px rgba(255, 79, 160, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.generate-btn:hover {
  filter: brightness(1.02);
  box-shadow:
    0 18px 30px rgba(255, 79, 160, 0.32),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.ghost-btn {
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 15px;
  color: var(--ink);
  background: var(--ghost);
  border: 1px solid var(--ghost-border);
  box-shadow: 0 10px 18px rgba(80, 60, 170, 0.08);
}

.ghost-btn:hover {
  border-color: rgba(116, 90, 255, 0.32);
  background: #ffffff;
}

.result {
  padding: 18px;
  border-radius: 22px;
  background: var(--result-bg);
  border: 1px dashed var(--result-border);
  transition: background-color 220ms ease, border-color 220ms ease;
}

.inquiry-btn-wrap {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.inquiry-btn {
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 15px;
  color: var(--ink);
  background: var(--ghost);
  border: 1px solid var(--ghost-border);
  box-shadow: 0 10px 18px rgba(80, 60, 170, 0.08);
}

.inquiry-btn:hover {
  border-color: rgba(116, 90, 255, 0.32);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 200ms ease;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal {
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  animation: slideUp 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--result-bg);
  border-color: var(--ghost-border);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.comments {
  margin-top: 22px;
  padding: 18px;
  border-radius: 22px;
  background: var(--result-bg);
  border: 1px dashed var(--result-border);
  transition: background-color 220ms ease, border-color 220ms ease;
}

.comments-head {
  margin-bottom: 8px;
}

.comments-title {
  margin: 2px 2px 4px;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.comments-subtitle {
  margin: 0 2px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.disqus-thread {
  min-height: 120px;
}

#disqus_thread .placeholder-label {
  display: none !important;
}

.disqus-hint {
  margin: 10px 2px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inquiry-head {
  margin-bottom: 12px;
}

.inquiry-title {
  margin: 2px 2px 4px;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.inquiry-subtitle {
  margin: 0 2px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.inquiry-form {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-left: 4px;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--input-shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 200ms ease, color 200ms ease;
}

.field-input::placeholder {
  color: var(--muted);
  opacity: 0.9;
}

.field-input:focus-visible {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: var(--ring);
}

.field-textarea {
  resize: vertical;
  min-height: 110px;
}

.submit-btn {
  margin-top: 2px;
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 15px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow:
    0 14px 26px rgba(255, 79, 160, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.submit-btn:hover {
  filter: brightness(1.02);
  box-shadow:
    0 18px 30px rgba(255, 79, 160, 0.32),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.balls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ball {
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.12),
    0 14px 22px rgba(124, 90, 255, 0.18);
  transform: translateY(6px) scale(0.96);
  opacity: 0;
  animation: pop 500ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.ball::after {
  content: "";
  position: absolute;
  inset: 8px auto auto 10px;
  width: 18px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  filter: blur(0.2px);
  z-index: -1;
}

.ball.delay-1 { animation-delay: 40ms; }
.ball.delay-2 { animation-delay: 90ms; }
.ball.delay-3 { animation-delay: 140ms; }
.ball.delay-4 { animation-delay: 190ms; }
.ball.delay-5 { animation-delay: 240ms; }

.ball.range-1 { background: linear-gradient(160deg, #ffd166, #ffb703); }
.ball.range-2 { background: linear-gradient(160deg, #7bdff2, #48bfe3); }
.ball.range-3 { background: linear-gradient(160deg, #b8f2a1, #7ad66d); }
.ball.range-4 { background: linear-gradient(160deg, #cdb4ff, #9b5de5); }
.ball.range-5 { background: linear-gradient(160deg, #ffadad, #ff6392); }

.result-text {
  margin: 6px 4px 2px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.92) rotate(-2deg);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.04) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@media (max-width: 560px) {
  .card {
    padding: 30px 20px 34px;
    border-radius: 24px;
  }

  .balls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }
}

/* Landing Page */
.landing-card {
  text-align: center;
}

.landing-hero {
  margin-bottom: 32px;
}

.landing-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #7c3aed;
  background: linear-gradient(120deg, #e9d5ff, #f3e8ff);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.15);
}

:root[data-theme="dark"] .landing-badge {
  color: #c4b5fd;
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.2));
  border-color: rgba(167, 139, 250, 0.3);
}

.landing-title {
  margin: 0 0 16px;
  font-size: clamp(42px, 10vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border-radius: 20px;
  background: var(--result-bg);
  border: 1px solid var(--result-border);
  text-decoration: none;
  color: inherit;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(139, 92, 246, 0.15);
  border-color: var(--accent);
}

.menu-card--coming {
  opacity: 0.6;
  cursor: default;
}

.menu-card--coming:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--result-border);
}

.menu-icon {
  font-size: 36px;
  line-height: 1;
}

.menu-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.menu-desc {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Back Link */
.back-link {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--ghost);
  border: 1px solid var(--ghost-border);
  text-decoration: none;
  transition: border-color 160ms ease;
}

.back-link:hover {
  border-color: rgba(116, 90, 255, 0.38);
}

.theme-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 6px;
}

.theme-row:has(.back-link) {
  justify-content: space-between;
}
