/* ===== 主菜單樣式 ===== */

/* 容器 */
#menu-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 40px;
  gap: 40px;
}

/* ===== 頂部標題 ===== */
#menu-header {
  text-align: center;
  max-width: 700px;
  animation: fade-up 0.8s ease both;
}

.header-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

#main-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.title-line-1 {
  background: linear-gradient(135deg, #d4890a 0%, #f0a030 50%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-line-2 {
  background: linear-gradient(135deg, #1a9e5f 0%, #2dd4a0 50%, #4fc3f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#main-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* ===== 場景選擇標題 ===== */
.selection-title {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
  font-weight: 400;
}

/* ===== 場景選擇容器 ===== */
#scenario-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  animation: fade-up 0.8s ease 0.2s both;
}

/* ===== 場景卡片 ===== */
.scenario-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

/* 並排顯示（大螢幕） */
@media (min-width: 900px) {
  #scenario-selection {
    flex-direction: row;
    align-items: stretch;
  }
  .scenario-card {
    flex: 1;
    max-width: 560px;
  }
}

.scenario-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.scenario-card:hover .card-glow {
  opacity: 1;
}

/* 卡片光暈效果 */
.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

.sahel-glow {
  background: radial-gradient(circle, rgba(212, 137, 10, 0.3) 0%, transparent 70%);
}

.socal-glow {
  background: radial-gradient(circle, rgba(26, 158, 95, 0.3) 0%, transparent 70%);
}

/* 卡片背景 */
.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  z-index: 0;
}

.sahel-bg {
  background: linear-gradient(
    135deg,
    rgba(212, 137, 10, 0.15) 0%,
    rgba(180, 70, 20, 0.2) 50%,
    rgba(30, 10, 5, 0.9) 100%
  );
}

.socal-bg {
  background: linear-gradient(
    135deg,
    rgba(26, 158, 95, 0.15) 0%,
    rgba(20, 120, 180, 0.2) 50%,
    rgba(5, 20, 30, 0.9) 100%
  );
}

/* 卡片內容 */
.card-content {
  position: relative;
  z-index: 2;
  padding: 32px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 場景圖標 */
.scenario-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(255,255,255,0.2));
}

/* 位置標籤 */
.scenario-location {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

/* 場景名稱 */
.scenario-name {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

#sahel-card .scenario-name {
  background: linear-gradient(135deg, var(--sahel-primary), var(--sahel-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#socal-card .scenario-name {
  background: linear-gradient(135deg, var(--socal-primary), var(--socal-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 場景描述 */
.scenario-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* 標籤組 */
.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#sahel-card .tag {
  border-color: rgba(212, 137, 10, 0.3);
  color: rgba(240, 160, 48, 0.9);
}

#socal-card .tag {
  border-color: rgba(26, 158, 95, 0.3);
  color: rgba(45, 212, 160, 0.9);
}

/* 指標條 */
.card-factors {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.factor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.factor-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 50px;
  flex-shrink: 0;
}

.factor-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.factor-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

#sahel-card .factor-fill {
  background: linear-gradient(90deg, var(--sahel-primary), var(--sahel-secondary));
}

#socal-card .factor-fill {
  background: linear-gradient(90deg, var(--socal-primary), var(--socal-secondary));
}

/* 動物浮動 */
.card-animals {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.animal {
  font-size: 1.8rem;
  display: block;
  animation: float-animal 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

@keyframes float-animal {
  0%, 100% { transform: translateY(0px) rotate(-5deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

/* 開始按鈕 */
.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: var(--font-chinese);
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-top: auto;
}

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

.play-btn:hover::before {
  left: 100%;
}

.play-btn svg {
  width: 20px;
  height: 20px;
}

.sahel-btn {
  background: linear-gradient(135deg, var(--sahel-primary), var(--sahel-accent));
  color: #fff;
  box-shadow: 0 8px 24px rgba(212, 137, 10, 0.4);
}

.sahel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 137, 10, 0.5);
}

.socal-btn {
  background: linear-gradient(135deg, var(--socal-primary), var(--socal-secondary));
  color: #fff;
  box-shadow: 0 8px 24px rgba(26, 158, 95, 0.4);
}

.socal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(26, 158, 95, 0.5);
}

/* ===== 底部知識條 ===== */
#menu-footer {
  margin-top: auto;
  animation: fade-up 0.8s ease 0.4s both;
}

.knowledge-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  max-width: 600px;
}

.knowledge-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

/* ===== 動畫 ===== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 卡片懸停邊框效果 ===== */
#sahel-card {
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}
#sahel-card:hover {
  border-color: rgba(212, 137, 10, 0.4);
  box-shadow: var(--shadow-glow-sahel), var(--shadow-card);
}

#socal-card {
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}
#socal-card:hover {
  border-color: rgba(26, 158, 95, 0.4);
  box-shadow: var(--shadow-glow-socal), var(--shadow-card);
}

/* ===== 手機版介面優化 ===== */
@media (max-width: 640px) {
  #menu-container {
    padding: 30px 15px 20px;
    gap: 24px;
  }
  
  #main-title {
    font-size: 2.2rem;
  }
  
  #main-subtitle {
    font-size: 0.9rem;
    padding: 0 10px;
  }
  
  .card-content {
    padding: 20px;
    gap: 12px;
  }
  
  .scenario-icon {
    font-size: 2.5rem;
  }
  
  .scenario-name {
    font-size: 1.4rem;
  }
  
  .scenario-description {
    font-size: 0.85rem;
  }
  
  .card-factors {
    padding: 12px;
  }
  
  .card-animals {
    top: 10px;
    right: 10px;
  }
  
  .animal {
    font-size: 1.4rem;
  }
  
  .play-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  
  .knowledge-strip {
    padding: 10px 16px;
    margin: 0 10px;
  }
  
  .knowledge-text {
    font-size: 0.75rem;
  }
}
