/* Inner Child Test — style.css */
:root {
  --primary: #e8913a;
  --primary-light: #f0a85c;
  --primary-dark: #c47528;
  --secondary: #fbbf24;
  --accent: #fcd34d;
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-glass: rgba(232,145,58,0.06);
  --text-primary: #f8f8f8;
  --text-secondary: #a8a8a0;
  --border: rgba(232,145,58,0.15);
  --gradient-start: #e8913a;
  --gradient-end: #f59e0b;
  --shadow-glow: rgba(232,145,58,0.25);
}
[data-theme="light"] {
  --bg-dark: #faf8f5;
  --bg-card: #ffffff;
  --bg-glass: rgba(232,145,58,0.08);
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a52;
  --border: rgba(232,145,58,0.2);
}

.hook-question {
  font-size: 1.05rem; font-weight: 600; color: var(--primary-light);
  margin-bottom: 16px; line-height: 1.5; letter-spacing: -0.01em;
  opacity: 0; animation: fadeIn 0.5s ease 0.2s forwards;
}
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-dark); color: var(--text-primary); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ── App Loader ── */
#app-loader {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-dark);
}
.loader-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skip Link ── */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--primary); color: #fff;
  padding: 8px 16px; z-index: 10001; font-size: 14px;
  text-decoration: none; border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* ── Container ── */
.app-container { max-width: 480px; margin: 0 auto; padding: 16px; min-height: 100vh; }

/* ── Top Bar ── */
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; margin-bottom: 12px; }
.home-link { color: var(--text-secondary); text-decoration: none; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.home-link:hover { color: var(--primary); }
.controls { display: flex; gap: 8px; align-items: center; }

/* ── Theme Toggle ── */
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-secondary); cursor: pointer; padding: 6px 8px; font-size: 16px;
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }

/* ── Language Selector ── */
.lang-selector { position: relative; }
.lang-current {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-primary); padding: 6px 12px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.lang-dropdown {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; z-index: 100; min-width: 100px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: block; width: 100%; padding: 6px 10px; background: none; border: none;
  color: var(--text-secondary); font-size: 13px; text-align: left; cursor: pointer;
  border-radius: 6px; transition: all 0.15s;
}
.lang-option:hover, .lang-option.active { background: var(--bg-glass); color: var(--primary); }

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── Intro Screen ── */
.intro-hero { text-align: center; padding: 32px 0 20px; }
.hero-icon {
  width: 120px; height: 120px; margin: 0 auto 20px;
  position: relative;
}
.hero-icon svg { width: 100%; height: 100%; }
.pulse-ring {
  position: absolute; inset: -12px; border: 2px solid var(--primary);
  border-radius: 50%; opacity: 0; animation: pulse 2.5s ease-out infinite;
}
.pulse-ring:nth-child(2) { animation-delay: 0.8s; }
@keyframes pulse { 0% { transform: scale(0.8); opacity: 0.6; } 100% { transform: scale(1.3); opacity: 0; } }

.intro-title {
  font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.intro-subtitle { color: var(--text-secondary); font-size: 15px; margin-bottom: 16px; }
.social-proof { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.social-proof strong { color: var(--primary); }

/* ── Carousel ── */
.type-carousel { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; -ms-overflow-style: none; }
.type-carousel::-webkit-scrollbar { display: none; }
.carousel-card {
  flex: 0 0 auto; padding: 10px 16px;
  background: var(--bg-glass); border: 1px solid var(--border); border-radius: 12px;
  font-size: 13px; color: var(--text-secondary); white-space: nowrap;
  transition: all 0.2s;
}
.carousel-card:hover { border-color: var(--primary); color: var(--primary); }

/* ── Features ── */
.features { display: flex; justify-content: center; gap: 16px; margin: 16px 0; flex-wrap: wrap; }
.feature { text-align: center; font-size: 12px; color: var(--text-secondary); }
.feature-icon { font-size: 20px; margin-bottom: 4px; }
.time-estimate { text-align: center; font-size: 12px; color: var(--text-secondary); margin: 8px 0 20px; }

/* ── Start Button ── */
.start-btn {
  display: block; width: 100%; padding: 16px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; font-size: 17px; font-weight: 700; cursor: pointer;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow-glow); }
.start-btn:active { transform: translateY(0); }

/* ── Question Screen ── */
.progress-bar { height: 4px; background: var(--border); border-radius: 4px; margin-bottom: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); border-radius: 4px; transition: width 0.4s ease; width: 0; }
.progress-text { text-align: right; font-size: 12px; color: var(--text-secondary); margin-bottom: 20px; }
.question-title { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 20px; min-height: 60px; }

.option-btn {
  display: block; width: 100%; padding: 14px 16px; margin-bottom: 10px;
  background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 12px;
  color: var(--text-primary); font-size: 14px; text-align: left; cursor: pointer;
  transition: all 0.2s; line-height: 1.4;
}
.option-btn:hover { border-color: var(--primary); background: var(--bg-glass); transform: translateX(4px); }
.option-btn:active { transform: scale(0.98); }

