:root {
  /* 라이트 핑크 컬러 팔레트 */
  --primary_gradient: linear-gradient(135deg, #ffeef8 0%, #ffc2d8 100%);
  --secondary_gradient: linear-gradient(135deg, #ffb3d9 0%, #ff8fab 100%);
  --soft_gradient: linear-gradient(135deg, #fff0f5 0%, #fce4ec 100%);
  --card_bg: rgba(255, 255, 255, 0.95);
  --glass_bg: rgba(255, 182, 193, 0.1);
  --text_primary: #2d1b3d;
  --text_secondary: #6b5b73;
  --accent_color: #ff6b9d;
  --accent_hover: #ff5588;
  --accent_secondary: #ffb3d9;
  --border_color: rgba(255, 182, 193, 0.3);
  --shadow: 0 20px 25px -5px rgba(255, 107, 157, 0.1), 0 10px 10px -5px rgba(255, 107, 157, 0.05);
  --glow_shadow: 0 0 40px rgba(255, 107, 157, 0.3);
  --border_radius: 20px;
}

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

body {
  font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--primary_gradient);
  min-height: 100vh;
  color: var(--text_primary);
  transition: all 0.3s ease;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(600px circle at 25% 25%, rgba(255, 182, 193, 0.2) 0%, transparent 50%),
    radial-gradient(400px circle at 75% 75%, rgba(255, 179, 217, 0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 15px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

h1 {
  text-align: center;
  color: #2d1b3d;
  font-size: 2.2rem;
  margin-bottom: 8px;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
}

.subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #2d1b3d;
  margin-bottom: 30px;
  line-height: 1.4;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 6px rgba(255,255,255,0.8);
}

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

.test-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 40px;
    justify-content: center;
    justify-items: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    padding: 0 10px;
  }

  .section-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d1b3d;
    margin: 40px 0 25px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4), 0 0 8px rgba(255,255,255,0.8);
  }

  .ad-section {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: var(--card_bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border_color);
    box-shadow: var(--shadow);
    text-align: center;
    min-height: 300px;
    display: block;
    position: static;
    clear: both;
    overflow: visible;
  }

  /* 쿠팡 광고 전용 영역 - 구글 애드센스 차단 */
  .ad-section.coupang-only {
    /* 구글 애드센스 자동 삽입 방지 */
    data-ad-client: none !important;
    data-adtest: off !important;
  }

  /* 구글 애드센스가 쿠팡 광고 영역에 삽입되지 않도록 차단 */
  .ad-section.coupang-only .adsbygoogle,
  .ad-section.coupang-only ins[class*="adsbygoogle"],
  .ad-section.coupang-only [data-ad-client] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
  }

  /* 쿠팡 광고 컨테이너 보호 */
  #coupang-ad-container {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 200px;
    margin: 20px auto;
    text-align: center;
    clear: both;
    overflow: visible;
  }

  /* 쿠팡 광고 내부 요소 정렬 */
  #coupang-ad-container > div,
  #coupang-ad-container iframe {
    margin: 0 auto !important;
    display: block !important;
    position: static !important;
  }

  /* 일반 광고 섹션 (구글 애드센스 허용) */
  .ad-section:not(.coupang-only) .adsbygoogle {
    width: 100% !important;
    min-height: 250px;
  }

.test-card {
  background: var(--card_bg);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 10px;
  text-decoration: none;
  color: var(--text_primary);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border_color);
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100px;
  min-height: 100px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
}

.test-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--secondary_gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.test-card:hover::before {
  transform: scaleX(1);
}

.test-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
    }

    .ad-grid-item {
      grid-column: 1 / -1;
      background: var(--card_bg);
      border-radius: var(--border_radius);
      padding: 20px;
      margin: 10px 0;
      border: 1px solid var(--border_color);
      text-align: center;
      min-height: 250px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .ad-grid-item ins {
      width: 100% !important;
      min-height: 200px;
    }

.test-number {
  position: absolute;
  top: 12px;
  right: 16px;
  background: var(--secondary_gradient);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.test-card h3 {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.15rem;
  margin-bottom: 4px;
  font-weight: 700;
  padding-right: 35px;
  line-height: 1.2;
}

.test-card p {
  color: var(--text_secondary);
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 400;
  margin: 0;
}

.language-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
}

.lang-btn {
  background: var(--glass_bg);
  backdrop-filter: blur(10px);
  color: var(--text_primary);
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border_color);
}

