/* ============================================================
   白底紅調極簡寬闊風格 (Spacious White & Red Modern UI)
   ============================================================ */
:root {
  --bg-primary: #ffffff;
  --bg-body: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #ef4444;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* 紅色系主色調 */
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-red-light: #fff1f2;
  --accent-red-border: rgba(239, 68, 68, 0.25);
  --gradient-btn: linear-gradient(135deg, #f43f5e 0%, #ef4444 50%, #dc2626 100%);
  --gradient-title: linear-gradient(135deg, #0f172a 0%, #334155 70%, #dc2626 100%);
  --shadow-glow: 0 10px 25px -5px rgba(239, 68, 68, 0.35);
  
  --shadow-card: 0 12px 35px -8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 20px 45px -10px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-body);
  background-image: radial-gradient(circle at 50% -15%, #ffe4e6 0%, #fff1f2 20%, #ffffff 55%);
  background-repeat: no-repeat;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 頂部導覽列 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-btn);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-red);
}

.nav-badge {
  background: var(--accent-red-light);
  color: var(--accent-red-hover);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--accent-red-border);
  white-space: nowrap;
}

/* 寬闊主要內容容器 (大幅拓寬至 1240px，給予充足呼吸空間) */
.main-container {
  max-width: 1240px;
  margin: 48px auto 90px auto;
  padding: 0 28px;
  flex: 1;
  width: 100%;
}

/* 公告條 */
.announcement-bar {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

/* 英雄標題區 (開闊大器) */
.hero-section {
  text-align: center;
  margin-bottom: 36px;
  padding: 20px 0 10px 0;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 850;
  margin-bottom: 14px;
  background: var(--gradient-title);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  letter-spacing: -1px;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2.5vw, 1.18rem);
  max-width: 720px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

/* 支援平台膠囊標籤 */
.platforms-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.platform-pill {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.platform-pill:hover {
  border-color: var(--accent-red);
  color: var(--accent-red-hover);
  background: var(--accent-red-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}

/* 網址輸入卡片 (寬闊大搜尋條風格) */
.input-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  margin-bottom: 32px;
  transition: all 0.2s;
}

.url-input-wrapper {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.url-input {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  font-size: 1.1rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
  min-width: 0;
}

.url-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
  background: #ffffff;
}

.url-action-btns {
  display: flex;
  gap: 10px;
}

/* 按鈕設計 (紅色系主按鈕，強烈吸引力) */
.btn-primary {
  background: var(--gradient-btn);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 32px;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: var(--shadow-glow);
  white-space: nowrap;
  min-height: 58px;
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -5px rgba(239, 68, 68, 0.45);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0 22px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--accent-red-hover);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

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

/* 預覽卡片 (White Video Preview Card) */
.preview-card {
  display: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
  animation: fadeIn 0.3s ease;
}

.preview-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
}

.preview-thumb-box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 16 / 9;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.88);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-info h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  line-height: 1.4;
  word-break: break-word;
  color: var(--text-primary);
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 22px;
}

/* 畫質單選格規 (選中為紅色系) */
.format-selector {
  margin-bottom: 24px;
}

.format-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: block;
}

