/* style.css - Premium Glassmorphic MBTI Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --bg-primary: #0a0e1a;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0a0b10 100%);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.3);
  --secondary: #ec4899;
  --secondary-glow: rgba(236, 72, 153, 0.3);
  
  /* Dimension Colors */
  --color-e: #ff5252;
  --color-i: #29b6f6;
  --color-s: #ffca28;
  --color-n: #66bb6a;
  --color-t: #ab47bc;
  --color-f: #ec407a;
  --color-j: #26c6da;
  --color-p: #d4e157;
  
  --font-title: 'Outfit', 'Noto Sans KR', sans-serif;
  --font-body: 'Inter', 'Noto Sans KR', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg-primary);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 20px;
}

/* App Layout */
.app-container {
  width: 100%;
  max-width: 650px;
  min-height: 550px;
  position: relative;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 40px;
  width: 100%;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.1);
}

/* Hide Utility */
.hidden {
  display: none !important;
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 1. Start Screen */
body.body-start-mode {
  background-color: #f1c407;
  background-image: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.start-screen {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: transparent;
}

.start-content {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-image: url('../bg_mbti.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.btn-start-hotspot {
  position: absolute;
  left: 37.5%;
  width: 25%;
  bottom: 12%;
  height: 16%;
  background: rgba(255, 255, 255, 0);
  border: none;
  cursor: pointer;
  outline: none;
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.btn-start-hotspot:hover {
  background: rgba(255, 255, 255, 0.04);
}

.btn-start-hotspot:active {
  background: rgba(255, 255, 255, 0.12);
}

.logo-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 30px var(--primary-glow);
  animation: pulse 2s infinite alternate;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 20px var(--primary-glow); }
  100% { transform: scale(1.05); box-shadow: 0 0 40px var(--secondary-glow); }
}

.title {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--secondary-glow);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 2. Question Screen */
#question-screen {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../testing_mbti.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-container {
  position: absolute;
  left: 4%;
  width: 55%;
  top: 25%;
  height: 68%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 36px 30px;
}

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

.btn-back-link {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-back-link.dark-back {
  color: #475569;
}

.btn-back-link.dark-back:hover {
  color: #0f172a;
}

.counter {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
}

.counter .current {
  color: #2e7d32;
  font-size: 18px;
}

.counter .total-text {
  color: #64748b;
}

/* Progress Bar */
.progress-container.dark-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2e7d32, #66bb6a);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

.question-area {
  margin-bottom: 24px;
}

.question-tag.dark-tag {
  display: inline-block;
  background: rgba(46, 125, 50, 0.08);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.question-text.dark-question {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.45;
  color: #1e293b;
  word-break: keep-all;
}

/* Options */
.options-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.option-button {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px 24px;
  text-align: left;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
}

.option-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition);
}

.option-button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: translateX(4px);
}

.option-button:hover .option-badge {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* 3. Result Screen */
#result-screen {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../Result_mbti.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 80;
}

.result-header {
  text-align: center;
  margin-bottom: 30px;
}

.result-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.result-badge-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.result-badge {
  width: 130px;
  height: 130px;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.result-badge-emoji {
  font-size: 40px;
  margin-bottom: 4px;
}

.result-badge-code {
  font-family: var(--font-title);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
}

.result-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-nickname {
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.result-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 30px;
  word-break: keep-all;
}

/* Chart Sliders */
.chart-section {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 30px;
}

.chart-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dimension-row {
  margin-bottom: 18px;
}

.dimension-row:last-child {
  margin-bottom: 0;
}

.dimension-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dim-left { color: var(--text-secondary); }
.dim-right { color: var(--text-secondary); }

.dim-left.active-dim { color: var(--left-color); font-weight: 700; }
.dim-right.active-dim { color: var(--right-color); font-weight: 700; }

.slider-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.slider-fill-left {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--left-color);
  width: 50%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 5px 0 0 5px;
}

.slider-fill-right {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  background: var(--right-color);
  width: 50%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 5px 5px 0;
}

.slider-divider {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* Traits Lists */
.traits-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (min-width: 550px) {
  .traits-section {
    grid-template-columns: 1fr 1fr;
  }
}

.trait-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px;
}