.lang-btn:hover {
  background: var(--accent_color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* 테스트 페이지 스타일 */
.question {
  background: var(--card_bg);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border_color);
  position: relative;
  z-index: 200;
}

/* 테스트 페이지 내부 질문 카드 스타일 */
.question-card {
  background: var(--card_bg);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: var(--text_primary);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border_color);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 280px;
  text-align: center;
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--secondary_gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.question-card:hover::before {
  transform: scaleX(1);
}

.question-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

.question-card h3 {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.question-card p {
  color: var(--text_secondary);
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 400;
}

.question h2 {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.4rem;
  margin-bottom: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice {
  background: var(--glass_bg);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  border: 2px solid var(--border_color);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.choice::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--secondary_gradient);
  transition: left 0.3s ease;
  z-index: -1;
}

.choice:hover::before {
  left: 0;
}

.choice:hover {
  color: white;
  transform: translateY(-3px) scale(1.02);
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

.result {
  background: var(--card_bg);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border_color);
  position: relative;
  z-index: 200;
}

.result.hidden {
  display: none;
}

.result h3 {
  background: var(--secondary_gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.6rem;
  margin-bottom: 16px;
  font-weight: 800;
}

.result p {
  color: var(--text_secondary);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
  font-weight: 400;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 25px;
}

.share-btn {
  background: var(--accent_color);
  color: white;
  padding: 14px 22px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  min-width: 140px;
  text-align: center;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.share-btn:hover {
  background: var(--accent_hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.navigation {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.nav-btn {
  background: var(--accent_color);
  color: white;
  padding: 16px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.nav-btn:hover {
  background: var(--accent_hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.additional-nav {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.other-tests-btn {
  background: var(--accent_secondary);
  color: white;
  padding: 16px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.other-tests-btn:hover {
  background: #d97706;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

footer {
  text-align: center;
  margin-top: 50px;
  padding: 25px;
  color: #2d1b3d;
  font-size: 0.9rem;
  font-weight: 400;
}

footer a {
  color: #2d1b3d;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent_color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
  z-index: 1000;
  border: none;
  text-decoration: none;
}

.back-to-top:hover {
  background: var(--accent_hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

.back-to-top.visible {
  display: flex;
}



/* 일반 푸터 스타일 */

/* PC용 추가 스타일 */
@media (min-width: 1024px) {
  .container {
    padding: 30px;
    max-width: 840px;
  }

  .test-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  /* 메인 페이지 카드는 원래 크기 유지 */
  .test-card {
    padding: 16px;
    max-width: 280px;
  }

  .test-card h3 {
    font-size: 1.1rem;
  }

  .test-card p {
    font-size: 0.85rem;
  }

  /* 테스트 페이지 내부 카드만 작게 */
  .question-card {
    padding: 11px;
    max-width: 224px;
  }

  .question-card h3 {
    font-size: 0.84rem;
  }

  .question-card p {
    font-size: 0.64rem;
  }

  .question {
    padding: 40px;
  }

  .choices {
    gap: 18px;
  }

  .choice {
    padding: 22px 30px;
  }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  body {
    padding: 8px;
  }

  .container {
    padding: 8px;
    max-width: 100%;
    margin: 0;
  }

  h1 {
    font-size: 1.8rem;
  }

  .test-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0;
    padding: 0 8px;
    width: 100%;
  }

  .test-card {
    padding: 8px 10px;
    height: 110px;
    min-height: 110px;
    margin: 0;
    max-width: 100%;
    width: 100%;
  }

  .test-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    padding-right: 32px;
    line-height: 1.2;
  }

  .test-card p {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .test-number {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    top: 8px;
    right: 10px;
  }

  .question {
    padding: 20px;
    margin: 8px;
  }

  .question h2 {
    font-size: 1.3rem;
  }

  .choice {
    padding: 16px 18px;
    font-size: 0.95rem;
  }

  .navigation {
    flex-direction: column;
    align-items: center;
    padding: 0 8px;
  }

  .nav-btn {
    width: 100%;
    max-width: 280px;
  }

  .share-buttons {
    gap: 8px;
  }

  .share-btn {
    padding: 10px 16px;
    min-width: 110px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 4px;
    overflow-x: hidden;
  }

  .container {
    padding: 4px;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
  }

  h1 {
    font-size: 1.6rem;
    margin-bottom: 6px;
  }

  .subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .test-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 0 8px;
    width: 100%;
  }

  .test-card {
    padding: 8px 12px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 95px;
    min-height: 95px;
  }

  .test-card h3 {
    font-size: 1.15rem;
    margin-bottom: 3px;
    padding-right: 30px;
    line-height: 1.2;
  }

  .test-card p {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .test-number {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
    top: 8px;
    right: 8px;
  }

  .question {
    padding: 16px;
    margin: 4px;
  }

  .question h2 {
    font-size: 1.2rem;
  }

  .choice {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .navigation {
    flex-direction: column;
    align-items: center;
    padding: 0 4px;
    margin: 20px 0;
  }

  .nav-btn {
    width: 100%;
    max-width: 250px;
    margin: 0;
  }

  .section-title {
    font-size: 1.2rem;
    margin: 30px 0 20px 0;
  }

  .language-selector {
    margin-bottom: 20px;
  }

  .lang-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .other-tests-btn {
    padding: 14px 24px;
    font-size: 0.9rem;
    min-width: 160px;
  }
}

/* 다크모드 지원 - 현재 비활성화됨 */
/* 
@media (prefers-color-scheme: dark) {
  :root {
    --primary_gradient: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    --card_bg: rgba(26, 32, 44, 0.9);
    --glass_bg: rgba(255, 255, 255, 0.05);
    --text_primary: #f7fafc;
    --text_secondary: #a0aec0;
    --border_color: rgba(255, 255, 255, 0.1);
  }
}
*/