/* =============================================================
   Attachment Style — Theme CSS
   Romantic pink/rose theme, Prompt font, watercolor backgrounds
   ============================================================= */

:root {
  --mf-bg: #FFF0F3;
  --mf-text: #3D1F2E;
  --mf-text-secondary: rgba(80, 40, 60, 0.85);
  --mf-text-dim: rgba(100, 60, 80, 0.7);
  --mf-accent: #E85D75;
  --mf-accent-glow: rgba(232, 93, 117, 0.3);
  --mf-border: rgba(232, 93, 117, 0.2);
  --mf-btn-text: #fff;
  --mf-coral: #E85D75;
  --mf-purple: #A855F7;
  --mf-blue: #3B82F6;
  --mf-pink: #F472B6;
  --mf-rose: #FB7185;
  --mf-violet: #8B5CF6;
  --mf-font: 'Prompt', sans-serif;
}

/* --- Body ---  */
body {
  font-family: var(--mf-font) !important;
  background: linear-gradient(160deg, #FFF5F7 0%, #FFE8EE 30%, #F5E0FF 65%, #FFE0F0 100%);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

/* --- Fix screen centering --- */
.screen {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding: 0 !important;
}

.screen > div {
  margin: auto;
  width: 100%;
  padding: 24px 20px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* =====================================================
   Background watercolor decorations
   ===================================================== */
.bg-decor {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bg-splash {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.bg-splash-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(244,114,182,0.3), transparent 70%);
  top: -80px; left: -60px;
  animation: mf-drift 20s ease-in-out infinite;
}
.bg-splash-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(168,85,247,0.25), transparent 70%);
  top: -100px; right: -80px;
  animation: mf-drift 25s ease-in-out infinite reverse;
}
.bg-splash-3 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(251,113,133,0.25), transparent 70%);
  bottom: 10%; left: -40px;
  animation: mf-drift 22s ease-in-out 3s infinite;
}
.bg-splash-4 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(249,168,212,0.25), transparent 70%);
  bottom: -80px; right: -60px;
  animation: mf-drift 18s ease-in-out 5s infinite reverse;
}
.bg-splash-5 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(232,93,117,0.15), transparent 70%);
  top: 40%; left: 50%;
  transform: translateX(-50%);
  animation: mf-drift 30s ease-in-out 2s infinite;
}

/* Floating background icons */
.bg-icon {
  position: absolute;
  font-size: 24px;
  opacity: 0.12;
  filter: blur(0.5px);
  animation: mf-float-icon 12s ease-in-out infinite;
}
.bg-icon::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  filter: blur(20px);
  z-index: -1;
}
.bg-icon-1 { top: 8%;  left: 12%;  animation-delay: 0s;   font-size: 22px; }
.bg-icon-1::before { background: rgba(244,114,182,0.4); }
.bg-icon-2 { top: 15%; right: 10%; animation-delay: 1.5s; font-size: 28px; }
.bg-icon-2::before { background: rgba(232,93,117,0.4); }
.bg-icon-3 { top: 35%; left: 5%;   animation-delay: 3s;   font-size: 20px; }
.bg-icon-3::before { background: rgba(168,85,247,0.4); }
.bg-icon-4 { top: 50%; right: 8%;  animation-delay: 4.5s; font-size: 26px; }
.bg-icon-4::before { background: rgba(251,113,133,0.4); }
.bg-icon-5 { top: 70%; left: 8%;   animation-delay: 2s;   font-size: 24px; }
.bg-icon-5::before { background: rgba(249,168,212,0.4); }
.bg-icon-6 { top: 85%; right: 12%; animation-delay: 5s;   font-size: 22px; }
.bg-icon-6::before { background: rgba(139,92,246,0.4); }

/* =====================================================
   Animations
   ===================================================== */
@keyframes mf-drift {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(20px, -15px); }
  50%      { transform: translate(-10px, 20px); }
  75%      { transform: translate(15px, 10px); }
}

@keyframes mf-float-icon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-12px) rotate(5deg); }
  50%      { transform: translateY(-5px) rotate(-3deg); }
  75%      { transform: translateY(-15px) rotate(3deg); }
}

@keyframes mf-heartbeat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.15); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.1); }
  56%      { transform: scale(1); }
}

@keyframes mf-bounce-in {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  50%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
  70%  { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes mf-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  10%  { transform: rotate(3deg) scale(1.02); }
  20%  { transform: rotate(-3deg) scale(1.02); }
  30%  { transform: rotate(2deg) scale(1.01); }
  40%  { transform: rotate(-2deg) scale(1.01); }
  50%  { transform: rotate(0deg) scale(1); }
}

/* =====================================================
   SCREEN: Landing
   ===================================================== */
.landing-container {
  text-align: center;
  max-width: 480px;
}

.landing-emoji {
  font-size: 80px;
  line-height: 1;
  margin-bottom: 12px;
  animation: mf-heartbeat 2s ease-in-out infinite;
}

.landing-title {
  font-family: var(--mf-font);
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--mf-coral), var(--mf-purple), var(--mf-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.landing-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--mf-text-secondary);
  margin-bottom: 16px;
}

