/* -------------------------------------------------------------
 * 2027 越後湯澤滑雪 & 東京自由行 - 客製化行動端優先樣式
 * ------------------------------------------------------------- */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --snow-bg: #f8fafc;
  --accent-ice: #0284c7;
  --accent-gold: #f59e0b;
  --accent-sakura: #ec4899;
  --text-main: #0f172a;
  --text-sub: #475569;
  --border-light: #e2e8f0;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  background-color: var(--snow-bg);
  color: var(--text-main);
  padding-bottom: calc(75px + var(--safe-bottom));
  overflow-x: hidden;
}

/* 隱藏原生滾動條但保持可滾動 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 底部導航欄 */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding-bottom: var(--safe-bottom);
  z-index: 40;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.bottom-nav-bar.hidden {
  display: none !important;
}

.nav-item {
  transition: all 0.2s ease;
  color: #64748b;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 600;
  transform: translateY(-2px);
}

.nav-item.active svg {
  stroke-width: 2.2px;
}

#auth-overlay.hidden {
  display: none !important;
}

/* 天數橫向滾動選擇器 */
.day-pill {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.day-pill.active {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* 時間軸線條 */
.timeline-stem {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, #93c5fd, #bfdbfe, #e2e8f0);
}

/* 卡片與毛玻璃 */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}

.glass-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* 條碼全螢幕視窗 */
.barcode-modal {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
}

/* 打勾清單動畫 */
.checklist-checkbox:checked + div {
  text-decoration: line-through;
  opacity: 0.6;
}

/* 觸控按鈕微反饋 */
button:active, .touch-feedback:active {
  transform: scale(0.97);
  opacity: 0.88;
}

/* 圖片漸層遮罩 */
.img-overlay-bottom {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

/* 編輯模式樣式開關 (iOS 風格 Toggle) */
.toggle-checkbox:checked {
  right: 0;
  border-color: #2563eb;
}
.toggle-checkbox:checked + .toggle-label {
  background-color: #2563eb;
}

/* 編輯模式下的卡片外框微亮強調 */
body.edit-mode-active .glass-card {
  border-color: rgba(147, 197, 253, 0.7);
}

/* 浮動雲端同步 Toast 通知 */
#cloud-toast {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 寬螢幕桌面版 (Sidebar 左側導航欄) */
@media (min-width: 1024px) {
  body {
    padding-bottom: 30px;
  }

  .bottom-nav-bar {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 230px;
    height: 100vh;
    border-top: none;
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.04);
    z-index: 45;
    background: rgba(255, 255, 255, 0.97);
  }

  .nav-item {
    padding: 10px 14px;
    border-radius: 12px;
    width: 100%;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-item:hover {
    background-color: rgba(241, 245, 249, 0.9);
    color: #0f172a;
    transform: translateX(3px);
  }

  .nav-item.active {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transform: translateX(4px);
  }

  .nav-item.active svg {
    stroke: #ffffff;
    stroke-width: 2.2px;
  }

  .nav-item.active span {
    color: #ffffff;
    font-weight: 700;
  }

  /* 桌機版內容靠右偏移，留出側邊欄寬度 */
  header.glass-header {
    margin-left: 230px;
    width: calc(100% - 230px);
  }

  main.desktop-content-offset {
    margin-left: 230px;
    margin-top: 0;
    width: calc(100% - 230px);
    max-width: none;
  }

  main.desktop-content-offset > .tab-content-panel {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
  }
}
