@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --secondary: #ec4899;
  --secondary-light: #f9a8d4;
  --accent: #f59e0b;
  --bg: #0f0a1e;
  --bg2: #1a1030;
  --bg3: #231540;
  --card: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.1);
  --text: #f1f0f7;
  --text-muted: #9d95c0;
  --radius: 18px;
  --shadow: 0 8px 32px rgba(124,58,237,0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Background Stars ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(124,58,237,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(236,72,153,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(17,10,40,1) 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ---- Header / Nav ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(15,10,30,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo .logo-icon { font-size: 1.8rem; filter: drop-shadow(0 0 8px var(--primary-light)); }

nav { display: flex; gap: 8px; }

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 50px;
  transition: all 0.2s;
}

nav a:hover, nav a.active {
  color: var(--text);
  background: rgba(124,58,237,0.2);
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  color: var(--primary-light);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(124,58,237,0); }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 36px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 24px rgba(124,58,237,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.6);
}

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 1.5px solid var(--primary-light);
}

.btn-outline:hover {
  background: rgba(124,58,237,0.15);
  transform: translateY(-2px);
}

.btn-share {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: white;
  padding: 12px 22px;
  font-size: 0.95rem;
}

.btn-kakao {
  background: #fee500;
  color: #3c1e1e;
  padding: 12px 22px;
  font-size: 0.95rem;
}

/* ---- Section ---- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-title p { color: var(--text-muted); }

/* ---- Cards Grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(236,72,153,0.05));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::before { opacity: 1; }
.card:hover {
  border-color: rgba(124,58,237,0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-emoji {
  font-size: 2.8rem;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.3));
}

.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-purple { background: rgba(124,58,237,0.25); color: var(--primary-light); }
.tag-pink { background: rgba(236,72,153,0.25); color: var(--secondary-light); }
.tag-gold { background: rgba(245,158,11,0.25); color: #fcd34d; }
.tag-cyan { background: rgba(6,182,212,0.25); color: #67e8f9; }

/* ---- Ad Banner ---- */
.ad-banner {
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(236,72,153,0.1));
  border: 1px dashed rgba(245,158,11,0.4);
  border-radius: var(--radius);
  padding: 20px 28px;
  text-align: center;
  margin: 32px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ad-banner strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(245,158,11,0.7);
  margin-bottom: 8px;
}

.ad-banner-large {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- Quiz / Test Layout ---- */
.quiz-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.progress-bar-wrap {
  margin-bottom: 36px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 50px;
  transition: width 0.5s ease;
}

.question-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 28px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}

.option-btn:hover {
  background: rgba(124,58,237,0.15);
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.option-btn.selected {
  background: rgba(124,58,237,0.25);
  border-color: var(--primary);
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(124,58,237,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: var(--primary-light);
}

/* ---- Result Card ---- */
.result-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  text-align: center;
}

.result-emoji-big {
  font-size: 5rem;
  margin-bottom: 16px;
  animation: bounceIn 0.6s ease;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.4));
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.result-type {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 8px;
  font-weight: 700;
}

.result-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-desc {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 12px;
}

.stat-box .stat-val {
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-box .stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.share-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ---- Fortune Page ---- */
.fortune-form {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 480px;
  margin: 0 auto;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-light);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(124,58,237,0.08);
}

.form-control option { background: var(--bg2); }

/* ---- Fortune Result ---- */
.fortune-result {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 28px;
  animation: fadeInUp 0.5s ease;
}

.fortune-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--card-border);
  align-items: flex-start;
}

.fortune-item:last-child { border-bottom: none; }

.fortune-icon { font-size: 1.8rem; flex-shrink: 0; }

.fortune-text h4 { font-weight: 700; margin-bottom: 4px; font-size: 1rem; }
.fortune-text p { color: var(--text-muted); font-size: 0.9rem; }

.stars {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* ---- Footer ---- */
.site-footer {
  background: rgba(15,10,30,0.9);
  border-top: 1px solid var(--card-border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a { color: var(--primary-light); text-decoration: none; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-40 { margin-bottom: 40px; }

/* ---- Animations ---- */
.floating {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .site-header { padding: 14px 16px; }
  nav a { padding: 7px 12px; font-size: 0.82rem; }
  .hero { padding: 50px 16px 40px; }
  .cards-grid { grid-template-columns: 1fr; }
  .result-stats { grid-template-columns: repeat(3, 1fr); }
  .question-card { padding: 24px; }
}