.trait-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trait-title.pos { color: #81c784; }
.trait-title.neg { color: #e57373; }

.trait-list {
  list-style: none;
}

.trait-item {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  padding-left: 14px;
  position: relative;
}

.trait-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.advice-card {
  background: rgba(99, 102, 241, 0.03);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

.instructor-advice-card {
  background: rgba(245, 127, 23, 0.03);
  border: 1px solid rgba(245, 127, 23, 0.15);
  margin-bottom: 40px;
}

.instructor-advice-card .advice-title {
  color: #f57f17;
}

.advice-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advice-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: keep-all;
}

/* Result Actions */
.result-actions {
  display: flex;
  justify-content: center;
}

.btn-restart {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-restart:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* 3점 리커트 버튼 디자인 */
.likert-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 24px 12px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.likert-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}

/* 첫 번째 버튼: 그렇다 (Green/Cyan 테마) */
.likert-btn:nth-child(1):hover {
  border-color: rgba(76, 175, 80, 0.4);
  color: #81c784;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
}
.likert-btn:nth-child(1).selected {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(0, 172, 193, 0.15) 100%);
  border-color: #4caf50;
  color: #81c784;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.25);
}
.likert-btn:nth-child(1).selected .likert-score {
  background: #4caf50;
  border-color: #4caf50;
  color: #fff;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* 두 번째 버튼: 보통이다 (Gray/Purple 테마) */
.likert-btn:nth-child(2):hover {
  border-color: rgba(144, 164, 174, 0.4);
  color: #b0bec5;
  box-shadow: 0 4px 20px rgba(144, 164, 174, 0.15);
}
.likert-btn:nth-child(2).selected {
  background: linear-gradient(135deg, rgba(144, 164, 174, 0.15) 0%, rgba(156, 39, 176, 0.15) 100%);
  border-color: #90a4ae;
  color: #e2e8f0;
  box-shadow: 0 0 20px rgba(144, 164, 174, 0.25);
}
.likert-btn:nth-child(2).selected .likert-score {
  background: #90a4ae;
  border-color: #90a4ae;
  color: #fff;
  box-shadow: 0 0 10px rgba(144, 164, 174, 0.5);
}

/* 세 번째 버튼: 아니다 (Red/Pink 테마) */
.likert-btn:nth-child(3):hover {
  border-color: rgba(244, 67, 54, 0.4);
  color: #e57373;
  box-shadow: 0 4px 20px rgba(244, 67, 54, 0.15);
}
.likert-btn:nth-child(3).selected {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(233, 30, 99, 0.15) 100%);
  border-color: #f44336;
  color: #e57373;
  box-shadow: 0 0 20px rgba(244, 67, 54, 0.25);
}
.likert-btn:nth-child(3).selected .likert-score {
  background: #f44336;
  border-color: #f44336;
  color: #fff;
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

.likert-score {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.likert-btn:hover .likert-score {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.likert-label {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
}

/* 원점수 라벨 스타일 */
.raw-score {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dimension row color bindings */
#slider-ei { --left-color: var(--color-e); --right-color: var(--color-i); }
#slider-sn { --left-color: var(--color-s); --right-color: var(--color-n); }
#slider-tf { --left-color: var(--color-t); --right-color: var(--color-f); }
#slider-jp { --left-color: var(--color-j); --right-color: var(--color-p); }

/* 모바일 전용 반응형 UI 개선 */
@media (max-width: 600px) {
  body {
    padding: 12px;
  }
  
  .glass-card {
    padding: 24px 20px;
    border-radius: 20px;
  }
  
  .title {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 14px;
    margin-bottom: 28px;
  }
  
  .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
  }
  
  .question-area {
    margin-bottom: 28px;
  }
  
  .question-text {
    font-size: 18px;
    line-height: 1.45;
  }
  
  .options-list {
    gap: 8px;
  }
  
  .likert-btn {
    padding: 16px 8px;
    border-radius: 12px;
    gap: 8px;
  }
  
  .likert-score {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  
  .likert-label {
    font-size: 13px;
  }
  
  /* 결과 화면 모바일 최적화 */
  .result-badge {
    width: 105px;
    height: 105px;
    border-radius: 24px;
  }
  
  .result-badge-emoji {
    font-size: 30px;
  }
  
  .result-badge-code {
    font-size: 30px;
  }
  
  .result-title {
    font-size: 22px;
  }
  
  .result-desc {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .chart-section {
    padding: 16px;
  }
  
  .dimension-labels {
    font-size: 11px;
  }
  
  .raw-score {
    font-size: 10px;
  }
  
  .traits-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .trait-card {
    padding: 16px;
  }
  
  .advice-card {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .instructor-advice-card {
    margin-bottom: 24px;
  }
  
  .btn-restart {
    width: 100%;
    justify-content: center;
  }
}

/* 보드 안(아이보리 네모칸) 리커트 버튼 스타일 오버라이드 */
.quiz-container .likert-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #475569;
  padding: 16px 8px;
}

.quiz-container .likert-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.quiz-container .likert-score {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #475569;
}

.quiz-container .likert-btn:nth-child(1):hover {
  border-color: rgba(46, 125, 50, 0.5);
  color: #2e7d32;
}
.quiz-container .likert-btn:nth-child(1).selected {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, rgba(0, 172, 193, 0.12) 100%);
  border-color: #2e7d32;
  color: #2e7d32;
}

.quiz-container .likert-btn:nth-child(2):hover {
  border-color: rgba(120, 144, 156, 0.5);
  color: #37474f;
}
.quiz-container .likert-btn:nth-child(2).selected {
  background: linear-gradient(135deg, rgba(120, 144, 156, 0.12) 0%, rgba(156, 39, 176, 0.12) 100%);
  border-color: #546e7a;
  color: #37474f;
}

.quiz-container .likert-btn:nth-child(3):hover {
  border-color: rgba(211, 47, 47, 0.5);
  color: #c62828;
}
.quiz-container .likert-btn:nth-child(3).selected {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.12) 0%, rgba(233, 30, 99, 0.12) 100%);
  border-color: #c62828;
  color: #c62828;
}

.quiz-container .likert-btn.selected .likert-score {
  color: #fff;
}

/* 모바일 600px 미만 퀴즈 영역 최적화 오버라이드 */
@media (max-width: 600px) {
  .quiz-container {
    padding: 8px 6px 20px 6px;
    top: 25%;
    height: 62%;
    left: 4%;
    width: 55%;
  }
  
  .quiz-container .question-header {
    margin-bottom: 4px;
  }
  
  .quiz-container .btn-back-link {
    font-size: 11px;
  }
  
  .quiz-container .counter {
    font-size: 11px;
  }
  
  .quiz-container .counter .current {
    font-size: 13px;
  }
  
  .quiz-container .progress-container.dark-progress-track {
    margin-bottom: 12px;
    height: 4px;
  }
  
  .quiz-container .question-area {
    margin-bottom: 12px;
  }
  
  .quiz-container .question-tag.dark-tag {
    padding: 3px 6px;
    font-size: 9px;
    margin-bottom: 6px;
    border-radius: 4px;
  }
  
  .quiz-container .question-text.dark-question {
    font-size: 12px !important;
    line-height: 1.35;
  }
  
  .quiz-container .options-list {
    gap: 6px;
  }
  
  .quiz-container .likert-btn {
    padding: 10px 4px;
    border-radius: 10px;
    gap: 4px;
  }
  
  .quiz-container .likert-score {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  
  .quiz-container .likert-label {
    font-size: 10px;
  }
}

/* ──────────────── 결과 보드 & 그리드 스타일 ──────────────── */
.result-top-info {
  position: absolute;
  left: 0;
  width: 100%;
  top: 25.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 85;
}

.top-mbti-badge {
  background: #faf8f0;
  color: #1e293b;
  border: 2px solid #1e293b;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
  padding: 8px 24px;
  font-size: 19px;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.top-mbti-badge:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.22);
  background: #fff;
}

#top-type-code {
  color: #2e7d32;
  font-size: 23px;
  margin-left: 6px;
  text-decoration: underline;
}

.your-type-container {
  position: absolute;
  left: 5.5%;
  width: 18.5%;
  top: 44.5%;
  height: 12.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  z-index: 85;
}

.result-grid {
  position: absolute;
  left: 27.0%;
  top: 46.6%;
  width: 64.5%;
  height: 34.5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  box-sizing: border-box;
  z-index: 85;
}

.grid-cell {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 8px;
}

.grid-cell.active-highlight {
  border: 3px dashed #fff;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  animation: gridCellPulse 1.2s infinite alternate;
  z-index: 88;
  margin: 4px 6px;
}

@keyframes gridCellPulse {
  0% {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 25px rgba(99, 102, 241, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
  }
  100% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 45px rgba(236, 72, 153, 0.8);
    border-color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.03);
  }
}

.btn-board-restart {
  background: #f1c407;
  color: #1e293b;
  border: 2px solid #1e293b;
  border-radius: 12px;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 85;
}

.btn-board-restart:hover {
  background: #f39c12;
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.22);
}

.btn-board-restart:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
}

/* ──────────────── 상세 결과 팝업 모달 ──────────────── */
.modal-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.modal-content {
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  border-radius: 24px;
  padding: 30px !important;
  box-sizing: border-box;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 15px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  z-index: 160;
}

.modal-close:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

/* 모바일 결과 화면 보정 */
@media (max-width: 600px) {
  .your-type-text {
    font-size: 18px !important;
  }
  
  .btn-board-restart {
    font-size: 9px !important;
    border-radius: 6px;
    top: 61%;
    height: 5%;
  }
  
  .modal-content {
    width: 95%;
    max-height: 90vh;
    padding: 16px !important;
  }
}

