/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pink-50: #FFF0F5;
  --pink-100: #FCE4EC;
  --pink-200: #F48FB1;
  --pink-400: #EC407A;
  --pink-600: #D81B60;
  --pink-800: #AD1457;
  --pink-900: #880E4F;
  --text-dark: #6D1B3E;
  --shadow-soft: rgba(216, 27, 96, 0.08);
  --shadow-medium: rgba(216, 27, 96, 0.12);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, var(--pink-50) 0%, var(--pink-100) 30%, #F8E8FF 60%, var(--pink-50) 100%);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--pink-900);
  -webkit-font-smoothing: antialiased;
}

/* ========== Page Container ========== */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ========== Floating Decorations ========== */
.bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  font-size: 28px;
  opacity: 0.2;
  animation: floatUp 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) { top: 8%;  left: 8%;  animation-delay: 0s; }
.floating-icon:nth-child(2) { top: 18%; right: 10%; animation-delay: 1.5s; font-size: 22px; }
.floating-icon:nth-child(3) { top: 38%; left: 4%;  animation-delay: 3s; }
.floating-icon:nth-child(4) { top: 58%; right: 6%;  animation-delay: 2s; font-size: 24px; }
.floating-icon:nth-child(5) { top: 78%; left: 12%;  animation-delay: 4.5s; font-size: 20px; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  25%  { transform: translateY(-12px) rotate(8deg);  opacity: 0.4; }
  50%  { transform: translateY(-24px) rotate(-4deg); opacity: 0.3; }
  75%  { transform: translateY(-12px) rotate(6deg);  opacity: 0.4; }
}

/* ========== Header ========== */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0 28px;
  position: relative;
  z-index: 1;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--pink-600);
  text-shadow: 0 2px 8px rgba(216, 27, 96, 0.15);
  letter-spacing: 2px;
}

.header p {
  font-size: 15px;
  color: var(--pink-800);
  margin-top: 10px;
  opacity: 0.8;
  letter-spacing: 1px;
}

/* ========== Progress Circle ========== */
.progress-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0;
  position: relative;
  z-index: 1;
}

.circle {
  width: 280px;
  height: 280px;
  position: relative;
  border-radius: 50%;
}

/* background ring */
.circle-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 10px solid rgba(216, 27, 96, 0.10);
}

/* right half */
.circle-right-wrap {
  position: absolute;
  width: 50%;
  height: 100%;
  left: 50%;
  top: 0;
  overflow: hidden;
}

.circle-right-clip {
  position: absolute;
  width: 100%;
  height: 100%;
  left: -100%;
  top: 0;
  overflow: hidden;
  transform-origin: 100% 50%;
}

.circle-fill-right {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 50%;
  border: 10px solid transparent;
  border-top-color: var(--pink-600);
  border-right-color: var(--pink-600);
  box-sizing: border-box;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* left half */
.circle-left-wrap {
  position: absolute;
  width: 50%;
  height: 100%;
  left: 0;
  top: 0;
  overflow: hidden;
}

.circle-left-clip {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  overflow: hidden;
  transform-origin: 100% 50%;
}

.circle-fill-left {
  position: absolute;
  width: 100%;
  height: 100%;
  left: -100%;
  top: 0;
  border-radius: 50%;
  border: 10px solid transparent;
  border-top-color: var(--pink-400);
  border-right-color: var(--pink-400);
  box-sizing: border-box;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* center */
.circle-center {
  position: absolute;
  width: 200px;
  height: 200px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #FFF5F7, var(--pink-50));
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow:
    inset 0 0 20px rgba(216, 27, 96, 0.06),
    0 6px 24px var(--shadow-medium);
}

.percentage {
  font-size: 52px;
  font-weight: 800;
  color: var(--pink-600);
  line-height: 1;
}

.percentage .pct-sign {
  font-size: 24px;
  font-weight: 600;
  color: var(--pink-400);
}

.weeks {
  display: flex;
  align-items: baseline;
  margin-top: 8px;
  gap: 2px;
}

.weeks .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--pink-900);
}

.weeks .label {
  font-size: 14px;
  color: var(--pink-800);
  margin-right: 6px;
}

/* ========== Trimester ========== */
.trimester {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 10px;
  position: relative;
  z-index: 1;
}

.trimester .icon {
  font-size: 30px;
}

.trimester .name {
  font-size: 20px;
  font-weight: 600;
  color: var(--pink-800);
  letter-spacing: 1px;
}

/* ========== Journey Bar ========== */
.journey {
  padding: 14px 0 30px;
  position: relative;
  z-index: 1;
}

