/* ==========================================================================
   萬年職缺警報器 Landing Page Stylesheet
   ========================================================================== */

/* 變數定義 */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(255, 255, 255, 0.15);
  
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --primary-color: #ef4444;
  --primary-gradient: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --success-color: #22c55e;
  
  --font-display: 'Outfit', 'Inter', 'Noto Sans TC', sans-serif;
  --font-body: 'Inter', 'Noto Sans TC', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基本重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 容器排版 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 標題與段落 */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

/* 按鈕樣式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-medium);
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
  position: relative;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-main);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 36px;
  font-size: 18px;
}

/* 呼吸光圈效果 */
.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: buttonPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes buttonPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* 漸層文字 */
.text-gradient {
  background: linear-gradient(135deg, #ff4e50, #f97316, #fdbb2d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   1. 頂部導覽列 (Navbar)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-card);
  transition: var(--transition-medium);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-v {
  font-size: 11px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.15);
  color: var(--primary-color);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-cta-btn {
  background: var(--primary-gradient);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* 漢堡選單 */
.hamburger-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu span {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition-fast);
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* 行動端導覽面板 */
.mobile-nav {
  position: fixed;
  top: -100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-card);
  padding: 80px 24px 30px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: top 0.4s ease;
}

.mobile-nav.active {
  top: 0;
}

.mobile-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-cta {
  background: var(--primary-gradient);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  border: none;
  padding: 12px;
}

/* ==========================================================================
   2. Hero 區塊 (Hero Section)
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 130px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  background-color: var(--bg-primary);
  overflow: hidden;
}

/* 霓虹背景光暈 */
.hero-glow-1 {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0) 70%);
  top: 15%;
  left: -10%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0) 70%);
  bottom: 10%;
  right: -5%;
  filter: blur(100px);
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 560px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.github-icon {
  margin-right: 4px;
}

.hero-platforms {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.platform-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.platform-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
}

