/*
 * LeiMai Tech static website stylesheet
 * A modern dark theme with vibrant accent colours. The design uses fluid
 * layouts and responsive typography to ensure accessibility across
 * devices. Animations are used sparingly to enhance, not distract.
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700&family=Montserrat:wght@400;700&display=swap');

/* CSS custom properties define the colour palette and spacing scale. */
:root {
  --color-background: #050510;
  --color-surface: #0f1126;
  --color-primary: #5a5aff;
  --color-secondary: #00c2ff;
  --color-accent: #7f5cff;
  --color-text: #f5f5fa;
  --color-muted: #9fa5c3;
  --radius: 12px;
  --transition-fast: 0.2s ease;
  --max-width: 1200px;
  --header-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', 'Montserrat', sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-x: hidden;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-primary);
}

header {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
/* container for particles.js canvas */
#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}
.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

/* ==================== Decorative rotating cube for hero section ==================== */
.cube-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  perspective: 1000px;
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}
.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 25s linear infinite;
}
.cube .face {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}
.cube .front  { transform: translateZ(100px); }
.cube .back   { transform: rotateY(180deg) translateZ(100px); }
.cube .right  { transform: rotateY(90deg) translateZ(100px); }
.cube .left   { transform: rotateY(-90deg) translateZ(100px); }
.cube .top    { transform: rotateX(90deg) translateZ(100px); }
.cube .bottom { transform: rotateX(-90deg) translateZ(100px); }
@keyframes rotateCube {
  from {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }
  to {
    transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
  }
}

/* ==================== Decorative rotating rings for crypto hero ==================== */
.ring-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border-style: solid;
  animation: spin infinite linear;
}
.ring.one {
  width: 180px;
  height: 180px;
  border-width: 2px;
  border-color: var(--color-primary);
  animation-duration: 30s;
}
.ring.two {
  width: 140px;
  height: 140px;
  border-width: 2px;
  border-color: var(--color-secondary);
  animation-duration: 45s;
}
.ring.three {
  width: 100px;
  height: 100px;
  border-width: 2px;
  border-color: var(--color-accent);
  animation-duration: 60s;
}
@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 2rem;
  color: var(--color-muted);
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 9999px;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

section {
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-primary);
}

/* Services section */
#services {
  background-color: var(--color-surface);
}
.service-card {
  /* enable 3D space for flipping card */
  perspective: 1000px;
  background-color: transparent;
  border-radius: var(--radius);
  max-width: 350px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
/* Inner wrapper for 3D card flip */
.service-card-inner {
  position: relative;
  width: 100%;
  /* Set a minimum height so the flipping card has space to display; without this the percentage heights collapse */
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card:hover .service-card-inner {
  transform: rotateY(180deg);
}
.service-card-front,
.service-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2rem;
}
.service-card-front {
  background-color: #171d39;
  text-align: left;
}
.service-card-front img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 1rem;
}
.service-card-front h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.service-card-front p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}
.service-card-front a {
  margin-top: auto;
  font-weight: 600;
  color: var(--color-secondary);
  transition: color var(--transition-fast);
}
.service-card-front a:hover {
  color: var(--color-primary);
}
.service-card-back {
  transform: rotateY(180deg);
  background-color: #171d39;
  align-items: flex-start;
  text-align: left;
}
.service-card-back h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}
.service-card-back p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.service-card-back a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
.service-card-back a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

/* Timeline section */
#timeline {
  background-color: var(--color-background);
  position: relative;
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.timeline {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
  margin-bottom: 2rem;
}
.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}
.timeline-item::before {
  content: "";
  position: absolute;
  top: 1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-secondary);
  z-index: 1;
}
.timeline-item:hover {
  background-color: #171d39;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.timeline-item:hover::before {
  transform: scale(1.4);
  transition: transform 0.2s ease;
}
.timeline-item:nth-child(odd)::before {
  right: -10px;
}
.timeline-item:nth-child(even)::before {
  left: -10px;
}
.timeline-item .date {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}
.timeline-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}
.timeline-item p {
  font-size: 0.9rem;
  color: var(--color-muted);
}