.journey-bar {
  width: 100%;
  height: 8px;
  background: rgba(216, 27, 96, 0.12);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.journey-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-200), var(--pink-600));
  border-radius: 4px;
  transition: width 0.8s ease;
}

.journey-dot {
  width: 18px;
  height: 18px;
  background: var(--pink-600);
  border: 4px solid var(--pink-50);
  border-radius: 50%;
  position: absolute;
  top: -9px;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(216, 27, 96, 0.35);
  transition: left 0.8s ease;
  z-index: 2;
}

.journey-dot::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  top: -9px;
  left: -9px;
  border-radius: 50%;
  background: rgba(216, 27, 96, 0.12);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.5); opacity: 0.15; }
}

.journey-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.journey-labels span {
  font-size: 12px;
  color: var(--pink-800);
  opacity: 0.5;
}

/* milestones */
.journey-milestones {
  position: relative;
  height: 0;
  top: -4px;
  z-index: 3;
}

.milestone-icon {
  position: absolute;
  font-size: 18px;
  opacity: 0.3;
  filter: grayscale(1);
  transition: all 0.5s ease;
  transform: translateX(-50%);
  cursor: default;
}

.milestone-icon.active {
  opacity: 1;
  filter: grayscale(0);
  animation: milestoneBounce 2s ease-in-out infinite;
}

@keyframes milestoneBounce {
  0%, 100% { transform: translateX(-50%) scale(1.1); }
  50% { transform: translateX(-50%) scale(1.3); }
}

/* ========== Info Cards ========== */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 6px 0;
  position: relative;
  z-index: 1;
}

.card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 2px 12px var(--shadow-soft);
  border: 1px solid rgba(216, 27, 96, 0.06);
}

.card-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-label {
  font-size: 12px;
  color: var(--pink-800);
  opacity: 0.6;
  margin-bottom: 2px;
}

.card-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--pink-900);
  white-space: nowrap;
}

/* ========== Message Bubble ========== */
.message-box {
  padding: 14px 0;
  position: relative;
  z-index: 1;
}

.message-bubble {
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(252,228,236,0.6));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 22px 24px;
  text-align: center;
  box-shadow: 0 2px 14px var(--shadow-soft);
  border: 1px solid rgba(216, 27, 96, 0.08);
  position: relative;
}

.message-bubble::before {
  content: '\201C';
  position: absolute;
  top: -4px;
  left: 14px;
  font-size: 40px;
  color: rgba(216, 27, 96, 0.10);
  font-family: Georgia, serif;
  line-height: 1;
}

.message-bubble::after {
  content: '\201D';
  position: absolute;
  bottom: -24px;
  right: 14px;
  font-size: 40px;
  color: rgba(216, 27, 96, 0.10);
  font-family: Georgia, serif;
  line-height: 1;
}

.message-text {
  font-size: 16px;
  color: var(--text-dark);
  line-height: 1.6;
  letter-spacing: 0.5px;
}

/* ========== Footer ========== */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 12px;
  position: relative;
  z-index: 1;
}

.footer p {
  font-size: 13px;
  color: var(--pink-800);
  opacity: 0.45;
  letter-spacing: 1px;
}

.footer .hearts {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 20px;
}

/* ========== Last Updated ========== */
.update-info {
  text-align: center;
  padding: 8px 0 20px;
  font-size: 11px;
  color: var(--pink-800);
  opacity: 0.35;
  position: relative;
  z-index: 1;
}

/* ========== Responsive ========== */
@media (min-width: 600px) {
  .page {
    padding: 0 32px 60px;
  }
  .circle {
    width: 320px;
    height: 320px;
  }
  .circle-center {
    width: 230px;
    height: 230px;
  }
  .percentage {
    font-size: 60px;
  }
  .header h1 {
    font-size: 32px;
  }
}

/* Dark mode support - keep it light and warm */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(180deg, #2D1B2E 0%, #1A1118 30%, #2D1B2E 60%, #1A1118 100%);
  }
  .card {
    background: rgba(45, 27, 46, 0.8);
    border-color: rgba(216, 27, 96, 0.15);
  }
  .circle-center {
    background: radial-gradient(circle, #2D1B2E, #1A1118);
  }
  .message-bubble {
    background: linear-gradient(135deg, rgba(45, 27, 46, 0.85), rgba(26, 17, 24, 0.6));
  }
  .header h1 { color: #F48FB1; }
  .card-value, .weeks .num, .percentage { color: #F48FB1; }
  .card-label, .weeks .label, .header p,
  .trimester .name, .message-text { color: #E8C4D0; }
  .milestone-icon { opacity: 0.2; }
  .milestone-icon.active { opacity: 0.8; }
}
