/* ===== 全域設定 ===== */
body {
  margin: 0;
  background-color: #0654AE;
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

/* ===== 頂部固定橫幅 ===== */
.floating-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  background-color: #0654AE;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.floating-banner.visible {
  transform: translateY(0);
}

/* ===== 黏性搜尋列（已停用） ===== */
.sticky-search {
  display: none; /* 🔧 完全隱藏黏性搜尋 */
}

.sticky-search-inner {
  width: 100%;
  max-width: 430px;
}

.sticky-search .search-container {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

@media (max-width: 767px) {
  .sticky-search-inner {
    max-width: none;
  }
}

.floating-banner img {
  width: 100%;
  display: block;
}

/* 手機版：滿版 */
@media (max-width: 767px) {
  .floating-banner img {
    max-width: none;
    width: 100%;
  }
}

/* 桌面版：固定 430px */
@media (min-width: 768px) {
  .floating-banner img {
    max-width: 430px;
  }
}

* {
  box-sizing: border-box;
}

/* ===== 主要內容容器 ===== */
.main-content {
  width: 100%;
  overflow-x: hidden; /* 🔒 防止內容超出螢幕寬度 */
}

/* ===== 所有屏的外層容器（橫向置中） ===== */
.hero,
.second-screen,
.salary-screen,
.cake-screen {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ===== 第一屏左右兩側深藍色 ===== */
.hero {
  background-color: #0654AE;
}

/* ===== 第二屏 ===== */
.second-screen {
  overflow-x: hidden;
  background: #0654AE;
}

/* ===== 第二屏 hero-content ===== */
.second-screen .hero-content {
  padding-bottom: 0px;
  background: transparent;
}

/* ===== 內容容器 ===== */
.hero-content {
  position: relative;
  width: 100%;
  max-width: none; /* 手機版不限制寬度 */
  overflow: visible;
}

/* ===== Cake Screen 的內容容器特別處理 ===== */
.cake-screen .hero-content {
  overflow: hidden;
}

/* ===== 背景圖片 ===== */
.hero-bg {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
}

/* ===== 浮動內容層 ===== */
.overlay-content {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  padding: 0 16px;
  box-sizing: border-box;
}

/* ===== 桌面版：限制寬度 430px ===== */
@media (min-width: 768px) {
  .hero-content {
    max-width: 430px;
  }
}

/* ========================================
   第二屏：搜尋介面
======================================== */

/* ===== 薪資排序切換器 ===== */
.sort-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 16px 12px;
  background: #F9F9F9;
}

.sort-label {
  font-size: 15px;
  color: #6B7280;
  font-weight: 500;
}

.sort-buttons {
  display: flex;
  gap: 8px;
}

.sort-btn {
  padding: 6px 16px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.sort-btn:hover {
  border-color: #D1D5DB;
  background: #F9FAFB;
}

.sort-btn.active {
  background: #4D4D4D;
  color: white;
  border-color: #4D4D4D;
}

/* ===== 搜尋容器 ===== */
.search-container {
  background: #F1F7FF;
  padding: 20px 16px;
}

/* ===== 下拉選單 ===== */
.dropdown-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  font-size: 16px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-btn:hover {
  border-color: #3B82F6;
}

.dropdown-icon {
  transition: transform 0.2s;
  color: #9CA3AF;
  width: 20px;
  height: 20px;
}

.dropdown-btn.active .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  animation: fadeIn 0.2s;
}

.dropdown-menu.show {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 15px;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item:hover {
  background: #F9FAFB;
}

.dropdown-item.active {
  color: #3B82F6;
  font-weight: 500;
}

.dropdown-item.active::after {
  content: '✓';
  font-size: 18px;
}

/* ===== 搜尋框 ===== */
.search-box {
  position: relative;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  font-size: 16px;
  color: #374151;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
  color: #9CA3AF;
}

/* ===== 熱門搜尋詞 ===== */
.hot-keywords {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;  /* 🔄 移除 gap，讓按鈕緊密排列 */
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.8;  /* 增加行高，讓換行時更好看 */
}

.hot-keywords-label {
  white-space: nowrap;  /* "熱門搜尋詞："不換行 */
  flex-shrink: 0;  /* 標籤不縮小 */
  margin-right: 0;  /* 🔄 移除右邊距 */
}

.keywords-list {
  display: inline;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.keyword-btn {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  transition: color 0.2s;
  display: inline;
  white-space: normal;
}

.keyword-btn:hover {
  color: #3B82F6;
}

/* ===== 職缺列表 ===== */
.jobs-container {
  padding: 0 16px;
  background: white;
}

.job-item {
  padding: 20px 0;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.2s;
}

.job-item:hover {
  background: #F9FAFB;
  margin: 0 -16px;
  padding: 20px 16px;
}

.job-item:last-child {
  border-bottom: none;
}

/* ===== 模糊遮罩樣式 ===== */
.job-item.job-blurred {
  position: relative;
  pointer-events: none; /* 🔒 禁止點擊 */
}

.job-item.job-blurred::before {
  content: '';
  position: absolute;
  top: 0;
  /* 🔧 貼齊螢幕寬度 */
  left: -16px;   /* 抵消 jobs-container 的 padding */
  right: -16px;  /* 抵消 jobs-container 的 padding */
  bottom: 0;
  backdrop-filter: blur(8px); /* 🔒 模糊效果 */
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.3); /* 🔒 半透明白色遮罩 */
  z-index: 1;
}

/* 模糊的職缺內容 */
.job-item.job-blurred * {
  filter: blur(4px); /* 🔒 額外模糊文字 */
  user-select: none; /* 🔒 禁止選取 */
}

/* 桌面版：貼齊 430px 容器邊緣 */
@media (min-width: 768px) {
  .job-item.job-blurred::before {
    left: -16px;
    right: -16px;
  }
}

.job-info {
  flex: 1;
}

.job-title {
  font-size: 17px;
  font-weight: 500;
  color: #1F2937;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.job-subtitle {
  font-size: 14px;
  color: #9CA3AF;
  margin: 0;
}

.job-salary-info {
  text-align: right;
  flex-shrink: 0;
}

.job-salary {
  display: flex;
  align-items: baseline;
  gap: 2px;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.salary-number {
  font-size: 22px;
  font-weight: 500;
}

.salary-number.high {
  color: #EF4444;
}

.salary-number.normal {
  color: #3B82F6;
}

.salary-unit {
  font-size: 18px;
  font-weight: 700;
}

.salary-unit.high {
  color: #EF4444;
}

.salary-unit.normal {
  color: #3B82F6;
}

.salary-period {
  font-size: 16px;
  color: #3B82F6;
  font-weight: 500;
}

.job-meta {
  font-size: 13px;
  color: #9CA3AF;
}

/* ===== 分頁控制項 ===== */
.pagination {
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: white; /* 🔧 加上白色背景 */
}

.pagination-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: #64A1F4;
}

.pagination-btn:hover:not(:disabled) {
  background: #3B82F6;
  transform: scale(1.05);
}

.pagination-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.pagination-btn:disabled {
  background: #E5E7EB;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 24px;
  height: 24px;
  color: white;
}

.pagination-info {
  font-size: 15px;
  color: #6B7280;
  font-weight: 500;
}

.pagination-current {
  color: #374151;
}

.pagination-separator {
  margin: 0 8px;
  color: #D1D5DB;
}

/* ===== 無結果提示 ===== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #9CA3AF;
  background: white;  /* 🔧 加上白色背景 */
}

.no-results p {
  font-size: 16px;
  margin: 0;
}

/* ===== 分隔線（分頁和 salary 之間） ===== */
.divider-line {
  width: 100%;
  height: 1px;
  background: #CACACA;
  margin-top: 0px;
  margin-bottom: 0px;
}

/* ========================================
   salary.png 圖片區塊
======================================== */

.salary-screen {
  display: flex;
  justify-content: center;
  width: 100%;
  background-color: #0654AE; /* 🔧 深藍色背景 */
}

.salary-image-wrapper {
  width: 100%;
  max-width: 100%;
  padding: 0;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.salary-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Salary 按鈕圖片 ===== */
.salary-btn {
  position: absolute;
  /* 📍 調整按鈕位置 */
  bottom: 12%;     /* 🔧 距離底部百分比，數字越小越下面 */
  left: 50%;
  transform: translateX(-50%);
  /* 📏 調整按鈕大小 */
  width: 75%;       /* 🔧 按鈕寬度，數字越大越寬 */
  max-width: 350px; /* 🔧 最大寬度 */
  cursor: pointer;
  transition: transform 0.2s;
}

.salary-btn:hover {
  transform: translateX(-50%) scale(1.05);
}

.salary-btn:active {
  transform: translateX(-50%) scale(0.95);
}

/* ========================================
   第四屏：Cake 輪播區塊
======================================== */


/* ===== Cake Screen 容器 ===== */
.cake-screen {
  overflow: hidden;
  padding-bottom: 0;
  width: 100%;
  max-width: 100%;
  margin-top: 0px;
  margin-bottom: 0;
  background-color: #0654AE; /* 🔧 深藍色背景 */
}

/* ===== Cake Overlay 定位 ===== */
.cake-overlay {
  top: 75%;  /* 🔧 調整這個值來控制上下位置（0% = 最上面，100% = 最下面）*/
  left: 50%;
  transform: translate(-50%, -50%);  /* 🔧 垂直+水平置中 */
  width: 100%;
  max-width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

/* ===== Cake 導流文字連結 ===== */
.cake-cta-link {
  display: block;
  text-align: center;
  color: #1885EA;
  font-size: 14px;  /* 🔧 調整字體大小 */
  font-weight: 500;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cake-cta-link:hover {
  opacity: 0.8;
}

/* ===== Cake 輪播容器（已停用） ===== */
.cake-carousel-wrapper {
  display: none;  /* 不再需要輪播功能 */
}

/* ===== Cake 指示點（已停用） ===== */
.cake-dots {
  display: none;  /* 不再需要圓點指示器 */
}


/* ===== 響應式調整 ===== */
@media (max-width: 380px) {
  .job-title {
    font-size: 16px;
  }

  .salary-number {
    font-size: 20px;
  }

  .salary-unit {
    font-size: 16px;
  }
}

/* ========================================
   底部解鎖橫幅
======================================== */

/* 呼吸動畫 */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* 上下浮動動畫（分享後使用） */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* 固定底部橫幅容器 */
.bottom-unlock-banner {
  position: fixed; /* 🔧 固定在螢幕底部 */
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  background: #0654AE; /* 深藍色背景 */
  z-index: 1000;
  transition: all 0.3s ease;
}

/* 分享後的狀態（保持固定） */
.bottom-unlock-banner.unlocked {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0654AE;
  padding: 0;
}

/* 橫幅內容 */
.unlock-banner-content {
  width: 100%;
  max-width: 430px;  /* 和頁面寬度一致 */
  background: #F1F8FF;
  padding: 20px 20px;  /* 🔧 未解鎖時的內距 */
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  transition: padding 0.3s ease;
}

/* 分享後增加底部留白 */
.bottom-unlock-banner.unlocked .unlock-banner-content {
  padding: 36px 20px 24px 20px;  /* 🔧 按鈕再往下一點點 */
  box-shadow: none;  /* 🔧 移除陰影 */
  justify-content: center;  /* 🔧 垂直置中 */
}

/* 倒數計時資訊列 */
.unlock-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  height: 28px;  /* 🔧 固定高度 */
  transition: opacity 0.3s ease; /* 只淡出，不改變高度 */
}

/* 隱藏倒數時的狀態 */
.unlock-timer-row.hidden {
  opacity: 0;  /* 只改透明度，保持高度和間距 */
  pointer-events: none;  /* 禁止互動 */
}

.unlock-icon {
  font-size: 16px;
}

.unlock-text {
  color: #FF5B5B;
  font-weight: 700;
  font-size: 15px;
}

/* 時間顯示方框 */
.unlock-time-box {
  background: white;
  padding: 4px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #F0F0F0;
  min-width: 90px;
  text-align: center;
}

.unlock-countdown {
  color: #FF5B5B;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

/* 呼吸感主按鈕 */
.unlock-share-btn {
  width: 85%;
  background: #3D8BFF;
  color: white;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(61, 139, 255, 0.3);
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  animation: breathe 1.2s ease-in-out infinite;
  align-self: center; /* 🔧 確保按鈕置中 */
}

.unlock-share-btn:active {
  transform: scale(0.95);
}

/* 桌面版調整 */
@media (min-width: 768px) {
  .unlock-banner-content {
    border-radius: 0;  /* 桌面版不需要圓角 */
  }
}