.landing-desc {
  font-size: 17px;
  color: var(--mf-text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* Landing animal preview */
.landing-types {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.landing-type-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.landing-type-emoji {
  font-size: 48px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(232, 93, 117, 0.15);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.landing-type-emoji:hover {
  transform: scale(1.15) rotate(5deg);
}

.landing-type-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mf-text-dim);
}

.landing-features {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(232, 93, 117, 0.15);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  color: var(--mf-text);
  backdrop-filter: blur(10px);
}

.landing-time {
  font-size: 13px;
  color: var(--mf-text-dim);
  margin-top: 16px;
}

.landing-science {
  margin-top: 20px;
  font-size: 13px;
  color: var(--mf-text-dim);
  line-height: 1.6;
}

.science-badge {
  display: inline-block;
  background: rgba(232, 93, 117, 0.1);
  color: var(--mf-coral);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* =====================================================
   SCREEN: Question
   ===================================================== */
.question-container {
  text-align: center;
  max-width: 480px;
}

/* Progress bar */
.progress-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: rgba(232, 93, 117, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mf-coral), var(--mf-pink));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mf-text-dim);
  min-width: 32px;
}

/* Question text */
.question-number {
  font-size: 15px;
  font-weight: 600;
  color: var(--mf-coral);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.question-text {
  font-family: var(--mf-font);
  font-size: 26px;
  font-weight: 700;
  color: var(--mf-text);
  margin-bottom: 8px;
  line-height: 1.5;
}

.question-subtitle {
  font-size: 16px;
  color: var(--mf-text-dim);
  margin-bottom: 24px;
}

/* Choices */
.choices-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.65);
  border: 2px solid rgba(232, 93, 117, 0.1);
  border-radius: 16px;
  font-family: var(--mf-font);
  font-size: 18px;
  font-weight: 500;
  color: var(--mf-text);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  backdrop-filter: blur(10px);
  animation: mf-fadeUp 0.4s ease forwards;
  opacity: 0;
}

.choice-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(232, 93, 117, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(232, 93, 117, 0.1);
}

.choice-btn:active {
  transform: translateY(0);
}

.choice-btn.selected {
  background: linear-gradient(135deg, rgba(232, 93, 117, 0.15), rgba(244, 114, 182, 0.15));
  border-color: var(--mf-coral);
  transform: scale(0.97);
}

.choice-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.choice-btn.disabled.selected {
  opacity: 1;
}

.choice-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.choice-label {
  flex: 1;
}

/* =====================================================
   SCREEN: Analyzing
   ===================================================== */
.analyzing-container {
  text-align: center;
  max-width: 320px;
}

.analyzing-heart {
  font-size: 120px;
  line-height: 1;
  margin-bottom: 24px;
  animation: mf-heartbeat 1.5s ease-in-out infinite;
}

.analyzing-percent {
  font-family: var(--mf-font);
  font-size: 40px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--mf-coral), var(--mf-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.analyzing-text {
  font-size: 16px;
  color: var(--mf-text-secondary);
  animation: mf-pulse 2s ease-in-out infinite;
}

/* =====================================================
   SCREEN: Result
   ===================================================== */
.result-container {
  text-align: center;
  max-width: 500px;
}

.result-header {
  font-size: 17px;
  font-weight: 600;
  color: var(--mf-coral);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

/* Animal emoji in result */
.result-animal {
  margin-bottom: 12px;
}

.animal-emoji {
  font-size: 120px;
  display: inline-block;
  animation: mf-bounce-in 0.8s ease forwards, mf-wiggle 4s ease-in-out 0.8s infinite;
}

.type-name {
  font-family: var(--mf-font);
  font-size: 40px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--mf-coral), var(--mf-purple), var(--mf-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.type-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--mf-text);
  margin-bottom: 2px;
}

.type-title-en {
  font-size: 15px;
  font-weight: 400;
  color: var(--mf-text-dim);
  margin-bottom: 16px;
}

.type-desc {
  font-size: 17px;
  color: var(--mf-text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 0 10px;
}

/* Dimension bars */
.result-dimensions {
  text-align: left;
  margin-bottom: 20px;
}

.dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dim-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--mf-text);
  min-width: 120px;
}

.dim-bar-track {
  flex: 1;
  height: 12px;
  background: rgba(232, 93, 117, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.dim-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease-out;
}

.dim-bar-anxiety {
  background: linear-gradient(90deg, #F9A8D4, #F472B6);
}

.dim-bar-avoidance {
  background: linear-gradient(90deg, #C4B5FD, #8B5CF6);
}

.dim-value {
  font-family: var(--mf-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--mf-text);
  min-width: 40px;
  text-align: right;
}

/* Strengths */
.result-strengths {
  margin-bottom: 20px;
}

.strengths-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--mf-text-secondary);
  margin-bottom: 10px;
}

.strengths-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.strength-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(232, 93, 117, 0.15);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mf-text);
  backdrop-filter: blur(10px);
}

