/**
 * Bleu Cafe 預約系統 - 前台樣式
 * 品牌色系 + Apple 設計美學
 */

/* Google Fonts - Modern Professional 配對 */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ========== 全域樣式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 品牌色系 - 僅使用三色 */
  --primary-color: #003E52;      /* 深藍綠 - 主色 */
  --secondary-color: #83968B;    /* 灰綠 - 輔色 */
  --accent-color: #EE7836;       /* 橘色 - 強調色 */
  
  /* 中性色 */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  
  /* 圓角 - 現代化設計 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-btn: 16px;
  --radius-cta: 50px;
  --radius-full: 9999px;
  
  /* 陰影 - 統一使用柔和陰影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
  
  /* Swiss Modernism 2.0 - 間距系統 */
  --grid-gap: 1rem;
  --section-spacing: 4rem;
  
  /* Swiss Modernism 2.0 - 更精緻的陰影層次（使用品牌主色調） */
  --shadow-subtle: 0 1px 3px rgba(0, 62, 82, 0.04);
  --shadow-card: 0 4px 16px rgba(0, 62, 82, 0.06);
  --shadow-elevated: 0 8px 32px rgba(0, 62, 82, 0.10);
  --shadow-float: 0 16px 48px rgba(0, 62, 82, 0.14);
  
  /* 過渡 */
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.2s ease-out;
  --transition-slow: 0.3s ease-out;
  
  /* 間距 */
  --spacing-section: 32px;
  --spacing-card: 24px;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  padding-bottom: 120px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== 容器 ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-card);
}

/* ========== Banner ========== */
.banner-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.banner-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

/* ========== 標題 ========== */
.header {
  text-align: center;
  padding: 60px 20px 40px;
  min-height: 80px; /* 預留最小高度，避免版面跳動 */
}

.header .logo {
  max-width: 200px;
  width: 120px;  /* 預留固定尺寸，避免版面跳動 */
  height: 60px;
  margin: 0 auto 20px;
  display: block;
  border-radius: var(--radius-md);
  object-fit: contain;
  
  /* 初始隱藏，載入後淡入 */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.header .logo.loaded {
  opacity: 1;
}

.header h1 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 32px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0;
  letter-spacing: -1px;
}

/* ========== 人數選擇器（卡片式 +/- 按鈕）========== */
.people-selector-section {
  margin: 40px 0;
}

.people-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.people-selector-card {
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 8px 8px 16px rgba(0, 62, 82, 0.1), -8px -8px 16px rgba(255, 255, 255, 0.9);
  text-align: center;
  transition: all var(--transition-base);
}

.people-selector-card:hover {
  transform: translateY(-4px);
  box-shadow: 12px 12px 24px rgba(0, 62, 82, 0.15), -12px -12px 24px rgba(255, 255, 255, 1);
}

.people-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.people-icon {
  font-size: 20px;
  color: var(--primary-color);
}

.people-count {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 40px;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.people-count.bounce {
  animation: bounceAnimation 0.4s ease;
}

@keyframes bounceAnimation {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.3);
  }
  50% {
    transform: scale(0.9);
  }
  75% {
    transform: scale(1.1);
  }
}

.people-label {
  font-size: 14px;
  color: var(--secondary-color);
  font-weight: 500;
}

.people-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.people-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  box-shadow: 4px 4px 8px rgba(0, 62, 82, 0.15), -4px -4px 8px rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  user-select: none;
}

.people-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  transform: scale(1.15);
  box-shadow: 6px 6px 12px rgba(0, 62, 82, 0.2), -6px -6px 12px rgba(255, 255, 255, 0.95);
}

.people-btn:active:not(:disabled) {
  transform: scale(1.05);
  box-shadow: inset 2px 2px 4px rgba(0, 62, 82, 0.2), inset -2px -2px 4px rgba(255, 255, 255, 0.9);
}

.people-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* ========== 日期選擇區 ========== */
.date-selector-section {
  margin: 40px 0;
}

/* 手機版：下拉選單 */
.date-select-dropdown {
  display: block;
}

.date-select-calendar {
  display: none;
}

