@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Space+Grotesk:wght@500;600&display=swap');

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

body {
  font-family: 'SUIT', 'Poppins', 'Space Grotesk', sans-serif;
  background:
    radial-gradient(circle at 15% 20%, #2b1b5a, #12091f 60%),
    radial-gradient(circle at 80% 80%, #123b44, transparent 60%);
  color: #f6f7ff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  margin: 50px 0px;
}

/* ================= BACKGROUND ================= */

.background-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(138, 99, 255, .35), transparent 45%),
    radial-gradient(circle at 80% 25%, rgba(76, 240, 201, .28), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(255, 120, 190, .28), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(255, 210, 110, .18), transparent 50%);
  filter: blur(120px);
  pointer-events: none;
}

/* ================= APP ================= */

.app {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 14, 40, .88);
  backdrop-filter: blur(18px);
  border-radius: 30px;
  box-shadow:
    0 50px 110px rgba(0, 0, 0, .6),
    inset 0 0 0 1px rgba(255, 255, 255, .06);
  overflow: hidden;
}

/* ================= MENU ================= */

.menu-bar {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 16px 0 8px;
}

.menu-item {
  font-size: 17px;
  letter-spacing: -.3px;
  color: #b7baff;
  text-decoration: none;
  transition: .25s;
  font-weight: bold;
}

.menu-item:hover {
  color: #fff;
}

.menu-item.active {
  color: #fff;
  background: linear-gradient(90deg, #8a63ff, #4cf0c9, #ff78be);
  -webkit-background-clip: text;
  color: transparent;
}

/* ================= BEAR ================= */

.bear-area {
  padding: 24px 0 12px;
  display: flex;
  justify-content: center;
}

.bear-video {
  width: 175px;
  border-radius: 50%;
  box-shadow:
    0 0 40px rgba(138, 99, 255, .6),
    0 0 80px rgba(76, 240, 201, .35),
    0 0 120px rgba(255, 120, 190, .25);
}

/* ================= CONTENT ================= */

.content {
  padding: 24px 22px;
  text-align: center;
}

.title {
  font-family: 'Space Grotesk';
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.6px;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 13px;
  line-height: 1.38;
  letter-spacing: -.3px;
  color: #cfd3ff;
  margin-bottom: 16px;
}

.usage-indicator {
  font-size: 12px;
  color: #7cf0d4;
  margin-bottom: 10px;
}

/* ================= BUTTON ================= */

.main-button {
  width: 100%;
  padding: 15px;
  border-radius: 20px;
  border: none;
  font-family: 'Poppins';
  font-size: 14px;
  letter-spacing: -.3px;
  background: linear-gradient(135deg, #8a63ff, #4cf0c9, #ff78be, #ffd66e);
  color: #000000;
  cursor: pointer;
  box-shadow:
    0 18px 40px rgba(138, 99, 255, .55),
    0 6px 18px rgba(0, 0, 0, .45);
  transition: .25s;
  font-weight:bold;
}

.main-button:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 26px 60px rgba(138, 99, 255, .75),
    0 10px 26px rgba(0, 0, 0, .6);
}

.main-button:active {
  transform: scale(.98);
}

/* ================= RESULT ================= */
.result-box {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.06);
  /* 아주 은은한 배경 */
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: -0.3px;
  white-space: pre-line;
  color: #e0e2ff;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(10px);
}

.result-box.show {
  opacity: 1;
  transform: translateY(0);
}

/* 제목 스타일 */
.result-box strong {
  display: block;
  font-size: 1.65em;
  font-weight: 700;
  background: linear-gradient(90deg, #7cfaff, #ff7ad9, #ffd66e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(124, 250, 255, 0.4);
}

/* 코멘트 텍스트 */
.result-box .comment-text {
  color: #d0d4ff;
  margin-bottom: 20px;
}

/* 팁 텍스트 */
.result-box .tip-text {
  color: #c0c4ff;
  font-style: italic;
}

/* 로딩 & 에러 텍스트 */
.loading-text,
.error-text {
  color: #a0a4ff;
  font-size: 1.1em;
  text-align: center;
}

/* luck-section과 result 사이 여백 */
.luck-section {
  margin-bottom: 35px;
}

/* ================= INPUT ================= */

.decision-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 14px;
}

.decision-inputs input {
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 13px;
  letter-spacing: -.25px;
  transition: .25s;
}

.decision-inputs input:focus {
  border-color: #4cf0c9;
  box-shadow: 0 0 0 3px rgba(76, 240, 201, .35);
}

/* ================= REVIEW ================= */

.review-section {
  padding: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.review-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.3px;
  margin-bottom: 10px;
}

.review-input {
  width: 100%;
  height: 70px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  border: none;
  color: #fff;
  letter-spacing: -.25px;
}

.review-button,
#load-more {
  width: 100%;
  padding: 11px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #8a63ff, #ff78be);
  color: #fff;
  box-shadow: 0 10px 28px rgba(138, 99, 255, .55);
  transition: .2s;
}

.review-button:hover,
#load-more:hover {
  transform: translateY(-2px);
}

.review-list {
  list-style: none;
  margin-top: 12px;
}

.review-list li {
  padding: 10px 12px;
  background: rgba(255, 255, 255, .1);
  border-radius: 14px;
  font-size: 12px;
  letter-spacing: -.25px;
  margin-bottom: 8px;
}

/* ================= TOAST ================= */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  background: linear-gradient(135deg, #8a63ff, #4cf0c9, #ff78be);
  color: #0c0820;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 12px;
  opacity: 0;
  transition: .35s;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================= CREDIT ================= */

.credit {
  text-align: center;
  font-size: 11px;
  letter-spacing: -.2px;
  padding: 16px 0 20px;
  color: #cfd3ff;
}

.luck-gauge {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 20px auto;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 14;
}

.gauge-bar {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  filter: drop-shadow(0 0 6px rgba(255, 120, 255, .6));

  stroke: linear-gradient(90deg, #7cfaff, #9d7bff, #ff7ad9);
}

/* SVG 그라데이션 */
svg defs {
  position: absolute;
}

.luck-gauge svg {
  overflow: visible;
}

.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.luck-score {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(90deg, #7cfaff, #ff7ad9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.luck-label {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

/* ================= RECORD SECTION ================= */
.record-section {
  padding: 20px;
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.record-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.save-button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #4cf0c9, #8a63ff);
  color: #0e0824;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.save-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(76, 240, 201, 0.5);
}

.records-list {
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.record-item {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}

.record-date {
  font-size: 13px;
  color: #a0a4ff;
  margin-bottom: 6px;
}

.record-theme {
  font-size: 14px;
  color: #7cfaff;
  font-weight: 600;
  margin-bottom: 8px;
}

.record-score {
  font-size: 15px;
  margin: 8px 0;
}

.record-score strong {
  color: #ffeb3b;
  font-size: 1.3em;
}

.no-record {
  text-align: center;
  color: #8084ff;
  padding: 20px;
}