:root {
  --primary: #6366f1;
  --secondary: #ec4899;
  --bg-color: #0f172a;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* changed from center for long content */
  padding: 3rem 1rem;
  box-sizing: border-box;
}

#app {
  width: 100%;
  max-width: 1000px; /* narrowed slightly */
  margin: 0 auto;
}

/* Glassmorphism Card Utils */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 99px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}
.btn:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

/* Typography */
h1 {
  font-size: 3rem;
  background: linear-gradient(to right, #a8a2ff, #ffb1df);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  margin-top: 0;
  letter-spacing: -1px;
}
h2 {
  font-size: 1.8rem;
  margin: 0;
  color: #fff;
}
p {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Views Layouts */
.view {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.menu-card {
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}

.menu-card:hover { transform: translateY(-8px); }
.menu-card img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.menu-card:hover img { transform: scale(1.15) rotate(4deg); }

.header { text-align: center; margin-bottom: 2rem; }

/* Test View UI */
.step-indicator {
  text-align: center;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.question-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.q-title {
  margin: 2rem 0;
  font-size: 1.8rem;
  line-height: 1.4;
  color: #fff;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 99px;
}

/* Scale Buttons for Basic Test */
.scale-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  transition: opacity 0.25s ease;
  background: rgba(0,0,0,0.2);
  padding: 1.5rem;
  border-radius: 20px;
}
.scale-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  width: 80px;
}
.scale-buttons {
  display: flex;
  gap: 0.8rem;
  flex: 1;
  justify-content: center;
}
.scale-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: transparent;
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}
.scale-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Options Grid for RPG Test */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: opacity 0.25s ease;
}
.option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  line-height: 1.4;
}
.option-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}
.game-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

/* Result Screens */
.result-screen { text-align: center; }
.result-container {
  max-width: 850px;
  margin: 0 auto;
  position: relative;
}

.result-image {
  width: 220px;
  height: 220px;
  margin: 1.5rem auto;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  text-align: left;
}

.roadmap-box {
  padding: 1.5rem;
  background: rgba(0,0,0,0.25);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.05);
}
.roadmap-box h3 {
  color: #a8a2ff;
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

/* Stat bar for values */
.stat-bar { margin-bottom: 1rem; }
.stat-bar .label {
  display: block;
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  border-radius: 99px;
  min-width: 5%;
}

/* Job Accordion Styles */
.job-accordion {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  margin-bottom: 2.5rem;
  border-left: 6px solid #6366f1;
  overflow: hidden;
  transition: all 0.3s ease;
}
.job-accordion[open] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.job-accordion summary {
  padding: 2.5rem;
  font-size: 1.8rem;
  font-weight: 800;
  color: #a8a2ff;
  cursor: pointer;
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
}
.job-accordion summary::-webkit-details-marker {
  display: none;
}
.job-accordion summary:hover {
  background: rgba(255, 255, 255, 0.03);
}
.accordion-icon {
  font-size: 1.2rem;
  color: #818cf8;
  font-weight: 800;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: rgba(99, 102, 241, 0.2);
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.job-accordion[open] .accordion-icon {
  transform: rotate(180deg);
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}
.job-details-content {
  padding: 0 2.5rem 2.5rem 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 1rem;
  padding-top: 2rem;
  animation: slideDown 0.4s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Quest Specific Classes */
.allocation-form label {
  font-weight: 600;
}
.allocation-form input {
  font-size: 1.1rem;
  font-weight: bold;
}
.match-scenario img {
  border: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.interactive-prompt {
  font-family: 'Pretendard', sans-serif;
  letter-spacing: 0.3px;
}

.back-btn {
  background: transparent;
  border: 1.5px solid var(--text-muted);
  color: var(--text-muted);
  margin-top: 3rem;
  box-shadow: none;
}
.back-btn:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  border-color: white;
  box-shadow: none;
}

/* Particles */
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
}
@keyframes float {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}