/* ── Analyzing Screen ── */
.analyzing-content { text-align: center; padding: 60px 0; }
.analyzing-title { font-size: 20px; font-weight: 700; margin-bottom: 32px; color: var(--primary-light); }
.analyze-steps { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.analyze-step { display: flex; align-items: center; gap: 12px; }
.analyze-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border); transition: all 0.4s;
}
.analyze-dot.active { background: var(--primary); box-shadow: 0 0 12px var(--shadow-glow); }
#analyze-label { font-size: 14px; color: var(--text-secondary); min-width: 200px; text-align: left; }

/* ── Result Screen ── */
.result-header { text-align: center; padding: 24px 0 16px; }
.result-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: var(--bg-glass); border: 1px solid var(--border);
  font-size: 12px; color: var(--primary); margin-bottom: 12px;
}
.result-type-name {
  font-size: 28px; font-weight: 800; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.result-tagline { font-size: 14px; color: var(--text-secondary); font-style: italic; margin-bottom: 8px; }
.result-percentile { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; }
.result-description { font-size: 14px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; text-align: left; padding: 0 8px; }

/* ── Radar Section ── */
.radar-section {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; margin-bottom: 20px;
}
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--primary-light); }
.radar-chart { display: flex; justify-content: center; margin-bottom: 16px; }
.radar-chart canvas { max-width: 280px; }

/* ── Metrics ── */
.inner-child-metrics { display: flex; flex-direction: column; gap: 10px; }
.metric-row { display: flex; align-items: center; gap: 10px; }
.metric-label { font-size: 13px; color: var(--text-secondary); min-width: 90px; }
.metric-bar-bg { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.metric-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); border-radius: 4px; transition: width 1s ease; width: 0; }
.metric-value { font-size: 12px; color: var(--primary); min-width: 35px; text-align: right; }

/* ── Traits ── */
.traits-section {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; margin-bottom: 20px;
}
.trait-list { list-style: none; }
.trait-list li {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.trait-list li:last-child { border-bottom: none; }
.trait-list li::before { content: '🌿'; font-size: 14px; }

/* ── Healing Affirmation ── */
.affirmation-section {
  background: linear-gradient(135deg, rgba(232,145,58,0.12), rgba(245,158,11,0.08));
  border: 1.5px solid rgba(232,145,58,0.3); border-radius: 16px;
  padding: 24px 20px; margin-bottom: 20px; text-align: center;
}
.affirmation-icon { font-size: 32px; margin-bottom: 12px; }
.affirmation-title { font-size: 15px; font-weight: 600; color: var(--primary-light); margin-bottom: 12px; }
.affirmation-text {
  font-size: 15px; line-height: 1.7; color: var(--text-primary);
  font-style: italic; padding: 0 8px;
}

/* ── Share Buttons ── */
.share-section { margin-bottom: 20px; }
.share-title { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 12px; }
.share-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.share-btn {
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card); color: var(--text-secondary); font-size: 13px;
  cursor: pointer; transition: all 0.2s;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Retry ── */
.retry-btn {
  display: block; width: 100%; padding: 14px; border: 1.5px solid var(--primary);
  border-radius: 14px; background: transparent; color: var(--primary);
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s;
  margin-bottom: 24px;
}
.retry-btn:hover { background: var(--bg-glass); }

/* ── Related Tests ── */
.related-section { margin-bottom: 24px; }
.related-title { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.related-card {
  padding: 12px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; text-decoration: none; color: var(--text-primary);
  font-size: 13px; text-align: center; transition: all 0.2s;
}
.related-card:hover { border-color: var(--primary); background: var(--bg-glass); }

/* ── SEO Internal Links ── */
.seo-links { margin: 20px 0; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; }
.seo-links h3 { font-size: 14px; color: var(--primary-light); margin-bottom: 10px; }
.seo-links ul { list-style: none; }
.seo-links li { margin-bottom: 6px; }
.seo-links a { color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.seo-links a:hover { color: var(--primary); }

/* ── Footer ── */
.app-footer { text-align: center; padding: 20px 0; border-top: 1px solid var(--border); margin-top: 20px; }
.app-footer a { color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.app-footer a:hover { color: var(--primary); }

/* ── Confetti ── */
.confetti {
  position: absolute; width: 8px; height: 8px; border-radius: 2px;
  top: -10px; animation: confetti-fall linear forwards;
  pointer-events: none;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* ── AdSense ── */
.ad-slot { margin: 16px 0; min-height: 100px; text-align: center; overflow: hidden; }

/* ── Responsive ── */
@media (max-width: 380px) {
  .intro-title { font-size: 26px; }
  .result-type-name { font-size: 24px; }
  .option-btn { font-size: 13px; padding: 12px 14px; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