/* 平板/電腦版：迷你月曆 */
@media (min-width: 768px) {
  .date-select-dropdown {
    display: none;
  }
  
  .date-select-calendar {
    display: block;
  }
}

.mini-calendar {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  max-width: 500px;
  margin: 0 auto;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-month {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
}

.calendar-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--primary-color);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.calendar-nav-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.1);
}

.calendar-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.calendar-weekday {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary-color);
  padding: 6px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--white);
  color: var(--gray-800);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  position: relative;
}

.calendar-day:hover:not(.disabled):not(.empty):not(.other-month) {
  border-color: var(--primary-color);
  background: rgba(0, 62, 82, 0.1);
  transform: scale(1.1);
}

.calendar-day.selected {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c4a 100%);
  color: var(--white);
  border-color: var(--accent-color);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(238, 120, 54, 0.3);
}

.calendar-day.has-reservation::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
}

.calendar-day.selected.has-reservation::after {
  background: var(--white);
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: var(--gray-100);
}

.calendar-day.empty,
.calendar-day.other-month {
  opacity: 0;
  cursor: default;
  pointer-events: none;
}

.calendar-day.today {
  font-weight: 700;
  position: relative;
  box-shadow: 0 0 0 2px var(--primary-color) inset;
}

.calendar-day.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-color);
}

.calendar-day.today.selected {
  box-shadow: 0 4px 12px rgba(238, 120, 54, 0.3);
}

.calendar-day.today.selected::after {
  background: var(--white);
}

/* ========== 頂部選擇區（舊版，保留用於下拉選單）========== */
.selection-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 40px 0;
  padding: var(--spacing-section);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.selector-group {
  display: flex;
  flex-direction: column;
}

.selector-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--secondary-color);
  margin-bottom: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.selector-label .material-symbols-outlined {
  font-size: 18px;
}

.selector-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  color: var(--gray-800);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.selector-input:hover {
  border-color: var(--primary-color);
}

.selector-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 62, 82, 0.1);
}

/* ========== 區段標題 ========== */
.section-title {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 500;
  color: var(--primary-color);
  margin: 60px 0 20px;
  letter-spacing: -0.5px;
}

.section-title .material-symbols-outlined {
  font-size: 28px;
}

/* ========== 時段選擇區 ========== */
.time-slots-section {
  margin: 40px 0;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.time-slot-btn {
  padding: 18px 14px;
  background: linear-gradient(145deg, #ffffff, #f8f8f8);
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 16px;
  color: var(--gray-800);
  cursor: pointer;
  transition: all var(--transition-base);
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  box-shadow: 4px 4px 12px rgba(0, 62, 82, 0.08), -2px -2px 8px rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

.time-slot-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.time-slot-btn:hover:not(.disabled) {
  border-color: var(--primary-color);
  background: linear-gradient(145deg, rgba(0, 62, 82, 0.05), rgba(0, 62, 82, 0.08));
  transform: translateY(-3px) scale(1.03);
  box-shadow: 6px 6px 20px rgba(0, 62, 82, 0.15), -4px -4px 12px rgba(255, 255, 255, 1);
}

.time-slot-btn:hover:not(.disabled)::before {
  left: 100%;
}

.time-slot-btn.active {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c4a 100%);
  color: var(--white);
  border-color: var(--accent-color);
  box-shadow: 0 8px 24px rgba(238, 120, 54, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* 確保選中時在 hover 狀態下也保持正確顏色 */
.time-slot-btn.active:hover {
  background: linear-gradient(135deg, #ff8c4a 0%, var(--accent-color) 100%);
  color: var(--white);
  border-color: var(--accent-color);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(238, 120, 54, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 未選中時確保有良好對比 */
.time-slot-btn:not(.active):not(.disabled) {
  background-color: var(--white);
  color: var(--gray-800);
}

.time-slot-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-600);
  pointer-events: none;
}

.time-slot-btn.disabled:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.info-text {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--secondary-color);
  padding: 60px 20px;
  font-size: 15px;
}

/* ========== 休假訊息 ========== */
.holiday-message {
  padding: 16px 20px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-md);
  color: #856404;
  font-size: 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========== 提示訊息框 ========== */
.info-box {
  margin: 40px 0;
  padding: 24px;
  background: var(--gray-50);
  border-radius: 12px;
  text-align: center;
}

.info-box p {
  margin: 8px 0;
  color: var(--gray-600);
  font-size: 15px;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-base);
}

.phone-link:hover {
  color: var(--secondary-color);
}

.phone-link .material-symbols-outlined {
  font-size: 18px;
}

.ig-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-base);
}

.ig-link:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

/* ========== 餐廳資訊區 ========== */
.restaurant-section {
  margin: 60px 0;
}

.restaurant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-section);
  margin-top: var(--spacing-card);
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.restaurant-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-card);
}