/* Tip box */
.result-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(232, 93, 117, 0.12);
  border-radius: 16px;
  text-align: left;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.tip-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-text {
  font-size: 16px;
  color: var(--mf-text);
  line-height: 1.7;
}

/* Card preview */
.card-preview {
  display: none;
  margin-bottom: 16px;
}

.card-preview img {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   Social Sharing
   ===================================================== */
.social-share {
  margin-bottom: 20px;
}

.social-share-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--mf-text-dim);
  margin-bottom: 12px;
}

.social-share-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s ease;
}

.social-btn:hover {
  transform: translateY(-3px);
}

.social-btn:active {
  transform: translateY(0);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  transition: box-shadow 0.2s ease;
}

.social-btn:hover .social-icon {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.social-label {
  font-family: var(--mf-font);
  font-size: 11px;
  font-weight: 500;
  color: var(--mf-text-dim);
}

/* Brand colors */
.social-btn-facebook .social-icon { background: #1877F2; }
.social-btn-x .social-icon { background: #000; }
.social-btn-line .social-icon { background: #06C755; }
.social-btn-threads .social-icon { background: #000; }
.social-btn-whatsapp .social-icon { background: #25D366; }
.social-btn-telegram .social-icon { background: #26A5E4; }
.social-btn-copy .social-icon { background: rgba(100, 60, 80, 0.5); }
.social-btn-copy.copied .social-icon { background: #22c55e; }
.social-btn-copy.copied .social-label { color: #22c55e; }

/* =====================================================
   Buttons (theme overrides)
   ===================================================== */
.btn-primary {
  font-family: var(--mf-font);
  background: linear-gradient(135deg, var(--mf-coral), var(--mf-pink));
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(232, 93, 117, 0.25);
}

.btn-secondary {
  font-family: var(--mf-font);
}

/* =====================================================
   Cross-promo
   ===================================================== */
.cross-promo {
  margin-top: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  border: 1px solid rgba(232, 93, 117, 0.1);
}

.cross-promo-text {
  font-size: 13px;
  color: var(--mf-text-dim);
  margin-bottom: 8px;
}

.cross-promo-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--mf-coral);
  text-decoration: none;
  transition: color 0.3s ease;
}

.cross-promo-link:hover {
  color: var(--mf-purple);
}

/* =====================================================
   Responsive — Mobile first
   ===================================================== */

/* Small phones (< 360px) */
@media (max-width: 360px) {
  .landing-title { font-size: 32px; }
  .landing-emoji { font-size: 60px; }
  .landing-type-emoji { width: 56px; height: 56px; font-size: 36px; }
  .landing-types { gap: 10px; }
  .landing-features { gap: 6px; }
  .feature-pill { padding: 6px 10px; font-size: 12px; }
  .question-text { font-size: 20px; }
  .choice-btn { padding: 12px 14px; font-size: 15px; }
  .choice-emoji { font-size: 24px; }
  .animal-emoji { font-size: 80px; }
  .type-name { font-size: 28px; }
  .dim-label { min-width: 100px; font-size: 14px; }
}

/* Standard phones (360-480px) */
@media (min-width: 361px) and (max-width: 480px) {
  .landing-title { font-size: 38px; }
  .landing-emoji { font-size: 70px; }
  .landing-type-emoji { width: 64px; height: 64px; font-size: 42px; }
  .animal-emoji { font-size: 100px; }
  .type-name { font-size: 36px; }
}

/* Tablets (481-768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .landing-type-emoji { width: 80px; height: 80px; font-size: 52px; }
  .landing-types { gap: 20px; }
  .choice-btn { padding: 18px 24px; font-size: 18px; }
  .animal-emoji { font-size: 130px; }
}

/* Large tablets & desktop (769px+) */
@media (min-width: 769px) {
  .landing-container,
  .question-container,
  .result-container {
    max-width: 560px;
  }
  .landing-title { font-size: 48px; }
  .landing-emoji { font-size: 100px; }
  .landing-type-emoji { width: 88px; height: 88px; font-size: 56px; }
  .landing-types { gap: 24px; }
  .animal-emoji { font-size: 140px; }
  .type-name { font-size: 44px; }
  .choice-btn { padding: 20px 28px; font-size: 19px; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .landing-emoji { font-size: 48px; margin-bottom: 8px; }
  .landing-title { font-size: 28px; }
  .landing-desc { display: none; }
  .landing-types { margin-bottom: 12px; }
  .landing-type-emoji { width: 48px; height: 48px; font-size: 32px; }
  .landing-science { display: none; }
  .analyzing-heart { font-size: 80px; }
  .analyzing-percent { font-size: 32px; }
  .animal-emoji { font-size: 80px; }
}
