:root {
  --primary-color: #1e3a8a;
  --secondary-color: #f59e0b;
  --accent-color: #ec4899;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-light: #f9fafb;
  --border-light: #e5e7eb;
  --morning-color: #ec4899;
  --afternoon-color: #f59e0b;
  --evening-color: #8b5cf6;
}

/* 進度條樣式 */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  z-index: 9999;
  transition: width 0.3s ease;
}

/* 返回頂部按鈕 */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

/* 時間軸組件樣式 */
.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 16px;
  height: 16px;
  background: white;
  border: 3px solid currentColor;
  border-radius: 50%;
  z-index: 1;
}

/* 美食項目樣式 */
.food-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.food-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 字體設定 */
body {
  font-family: 'Noto Sans TC', 'Inter', sans-serif;
}

/* 平滑滾動 */
html {
  scroll-behavior: smooth;
}

/* 響應式圖片 */
img {
  max-width: 100%;
  height: auto;
}

/* 卡片懸停效果 */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 連結樣式 */
a {
  transition: all 0.2s ease;
}

/* 導航選單樣式 */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

/* 載入動畫 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* 新增動畫效果 */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes float-delayed {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes gradient-delayed {
  0%, 100% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 0% 50%;
  }
}

@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes particles {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Animation classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 8s ease-in-out infinite;
}

.animate-float-slow {
  animation: float-slow 10s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 4s ease infinite;
}

.animate-gradient-delayed {
  background-size: 200% 200%;
  animation: gradient-delayed 4s ease infinite;
}

.animate-pulse-soft {
  animation: pulse-soft 3s ease-in-out infinite;
}

.animate-fade-in-up-delayed {
  animation: fadeInUp 1s ease 0.5s both;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }
  
  .timeline-item {
    padding: 1rem;
  }
  
  .food-item {
    margin-bottom: 1rem;
  }
  
  /* Hero section mobile optimizations */
  .floating-element {
    display: none; /* Hide decorative elements on mobile */
  }
  
  .particles-container {
    opacity: 0.3; /* Reduce particle visibility on mobile */
  }
  
  /* Timeline mobile optimizations */
  .timeline-container {
    padding: 0 1rem;
  }
  

  
  /* Touch-friendly interactions */
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improved button sizing for mobile */
  .btn-mobile {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.5rem;
  }
  
  /* Card hover effects disabled on mobile */
  .card-hover:hover {
    transform: none;
    box-shadow: inherit;
  }
  
  /* Improved spacing for mobile */
  .mobile-spacing {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  /* Text sizing for mobile readability */
  .mobile-text-lg {
    font-size: 1.125rem;
    line-height: 1.6;
  }
  
  .mobile-text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  /* Hero section adjustments */
  .hero-section {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  /* Interactive cards mobile layout */
  .hero-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Action buttons mobile layout */
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-actions a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .card-padding {
    padding: 1rem;
  }
  
  /* Timeline mobile adjustments */
  .timeline-item {
    flex-direction: column;
    text-align: center;
  }
  
  .timeline-item .flex-1 {
    width: 100%;
    padding: 0;
    margin-bottom: 1rem;
  }
  
  .timeline-item img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
  }
  

  
  /* Stack timeline items vertically */
  .timeline-vertical {
    display: block;
  }
  
  .timeline-vertical .absolute {
    position: relative;
    margin: 1rem auto;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .hover-scale:hover {
    transform: none;
  }
  
  .hover-shadow:hover {
    box-shadow: inherit;
  }
  
  /* Increase touch targets */
  button, .btn, a {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  /* Improve form inputs for touch */
  input, textarea, select {
    min-height: 44px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    min-height: 60vh;
  }
  
  .timeline-item {
    flex-direction: row;
  }
  
  .mobile-landscape-hide {
    display: none;
  }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image, .timeline-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* 動畫類別 */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 8s ease-in-out infinite;
  animation-delay: 2s;
}

.animate-float-slow {
  animation: float-slow 10s ease-in-out infinite;
  animation-delay: 4s;
}

.animate-gradient {
  background-size: 400% 400%;
  animation: gradient 4s ease infinite;
}

.animate-gradient-delayed {
  background-size: 400% 400%;
  animation: gradient-delayed 4s ease infinite;
  animation-delay: 1s;
}

.animate-pulse-soft {
  animation: pulse-soft 3s ease-in-out infinite;
}

.animate-fade-in-up-delayed {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

/* 粒子效果 */
.particles-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,182,193,0.4), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(173,216,230,0.3), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(255,192,203,0.3), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particles 20s linear infinite;
}

/* 英雄標題特效 */
.hero-title {
  text-shadow: 0 0 30px rgba(255,255,255,0.5);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* 浮動元素 */
.floating-element {
  filter: blur(0.5px);
}

/* 漸變背景 */
.gradient-bg {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* 文字漸變 */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 時段顏色 */
.morning {
  border-color: var(--morning-color);
  color: var(--morning-color);
}

.afternoon {
  border-color: var(--afternoon-color);
  color: var(--afternoon-color);
}

.evening {
  border-color: var(--evening-color);
  color: var(--evening-color);
}

/* 手機版優化 */
@media (max-width: 768px) {
  #back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .timeline-item {
    padding-left: 1rem;
  }
  
  .timeline-item::before {
    left: -6px;
    width: 12px;
    height: 12px;
  }
}