.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.info-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.info-icon {
  font-size: 24px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.info-content {
  flex: 1;
}

.info-label {
  font-size: 12px;
  color: var(--secondary-color);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.info-value {
  font-size: 15px;
  color: var(--gray-800);
  font-weight: 500;
  line-height: 1.6;
}

.info-value a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-base);
}

.info-value a:hover {
  color: var(--secondary-color);
}

/* 營業時間特殊樣式 */
.business-hours {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.business-hour-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.business-hour-days {
  font-weight: 500;
  color: var(--gray-800);
  font-size: 14px;
}

.business-hour-time {
  color: var(--secondary-color);
  font-size: 14px;
}

.business-hour-special {
  margin-top: 4px;
  font-size: 13px;
  color: var(--secondary-color);
}

/* 撥打按鈕 */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 8px;
}

.action-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.action-btn .material-symbols-outlined {
  font-size: 16px;
}

/* ========== 底部固定欄 ========== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  border-top: 1px solid rgba(0, 62, 82, 0.1);
  box-shadow: 0 -8px 32px rgba(0, 62, 82, 0.12);
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding-bottom: var(--safe-area-bottom);
}

/* 效能優化：對於偏好減少動畫的裝置，移除毛玻璃效果 */
@media (prefers-reduced-motion: reduce) {
  .bottom-bar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.98);
  }
}

.bottom-bar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.selection-summary {
  flex: 1;
  font-size: 15px;
  color: var(--gray-800);
  font-weight: 600;
  line-height: 1.5;
}

.complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c4a 100%);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 8px 24px rgba(238, 120, 54, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.complete-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.complete-btn:hover:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

.complete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff8c4a 0%, var(--accent-color) 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(238, 120, 54, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.complete-btn:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(238, 120, 54, 0.4);
}

.complete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.complete-btn .material-symbols-outlined {
  font-size: 20px;
}

/* ========== Modal 樣式 ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn var(--transition-base);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 62, 82, 0.75);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 62, 82, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: modalSlideUp 0.3s ease-out;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--primary-color);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  border-radius: 6px;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.modal-close .material-symbols-outlined {
  font-size: 24px;
}

.booking-form {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label .material-symbols-outlined {
  font-size: 18px;
  color: var(--secondary-color);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: all var(--transition-base);
  font-family: inherit;
  color: var(--gray-800);
  background: rgba(245, 245, 245, 0.8);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(0, 62, 82, 0.1), 0 4px 12px rgba(0, 62, 82, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.modal-body {
  padding: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.btn-primary .material-symbols-outlined {
  font-size: 20px;
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-800);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-secondary .material-symbols-outlined {
  font-size: 20px;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

.btn-danger {
  background: #ef4444;
  color: var(--white);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-text {
  background: transparent;
  color: var(--gray-600);
  text-decoration: none;
  border: none;
  padding: 10px 16px;
}

.btn-text:hover {
  color: var(--primary-color);
  background: var(--gray-50);
}

/* ========== 按鈕底線修復 ========== */
.btn, 
a.btn,
.btn a {
  text-decoration: none !important;
}

.btn .material-symbols-outlined {
  text-decoration: none !important;
}

/* ========== 成功動畫 ========== */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: #10b981;
  stroke-miterlimit: 10;
  box-shadow: inset 0 0 0 #10b981;
  animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
  position: relative;
}

