
/* 공통 테마 CSS - 모든 사이트 통일 */
:root {
  /* 메인 컬러 팔레트 */
  --primary-gradient: linear-gradient(135deg, #FFDEE9 0%, #B5FFFC 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --text-primary: #333;
  --text-secondary: #666;
  --accent-color: #ff6b9d;
  --accent-hover: #e55a87;
  --border-color: rgba(255, 255, 255, 0.3);
  --shadow: 0 10px 30px rgba(0,0,0,0.1);
  --border-radius: 20px;
  
  /* 에겐/테토 테마 컬러 */
  --egen-color: #ff7eb3;
  --teto-color: #8ac6ff;
  --egen-soft: #ffe6f3;
  --teto-soft: #e6f2ff;
}

/* 다크모드 */
[data-theme="dark"] {
  --primary-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --card-bg: rgba(30, 30, 50, 0.95);
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --accent-color: #ff7eb3;
  --accent-hover: #ff9cc9;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* 전역 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Gmarket Sans', 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--primary-gradient);
  min-height: 100vh;
  color: var(--text-primary);
  transition: all 0.3s ease;
  line-height: 1.6;
}

/* 컨테이너 */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* 헤더 컨트롤 */
.header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.lang-selector {
  display: flex;
  gap: 10px;
}

.lang-btn {
  padding: 8px 16px;
  border: 2px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

.theme-toggle {
  padding: 10px;
  border: none;
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* 메인 카드 */
.main-card, .card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
}

/* 타이틀 */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(45deg, var(--accent-color), #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

/* 서브타이틀 */
.subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
  text-align: center;
}

/* 버튼 스타일 */
.btn, button {
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn:hover, button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn:disabled, button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: white;
}

/* 테스트 카드 */
.test-card {
  background: linear-gradient(135deg, var(--accent-color), #4facfe);
  padding: 25px;
  border-radius: 15px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  display: block;
}

.test-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.test-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.test-description {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* 진행률 바 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--egen-color), var(--teto-color));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

/* 질문/답변 스타일 */
.question-section {
  text-align: center;
  margin-bottom: 30px;
}

.question-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.answer-options {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.answer-option {
  padding: 16px 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  text-align: left;
}

.answer-option:hover {
  border-color: var(--accent-color);
  background: #f3f4f6;
}

.answer-option.selected {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white;
}

/* 결과 섹션 */
.result-section {
  text-align: center;
}

.result-header {
  background: #f9fafb;
  border-radius: 16px;
  padding: 32px 24px;
  margin-bottom: 24px;
}

.result-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
}

.result-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--accent-color);
}

/* 통계 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* 공유 버튼 */
.share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.share-btn {
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.share-btn:hover {
  transform: translateY(-2px);
}

/* 푸터 */
.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 반응형 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .main-card, .card {
    padding: 25px;
  }

  h1 {
    font-size: 2rem;
  }

  .header-controls {
    justify-content: center;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .share-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.7rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .share-buttons {
    grid-template-columns: 1fr;
  }
}

/* 로딩 애니메이션 */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 광고 영역 스타일 */
.ad-container {
  width: 100%;
  max-width: 380px;
  margin: 20px auto;
  text-align: center;
  clear: both;
}

/* 워터마크 */
.watermark, .fixed-watermark {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin-top: 20px;
}

.fixed-watermark {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
}

/* 숨김 클래스 */
.hidden {
  display: none;
}