.format-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.format-option {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.format-option:hover {
  border-color: rgba(239, 68, 68, 0.4);
}

.format-option.selected {
  border-color: var(--accent-red);
  background: var(--accent-red-light);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.format-title {
  font-weight: 700;
  font-size: 0.96rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.format-option.selected .format-title {
  color: var(--accent-red-hover);
}

.format-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* 下載進度盒 */
.progress-box {
  display: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.progress-bar-bg {
  width: 100%;
  height: 12px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-btn);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 500;
}

/* 訊息盒 */
.alert-box {
  display: none;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

/* 頁面特色展示 (White Clean Cards) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: rgba(239, 68, 68, 0.3);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* 廣告容器 */
.ad-container {
  margin: 24px auto;
  text-align: center;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ad-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: #ffffff;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  position: relative;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}

.ad-wrapper iframe {
  max-width: 100%;
  border: 0;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  font-weight: 600;
}

/* 兩側固定對聯摩天大樓廣告 */
.ad-skyscraper {
  display: none;
  position: fixed;
  top: 90px;
  width: 160px;
  height: 600px;
  z-index: 50;
  text-align: center;
}

.ad-skyscraper-left {
  left: calc(50% - 620px - 176px); /* 1240px / 2 = 620px */
}

.ad-skyscraper-right {
  right: calc(50% - 620px - 176px);
}

@media (min-width: 1620px) {
  .ad-skyscraper {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* 底部常駐懸浮橫幅 */
.ad-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  padding: 8px 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.08);
  animation: slideUp 0.3s ease;
}

.ad-sticky-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 100%;
}

.ad-sticky-close {
  position: absolute;
  right: -42px;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.ad-sticky-close:hover {
  background: #fee2e2;
  color: var(--accent-red);
  border-color: #fecaca;
}

/* 影片解析卡片內嵌廣告 */
.ad-incard {
  margin: 18px 0;
  text-align: center;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 10px;
  border: 1px dashed var(--border-color);
}

/* ============================================================
   SEO 語意區塊樣式 (3步驟指南、支援平台展示、FAQ手風琴)
   ============================================================ */
.seo-section {
  margin-top: 56px;
  border-top: 1px solid var(--border-color);
  padding-top: 48px;
}

.seo-heading {
  font-size: 1.85rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.seo-subheading {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 45px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.step-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.step-num {
  width: 36px;
  height: 36px;
  background: var(--gradient-btn);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.step-title {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.platform-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.platform-card:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: var(--shadow-card);
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.platform-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-list {
  max-width: 860px;
  margin: 0 auto 50px auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.faq-item:hover {
  border-color: rgba(239, 68, 68, 0.3);
}

.faq-item summary {
  padding: 18px 24px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '▼';
  font-size: 0.85rem;
  color: var(--accent-red);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 20px 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  padding-top: 14px;
}

/* ============================================================
   後台專用面板樣式 (Admin Panel - Clean White UI)
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1.5px solid var(--border-color);
  margin-bottom: 26px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.admin-tab {
  padding: 12px 22px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-tab.active {
  color: var(--accent-red-hover);
  border-bottom-color: var(--accent-red);
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.stat-card-title {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-card-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
}

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  white-space: nowrap;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 700;
}

.data-table tr:hover {
  background: #f8fafc;
}

/* 狀態標籤 */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-yellow { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-red { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Modal 彈窗 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.18);
}

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

.modal-close {
  background: #f1f5f9;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #fee2e2;
  color: var(--accent-red);
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* 一行一個設定項目列表 (Settings Rows) */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.settings-row:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.settings-row-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}

.settings-icon {
  width: 48px;
  height: 48px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.settings-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.settings-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.settings-row-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-settings-act {
  min-height: 42px;
  padding: 0 20px;
  font-size: 0.92rem;
}

/* ============================================================
   📱 手機行動版自適應優化 (<= 768px)
   ============================================================ */
@media (max-width: 768px) {
  .navbar {
    padding: 14px 18px;
  }
  .brand {
    font-size: 1.15rem;
    gap: 8px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .desktop-only {
    display: none !important;
  }

  .main-container {
    margin: 24px auto 60px auto;
    padding: 0 16px;
  }

  .hero-section {
    padding: 10px 0;
    margin-bottom: 22px;
  }

  .platforms-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 4px 2px 8px 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 20px;
  }
  .platforms-list::-webkit-scrollbar {
    display: none;
  }
  .platform-pill {
    flex-shrink: 0;
    font-size: 0.82rem;
    padding: 6px 14px;
  }

  .input-card {
    padding: 18px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }
  .url-input-wrapper {
    flex-direction: column;
    gap: 12px;
  }
  .url-input {
    width: 100%;
    font-size: 1rem;
    padding: 15px 16px;
  }
  .url-action-btns {
    display: flex;
    gap: 10px;
    width: 100%;
  }
  .url-action-btns .btn-secondary {
    flex: 1;
    min-height: 50px;
  }
  .url-action-btns .btn-primary {
    flex: 2;
    min-height: 50px;
  }

  .preview-card {
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .preview-info h3 {
    font-size: 1.2rem;
  }

  .format-options-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .format-option {
    padding: 12px;
  }

  #startDownloadBtn, #saveFileBtn {
    width: 100% !important;
    min-height: 50px;
  }

  .progress-box {
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 30px;
  }
  .feature-item {
    padding: 16px 12px;
  }

  .settings-row {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .settings-row-right {
    justify-content: space-between;
    width: 100%;
  }
  .btn-settings-act {
    flex: 1;
    text-align: center;
  }

  .stat-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  #tab-dashboard > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

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

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