footer {
  background-color: #0d0f24;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Responsiveness */
@media (max-width: 768px) {
  .timeline::before {
    left: 8px;
  }
  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 2.5rem;
    text-align: left;
  }
  .timeline-item::before {
    left: 0;
    transform: translateX(-50%);
  }
}

/* Crypto page styles */
.hero-crypto {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  background-size: cover;
  background-position: center;
}
.hero-crypto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5,5,16,0.6);
}
.hero-crypto .content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
  padding: 2rem;
}
.hero-crypto h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  color: var(--color-primary);
}
.hero-crypto p {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}
.problem, .solution, .chart-section, .process-section, .subscribe-section {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem;
}
.problem p, .solution p {
  margin-bottom: 1rem;
  color: var(--color-muted);
  line-height: 1.6;
}
.chart-section canvas {
  width: 100% !important;
  height: 400px !important;
}
/* process flow icons */
.process-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}
.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  width: 160px;
  border-radius: var(--radius);
  background-color: #171d39;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  animation: fadeInUp 0.8s ease both;
}
.process-step i {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}
.process-step h4 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}
.process-step p {
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Process step hover enhancement */
.process-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.3s ease;
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-3px);
}

.subscribe-section {
  background-color: var(--color-surface);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.subscribe-section img {
  width: 150px;
  height: 150px;
  margin: 1rem 0;
}
.subscribe-section .btn {
  margin-top: 1rem;
}

/* Site header and logo placement */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(5, 5, 16, 0.7), rgba(5, 5, 16, 0));
  backdrop-filter: blur(4px);
}
.site-logo {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Generic reveal animation; elements using the reveal class will fade in when visible */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline items inherit reveal effect */
.timeline-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== 懶人宣傳區塊/互動投票動畫 - 僅留最新版 ===================== */
.promo-lazy-user {
  margin: 2.5rem auto 0 auto;
  padding: 2.2rem 1.5rem 2.5rem 1.5rem;
  background: linear-gradient(100deg, #171d39 65%, #23244b 100%);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.30);
  max-width: 640px;
  text-align: left;
  overflow: hidden;
  animation: promoFadeIn 1.2s cubic-bezier(.43,.78,.26,1.19);
  position: relative;
}
@keyframes promoFadeIn {
  from { opacity: 0; transform: translateY(50px);}
  to   { opacity: 1; transform: translateY(0);}
}
.promo-lazy-user h2 {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}
.promo-list {
  list-style: none;
  color: var(--color-text);
  font-size: 1.09rem;
  line-height: 1.8;
  padding-left: 0.6rem;
}
.promo-list li {
  margin-bottom: 0.55rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55em;
  animation: promoItemIn 0.6s both;
}
.promo-list li i {
  color: var(--color-secondary);
  font-size: 1.2em;
  flex-shrink: 0;
  margin-top: 2.5px;
}
.promo-list strong {
  color: var(--color-secondary);
  font-weight: bold;
}
@keyframes promoItemIn {
  from { opacity: 0; transform: translateX(-32px);}
  to   { opacity: 1; transform: translateX(0);}
}
.promo-poll {
  margin-top: 1.7rem;
  background: rgba(18,20,40,0.93);
  padding: 1.1rem 1.3rem 1.3rem 1.1rem;
  border-radius: 10px;
  text-align: center;
  font-size: 1.04rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  animation: promoFadeIn 1.6s cubic-bezier(.43,.78,.26,1.19) 0.2s both;
}
.promo-poll button {
  margin: 0 0.4rem;
  padding: 0.35em 1.1em;
  background: var(--color-primary);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.19s, transform 0.12s;
  outline: none;
  box-shadow: 0 2px 10px #1114;
}
.promo-poll button:hover:not(:disabled) {
  background: var(--color-secondary);
  transform: translateY(-2px) scale(1.06);
}
.promo-poll button:disabled {
  background: #42425a !important;
  color: #bbb !important;
  cursor: not-allowed;
  opacity: 0.8;
}
.promo-poll button.selected {
  background: linear-gradient(90deg, #00c2ff 60%, #5a5aff 100%) !important;
  color: #fff !important;
  border: 2px solid #fff2;
  transform: scale(1.08);
}
#promoPollResult {
  display: block;
  margin-top: 0.7em;
  font-size: 1.09em;
  min-height: 2.5em;
  opacity: 0;
  transition: opacity 0.45s;
  text-align: left;
  line-height: 1.7;
}
#promoPollResult.visible {
  opacity: 1;
  animation: pollFadeIn 0.7s;
}
@keyframes pollFadeIn {
  from { opacity: 0; transform: translateY(20px);}
  to { opacity: 1; transform: translateY(0);}
}
.service-card img {
  width: 100%;
  max-width: 320px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 500px) {
  .badge-success, .badge-coming {
    position: static;
    display: inline-block;
    margin-bottom: 1em;
    margin-left: 0;
    left: auto;
    top: auto;
    transform: none;
  }
  .pricing-card {
    padding-top: 2.3rem;
  }
}
.service-card {
  position: relative;
  background-color: #171d39;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 350px;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.service-card .overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(5, 5, 16, 0.92);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 2;
}
.service-card:hover .overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.service-card .overlay h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.service-card .overlay p {
  color: var(--color-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.service-card .overlay a {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  margin-top: 1rem;
}
.service-card .overlay a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}
.pricing-cards {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 2rem 0;
}
.pricing-card {
    background: linear-gradient(135deg, #171d39 75%, #23244b 100%);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(90,90,255,0.14);
    min-width: 300px;
    max-width: 350px;
    padding: 2.3rem 1.6rem 2rem 1.6rem;
    text-align: center;
    position: relative;
    padding-top: 2.7rem; /* 給浮出徽章空間 */
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 2rem;
}

.badge-success {
    position: absolute;
    top: -18px;
    left: 24px;
    z-index: 10;
    padding: 0.35em 1.2em;
    border-radius: 16px;
    font-size: 1em;
    font-weight: bold;
    background: linear-gradient(90deg,#00c2ff 50%,#5a5aff 100%);
    color: #fff;
    box-shadow: 0 2px 8px #0002;
    letter-spacing: 1px;
}

.badge-coming {
    position: absolute;
    top: -18px;
    left: 24px;
    z-index: 10;
    padding: 0.3em 1em;
    border-radius: 14px;
    font-size: 1em;
    font-weight: 600;
    background: #32344a;
    color: #ccc;
}

.pricing-card:hover:not(.disabled) {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 16px 42px rgba(60,120,255,0.17);
}
.price-row {
    font-size: 1.25em; font-weight: 700;
    margin: 1.5em 0 0.7em 0;
    color: #5a5aff;
}
.price-main { font-size: 1.35em; color: #5a5aff;}
.price-sub { font-size: 0.95em; color: #b8c0ff; margin-left: 2px;}
.price-year { font-size: 1em; color: #00c2ff; margin-left: 8px;}
.price-divider { color: #b8c0ff; margin: 0 7px; }
.features {
    list-style: none; margin: 1.4em 0 1.2em 0; padding: 0;
    color: #f5f5fa; font-size: 1.07em; text-align: left;
}
.features li { margin: 0.7em 0; display: flex; align-items: center; gap: 0.6em;}
.btn-upgrade {
    display: block; margin: 1.5em auto 0 auto; padding: 0.85em 2.7em;
    border-radius: 999px; background: linear-gradient(90deg,#00c2ff 60%,#5a5aff 100%);
    color: #fff; font-weight: 800; font-size: 1.15em;
    box-shadow: 0 6px 20px rgba(0,60,255,0.13); transition: transform 0.18s, box-shadow 0.18s;
    cursor: pointer; border: none;
}
.btn-upgrade:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,110,255,0.23);
}
.btn-disabled {
    background: #36384e;
    color: #aeb0c8;
    cursor: not-allowed;
    opacity: 0.7;
}
.pricing-card.disabled {
    opacity: 0.6;
    filter: grayscale(15%);
    pointer-events: none;
}
.note {
    color: #00e0a0;
    font-size: 0.97em;
    margin-top: 1.1em;
}
@media (max-width: 800px) {
    .pricing-cards { flex-direction: column; align-items: center;}
}
.timeline-item.completed {
  background: linear-gradient(100deg, #161d36 80%, #1e283d 100%);
  border-left: 6px solid #16c784;
}
.timeline-item.developing {
  background: linear-gradient(100deg, #19255a 80%, #1b2444 100%);
  border-left: 6px solid #2986ff;
}
.timeline-item.planning {
  background: linear-gradient(100deg, #23244b 80%, #292941 100%);
  border-left: 6px solid #bbb;
}
.timeline-item {
  margin-bottom: 2.6rem;
  padding: 2.1em 2em 1.2em 2em;
  border-radius: 16px;
  transition: box-shadow 0.18s;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  background: #171d39;
}
.timeline-item .date {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #00c2ff;
  display: inline-block;
}
.timeline-item h3 {
  font-size: 1.18em;
  margin-bottom: 0.3em;
  position: relative;
  padding-left: 2.2em;
}
/* Roadmap timeline icon &動畫&間距優化 */
.timeline-item.completed h3::before {
  content: "✅";
  color: #16c784;
  font-size: 2em;
  margin-right: 0.25em;
  vertical-align: middle;
  display: inline-block;
  opacity: 0;
  transform: scale(0.6);
  animation: tickIn 0.6s cubic-bezier(.43,.78,.26,1.19) forwards;
}
.timeline-item.developing h3::before {
  content: "⏳";
  color: #2986ff;
  font-size: 2em;
  margin-right: 0.22em;
  vertical-align: middle;
  display: inline-block;
  opacity: 1;
  animation: shake 1.2s infinite;
}
.timeline-item.planning h3::before {
  content: "🔲";
  color: #bbb;
  font-size: 2em;
  margin-right: 0.18em;
  vertical-align: middle;
  display: inline-block;
  opacity: 1;
}
@keyframes tickIn {
  0% { opacity: 0; transform: scale(0.6) rotate(-50deg);}
  60% { opacity: 1; transform: scale(1.2) rotate(20deg);}
  100% { opacity: 1; transform: scale(1) rotate(0);}
}
@keyframes shake {
  0%, 100% { transform: scale(1) rotate(0);}
  30% { transform: scale(1.1) rotate(-12deg);}
  50% { transform: scale(0.95) rotate(9deg);}
  70% { transform: scale(1.1) rotate(-9deg);}
}
.timeline-item {
  margin-bottom: 1.5rem; /* 分隔間距縮小 */
  padding: 1.8em 1.2em 1em 1.6em; /* 呼吸感調整 */
  border-radius: 16px;
  background: #171d39;
  box-shadow: 0 4px 18px rgba(0,0,0,0.11);
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.19s, background 0.19s;
}
.timeline-item:hover {
  background: #23244b;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.timeline-item h3 {
  font-size: 1.24em;
  font-weight: 700;
  padding-left: 0.2em;
  color: #fff;
  margin-bottom: 0.3em;
  position: relative;
  display: flex;
  align-items: center;
}
.timeline-item .date {
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #00c2ff;
  display: inline-block;
  font-size: 1em;
}
.timeline-item p {
  color: #b9bedd;
  font-size: 1.03em;
  margin-top: 0.5em;
  line-height: 1.7;
}
.timeline {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
}
@media (max-width: 900px) {
  .timeline-item { width: 100%; left: 0 !important; text-align: left; }
}
@media (max-width: 700px) {
  .timeline-item { margin-bottom: 1.1rem; padding: 1.3em 0.8em 0.9em 1.1em; }
  .timeline-item h3 { font-size: 1.09em; }
  .timeline-item .date { font-size: 0.93em;}
}
/* 勾勾動畫class，可再疊加強制重播 */
.animate-tick::before {
  animation: tickIn 0.6s cubic-bezier(.43,.78,.26,1.19) forwards;
}