.success-checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: #10b981;
  fill: #f0fdf4;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fill {
  100% {
    box-shadow: inset 0 0 0 60px #f0fdf4;
  }
}

/* ========== 預約摘要卡片 ========== */
.booking-summary {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-left: 3px solid var(--primary-color);
}

.booking-summary-title {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.booking-summary-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booking-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-800);
}

.booking-summary-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary-color);
}

/* ========== 載入遮罩（漸出） ========== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading.hidden {
  opacity: 0;
  visibility: hidden;
}

/* 載入遮罩上的微妙動畫提示 */
.loading::after {
  content: '';
  position: absolute;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--primary-color), 
    transparent
  );
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.3; width: 40px; }
  50% { opacity: 1; width: 80px; }
}

/* ========== 頁面內容漸入 ========== */
.page-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.page-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 各區塊依序漸入（交錯動畫） */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-section:nth-child(1) { transition-delay: 0.1s; }
.fade-in-section:nth-child(2) { transition-delay: 0.2s; }
.fade-in-section:nth-child(3) { transition-delay: 0.3s; }
.fade-in-section:nth-child(4) { transition-delay: 0.4s; }
.fade-in-section:nth-child(5) { transition-delay: 0.5s; }

/* ========== Toast 通知 ========== */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--gray-800);
  color: var(--white);
  padding: 18px 32px;
  border-radius: var(--radius-full);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 10000;
  opacity: 0;
  transition: all var(--transition-base);
  max-width: 90%;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ========== 微互動動畫 ========== */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

/* ========== 響應式設計 - 手機版 ========== */
@media (max-width: 768px) {
  body {
    padding-bottom: 160px;
  }
  
  .container {
    padding: 16px;
  }
  
  .header {
    padding: 32px 16px 24px;
  }
  
  .header .logo {
    max-width: 160px;
    width: 100%;
    height: auto;
    margin: 0 auto 16px;
  }
  
  .header h1 {
    font-size: 28px;
  }
  
  /* 🚨 人數選擇器 - 垂直堆疊，禁止橫向滑動 */
  .people-selector-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow-x: visible;
  }
  
  .people-selector-card {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
  }
  
  /* 選擇區垂直排列 */
  .selection-bar {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    margin: 20px 0;
  }
  
  .selector-input {
    padding: 14px;
    font-size: 16px;
  }
  
  /* 時段網格調整為 3 欄 */
  .time-slots-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .time-slot-btn {
    padding: 14px 10px;
    font-size: 15px;
    min-height: 52px;
  }
  
  .section-title {
    font-size: 20px;
    margin: 40px 0 16px;
  }
  
  /* 餐廳資訊垂直排列 */
  .restaurant-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .map-container {
    height: 300px;
  }
  
  /* 底部欄改為垂直排列 */
  .bottom-bar-content {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }
  
  .selection-summary {
    text-align: center;
    font-size: 14px;
  }
  
  .complete-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 28px;
    font-size: 16px;
  }
  
  /* Modal 全螢幕 */
  .modal {
    padding: 0;
    align-items: flex-end;
  }
  
  .modal-content {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }
  
  .modal-header,
  .booking-form {
    padding: 20px 18px;
  }
  
  .form-input,
  .form-textarea {
    font-size: 16px;
    padding: 14px;
  }
  
  .btn {
    padding: 16px 20px;
    font-size: 16px;
  }
  
  /* 月曆在手機版調整大小 */
  .mini-calendar {
    padding: 16px;
  }
  
  .calendar-day {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 24px;
  }
  
  .time-slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .time-slot-btn {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .section-title {
    font-size: 18px;
  }
}

/* ========== 觸控優化 ========== */
@media (hover: none) {
  .time-slot-btn,
  .complete-btn,
  .btn {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* 確保觸控目標至少 44x44px */
  .selector-input,
  .time-slot-btn,
  .complete-btn,
  .btn,
  .modal-close {
    min-height: 44px;
  }
}

/* ========== 平板優化 ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .time-slots-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .selection-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}
