/* 내 자산 방탄 지수 테스트 - 스타일시트 */

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

:root {
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #0f3460;
  --highlight-color: #e94560;
  --text-primary: #ffffff;
  --text-secondary: #b8c5d6;
  --card-bg: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  background: var(--primary-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(15, 52, 96, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(233, 69, 96, 0.2) 0%, transparent 50%);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* 헤더 */
.header {
  text-align: center;
  padding: 40px 20px 30px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.header h1 {
  font-size: 28px;
  margin-bottom: 10px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.header .description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
  opacity: 0.8;
}

/* 진행 표시 */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 0%;
}

/* 질문 카드 */
.question-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease;
}

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

.question-card h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.question-card .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

/* 선택지 */
.choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-item {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  text-align: left;
}

.choice-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--highlight-color);
  transform: translateX(5px);
}

.choice-item.selected {
  background: var(--gradient-1);
  border-color: var(--highlight-color);
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

/* 버튼 */
.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  background: var(--gradient-1);
  color: var(--text-primary);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 결과 페이지 */
.result-container {
  text-align: center;
  padding: 40px 20px;
}

.score-circle {
  width: 200px;
  height: 200px;
  margin: 0 auto 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-value {
  font-size: 64px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-label {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.result-type {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin: 30px 0;
  border: 1px solid var(--border-color);
}

.result-type h2 {
  font-size: 24px;
  margin-bottom: 15px;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-type .description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.advice-section {
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.advice-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--highlight-color);
}

.advice-section ul {
  list-style: none;
  padding: 0;
}

.advice-section li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
  color: var(--text-secondary);
}

.advice-section li:before {
  content: "💡";
  position: absolute;
  left: 0;
}

/* 차트 */
.chart-container {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin: 30px 0;
  border: 1px solid var(--border-color);
}

.chart-item {
  margin-bottom: 25px;
}

.chart-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.chart-bar {
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.chart-fill {
  height: 100%;
  border-radius: 15px;
  transition: width 1s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: white;
  font-weight: 600;
  font-size: 12px;
}

.chart-fill.defense {
  background: var(--gradient-3);
}

.chart-fill.risk {
  background: var(--gradient-2);
}

.chart-fill.fundamentals {
  background: var(--gradient-1);
}

/* 공유 버튼 */
.share-buttons {
  display: flex;
  gap: 12px;
  margin: 30px 0;
  justify-content: center;
}

.share-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--highlight-color);
  transform: translateY(-2px);
}

.share-btn.kakao {
  background: #FEE500;
  color: #000;
  border-color: #FEE500;
}

.share-btn.kakao:hover {
  background: #FFE43E;
}

/* 광고 슬롯 */
.ad-slot {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.ad-slot::before {
  content: "📢 광고";
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  opacity: 0.6;
}

/* 카카오 애드핏 영역 */
.kakao_ad_area {
  display: block !important;
  margin: 20px auto;
  text-align: center;
  min-height: 250px;
}

/* 가이드 섹션 */
.guide-section {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin: 30px 0;
  border: 1px solid var(--border-color);
  text-align: left;
}

.guide-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.guide-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.guide-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.guide-item h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--highlight-color);
}

.guide-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 다시하기 버튼 */
.restart-btn {
  margin-top: 30px;
  background: var(--gradient-2);
}

/* 반응형 */
@media (max-width: 768px) {
  .header h1 {
    font-size: 24px;
  }

  .question-card {
    padding: 20px;
  }

  .question-card h2 {
    font-size: 20px;
  }

  .choice-item {
    padding: 15px 18px;
    font-size: 15px;
  }

  .score-value {
    font-size: 48px;
  }

  .share-buttons {
    flex-direction: column;
  }
}

/* 로딩 애니메이션 */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--highlight-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

