:root {
  --bg-color: #fff9eb; /* Lively cream/soft yellow */
  --text-primary: #334155; /* Slate 700 */
  --text-secondary: #64748b; /* Slate 500 */
  --accent-color: #f97316; /* Playful orange */
  --accent-hover: #fb923c;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(249, 115, 22, 0.15);
  --card-hover-bg: rgba(255, 255, 255, 1);
  
  --gradient-start: #fbbf24; /* Warm yellow */
  --gradient-end: #f472b6; /* Soft pink */
}

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

body {
  font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  /* Add a beautiful ambient background gradient */
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.3) 0px, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(244, 114, 182, 0.3) 0px, transparent 50%);
  background-attachment: fixed;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Header Styles */
.header {
  margin-bottom: 3.5rem;
  text-align: center;
  animation: fadeInDown 0.8s ease-out;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.icon-wrapper {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 18px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
  transition: transform 0.3s ease;
}

.icon-wrapper:hover {
  transform: scale(1.05) rotate(5deg);
}

.icon-wrapper svg {
  color: white;
  width: 36px;
  height: 36px;
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--text-primary), #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
}

/* Timeline Styles */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

/* Decorative timeline line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--card-border) 5%, var(--card-border) 95%, transparent);
  z-index: 0;
}

@media (max-width: 600px) {
  .timeline::before {
    display: none;
  }
}

.timeline-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  overflow: hidden;
  animation: fadeInUp 0.5s ease-out backwards;
}

/* Staggered animation delays for items */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.15s; }
.timeline-item:nth-child(3) { animation-delay: 0.2s; }
.timeline-item:nth-child(4) { animation-delay: 0.25s; }
.timeline-item:nth-child(5) { animation-delay: 0.3s; }
.timeline-item:nth-child(6) { animation-delay: 0.35s; }
.timeline-item:nth-child(n+7) { animation-delay: 0.4s; }

.timeline-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-4px) scale(1.01);
  background: var(--card-hover-bg);
  border-color: var(--card-border);
  box-shadow: 0 10px 30px -10px rgba(249, 115, 22, 0.2);
}

.timeline-item:hover::before {
  opacity: 1;
}

.timeline-date {
  color: var(--accent-hover);
  font-family: monospace;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  min-width: 120px;
  flex-shrink: 0;
}

.timeline-content {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1.15rem;
  margin-left: 1rem;
  flex-grow: 1;
  transition: color 0.3s ease;
}

.timeline-item:hover .timeline-content {
  color: var(--accent-hover);
}

.timeline-arrow {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  transform: translateX(0);
}

.timeline-item:hover .timeline-arrow {
  color: var(--accent-hover);
  transform: translateX(6px);
}

/* Footer */
.footer {
  margin-top: 4.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .app-container {
    padding: 1.5rem 1rem;
  }
  
  .header {
    margin-bottom: 2.5rem;
  }
  
  .title {
    font-size: 2rem;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 12px;
  }
  
  .timeline-date {
    font-size: 0.85rem;
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-hover);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    min-width: auto;
  }
  
  .timeline-content {
    margin-left: 0;
    font-size: 1.1rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 1.5rem; /* space for absolute arrow */
  }
  
  .timeline-item .timeline-arrow {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .timeline-item:hover .timeline-arrow {
    transform: translate(4px, -50%);
  }
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