.p-104 {
  background: rgba(30, 64, 175, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.p-1111 {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.p-cake {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

/* ==========================================================================
   瀏覽器模擬器 (Browser Mockup - Hero & Simulator)
   ========================================================================== */
.browser-mockup {
  background: #1e293b;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
  width: 100%;
  transition: transform 0.3s ease;
}

.browser-header {
  background: #0f172a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.url-bar {
  background: #1e293b;
  flex: 1;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-body {
  padding: 24px;
  min-height: 280px;
  position: relative;
}

/* 模擬職缺頁面內文 */
.mock-job-page-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-company {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.mock-job-title-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.mock-job-title {
  font-size: 22px;
  font-weight: 700;
}

.mock-job-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mock-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 4px 0;
}

.mock-job-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   萬年職缺 Badge 樣式 (複製自 extension styles.css)
   ========================================================================== */
.jaa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 99;
}

.jaa-badge:hover {
  transform: scale(1.05);
}

.jaa-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  color: #fff;
}

/* 綠色等級 */
.jaa-green {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.jaa-green .jaa-tag { background-color: #22c55e; }

/* 黃色等級 */
.jaa-yellow {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}
.jaa-yellow .jaa-tag { background-color: #eab308; }

/* 橘色等級 */
.jaa-orange {
  background-color: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
}
.jaa-orange .jaa-tag { background-color: #f97316; }

/* 紅色等級 */
.jaa-red {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  animation: jaa-pulse 2s ease-in-out infinite;
}
.jaa-red .jaa-tag { background-color: #ef4444; }

@keyframes jaa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Tooltip (模擬 hover 面板) */
.jaa-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #f9fafb;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.jaa-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #1f2937;
}

.jaa-badge:hover .jaa-tooltip {
  visibility: visible;
  opacity: 1;
}

.jaa-tooltip-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 13px;
  color: #fff;
}

.jaa-tooltip-tip {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #374151;
  color: #fde68a;
  font-weight: 500;
}

.jaa-tooltip-warn {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #374151;
  color: #fca5a5;
  font-weight: 500;
}

/* 全頁危險 Banner */
.jaa-danger-banner {
  position: absolute;
  top: -100px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  color: #fff;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jaa-danger-banner.active {
  top: 0;
}

.jaa-danger-banner-content {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.jaa-danger-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.jaa-danger-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.jaa-danger-banner-text strong {
  font-size: 12px;
  font-weight: 700;
}

.jaa-danger-banner-text span {
  font-size: 10px;
  opacity: 0.9;
  line-height: 1.3;
}

/* ==========================================================================
   3. 產品特色區塊 (Features Section)
   ========================================================================== */
.features-section {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 36px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 36px 24px;
  transition: var(--transition-medium);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-card-hover);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 24px;
}

.bg-green-glow {
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
}

.bg-red-glow {
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

.bg-blue-glow {
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.bg-purple-glow {
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

.feature-card-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.feature-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   4. 線上體驗模擬器 (Simulator Section)
   ========================================================================== */
.simulator-section {
  padding: 100px 0;
  background: var(--bg-primary);
}

.simulator-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.sim-control-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.control-group {
  margin-bottom: 30px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.sim-days-display {
  background: var(--primary-gradient);
  color: #fff;
  padding: 4px 12px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
}

.sim-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: #334155;
  outline: none;
  margin-bottom: 12px;
}

.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff4e50;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  transition: transform 0.1s ease;
}

.sim-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* 分析卡片 */
.sim-analysis h4 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.analysis-card {
  background: rgba(15, 23, 42, 0.6);
  border-left: 4px solid var(--success-color);
  padding: 16px;
  border-radius: 0 12px 12px 0;
  font-size: 14px;
  transition: var(--transition-medium);
}

.analysis-card.green { border-color: #22c55e; }
.analysis-card.yellow { border-color: #eab308; }
.analysis-card.orange { border-color: #f97316; }
.analysis-card.red { border-color: #ef4444; }

.analysis-header {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.analysis-desc {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 模擬瀏覽器微調 (配合模擬器) */
.sim-preview-window {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-browser-body {
  padding-top: 50px !important; /* 給危險 banner 留出頂部空間 */
}

.sim-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.sim-tip {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   5. 擴充功能 Popup 模擬面板區塊 (Popup Preview Section)
   ========================================================================== */
.popup-preview-section {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.popup-preview-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.popup-explanation h3 {
  font-size: 28px;
  margin-bottom: 20px;
}

.explanation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.explanation-list li {
  position: relative;
  padding-left: 28px;
}

.explanation-list li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  top: 2px;
  color: #ff4e50;
  font-size: 16px;
}

.explanation-list li strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.explanation-list li span {
  font-size: 14px;
  color: var(--text-secondary);
}

.popup-hint {
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.3);
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #93c5fd;
  line-height: 1.5;
}

/* 模擬 Chrome 擴充功能小視窗 */
.popup-mock-container {
  display: flex;
  justify-content: center;
}

.popup-mock-chrome {
  width: 360px;
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.chrome-bar {
  background: #1e293b;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chrome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.chrome-tab {
  background: #0f172a;
  padding: 2px 12px;
  border-radius: 4px 4px 0 0;
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 12px;
}

/* Popup 本體樣式 (精準對標 extension popup.css) */
.popup-body {
  padding: 16px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.popup-header {
  margin-bottom: 12px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 12px;
}

.popup-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.popup-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.global-status {
  font-size: 10px;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.active-status {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.inactive-status {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

/* 切換按鈕 (Toggle Switch) */
.toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .2s;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #ef4444;
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

/* 分頁選單 */
.popup-tabs {
  display: flex;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 12px;
}

.popup-tab {
  flex: 1;
  background: none;
  border: none;
  color: #94a3b8;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.popup-tab.active {
  color: #fff;
  border-bottom-color: #ef4444;
}

/* 分頁內容 */
.popup-tab-content {
  display: none;
  min-height: 200px;
}

.popup-tab-content.active {
  display: block;
}

/* 數據卡片區 */
.popup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.popup-stat-card {
  background: #1e293b;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.popup-stat-card .stat-number {
  font-size: 20px;
  font-weight: 700;
}

.popup-stat-card.stat-danger {
  color: #f87171;
}

.popup-section h4 {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.popup-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.popup-share-btn {
  width: 100%;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

/* 歷史分頁 */
.popup-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.history-item {
  background: #1e293b;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 10px;
  margin-bottom: 2px;
}

.history-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.jaa-compact {
  padding: 1px 6px;
  font-size: 10px;
}

.popup-clear-btn {
  width: 100%;
  background: none;
  border: 1px solid #334155;
  color: #94a3b8;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 11px;
  cursor: pointer;
  margin-top: 10px;
}

/* 設定分頁 */
.mock-threshold-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.threshold-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.threshold-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.threshold-color.green { background: #22c55e; }
.threshold-color.yellow { background: #eab308; }
.threshold-color.orange { background: #f97316; }
.threshold-color.red { background: #ef4444; }

.threshold-item input {
  width: 55px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #fff;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  text-align: center;
}

.settings-actions {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.popup-save-btn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.popup-reset-btn {
  background: none;
  border: 1px solid #334155;
  color: #94a3b8;
  border-radius: 6px;
  padding: 8px 0;
  font-size: 12px;
  cursor: pointer;
}

.save-success-msg {
  display: none;
  color: #4ade80;
  font-size: 11px;
  text-align: center;
  margin-top: 8px;
  animation: jaa-fadeIn 0.2s ease;
}

.popup-footer {
  text-align: center;
  border-top: 1px solid #1e293b;
  padding-top: 10px;
  margin-top: 12px;
  font-size: 10px;
  color: #64748b;
}

/* ==========================================================================
   6. 常見問題區塊 (FAQ Section)
   ========================================================================== */
.faq-section {
  padding: 100px 0;
  background: var(--bg-primary);
}

.faq-accordion-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-medium);
}

.faq-item:hover {
  border-color: var(--border-card-hover);
}

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.faq-q-icon {
  width: 28px;
  height: 28px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-right: 16px;
  flex-shrink: 0;
}

.faq-question {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
}

.faq-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  margin-left: 12px;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer {
  padding: 0 24px 20px 68px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   7. 下載與安裝區塊 (Install Section)
   ========================================================================== */
.install-section {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.install-card {
  position: relative;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 60px 40px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.install-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  top: -200px;
  right: -100px;
  filter: blur(50px);
}

.install-card-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.install-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
}

.install-card-content h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.install-card-content p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 48px;
}

/* 安裝步驟流 */
.steps-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 48px;
  text-align: left;
}

.step-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 24px;
  border-radius: 16px;
  position: relative;
}

.step-num {
  font-size: 32px;
  font-weight: 800;
  color: rgba(239, 68, 68, 0.2);
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--font-display);
}

.step-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

.install-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   8. 頁尾 (Footer)
   ========================================================================== */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-card);
  padding: 40px 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}

.footer-brand img {
  width: 18px;
  height: 18px;
}

.copyright {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   自適應媒體查詢 (RWD Media Queries)
   ========================================================================== */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 20px;
  }
  
  .hero-title {
    font-size: 38px;
  }
  
  .hero-desc {
    margin: 0 auto 36px;
  }
  
  .hero-ctas {
    justify-content: center;
  }
  
  .hero-platforms {
    justify-content: center;
  }
  
  .simulator-layout {
    grid-template-columns: 1fr;
  }
  
  .popup-preview-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hamburger-menu {
    display: flex;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .install-card {
    padding: 40px 24px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
