/* ═══════════════════════════════════════════════════════════
   MacBook Air M4 Sky Blue 設計語言
   色板：
     背景底色     #DCF0F8 → #EAF4FB
     側邊欄       #5A97B8 → #3E7A9C
     卡片         rgba(255,255,255,0.85) + blur
     主行動色     #0071E3  (Apple System Blue)
     文字主色     #1D1D1F  (Apple Near-Black)
     文字次色     #6E6E73  (Apple Gray)
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  background: linear-gradient(145deg, #DCF0F8 0%, #EAF4FB 45%, #F0F8FC 100%);
  min-height: 100vh;
  color: #1D1D1F;
  display: flex;
  overflow: hidden;   /* 整頁不捲動 */
}

/* ══════════════════════════════════════
   Layout Utilities
══════════════════════════════════════ */
.column-a {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  min-height: 0;
}

.panel-scroll-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.panel-static {
  flex-shrink: 0;
  padding-bottom: 1.2rem;
}


/* ══════════════════════════════════════
   側邊欄
══════════════════════════════════════ */
.sidebar {
  width: 190px;
  min-width: 190px;
  background: linear-gradient(175deg, #6AAFC8 0%, #4E8DAA 55%, #3A7898 100%);
  display: flex;
  flex-direction: column;
  padding: 1.2rem 0.9rem;
  border-right: 1px solid rgba(100,180,220,0.3);
  box-shadow: 2px 0 12px rgba(60,120,160,0.15);
  z-index: 10;
}

.sidebar-logo { text-align: center; margin-bottom: 1.8rem; }
.logo-icon { font-size: 2rem; display: block; margin-bottom: 0.4rem;
             filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.logo-title { font-size: 0.85rem; font-weight: 700; color: #FFFFFF;
              line-height: 1.5; letter-spacing: -0.01em;
              text-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.logo-version { font-size: 0.65rem; color: rgba(240,248,255,0.55); margin-top: 4px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 6px; }

.nav-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 0.55rem 0.8rem;
  background: transparent;
  border: none; border-radius: 10px;
  color: rgba(240,248,255,0.75);
  font-size: 0.88rem; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: all 0.18s ease;
}
.nav-btn:hover { background: rgba(255,255,255,0.18); color: #FFFFFF; }
.nav-btn.active {
  background: rgba(255,255,255,0.25);
  color: #FFFFFF; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.nav-icon { font-size: 1rem; }

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 1rem 0;
}

/* 側邊欄新增人名表單 */
.sidebar-form-wrap {
  padding: 0 0.2rem;
  margin-bottom: 1rem;
}
.sidebar-form-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  padding-left: 0.3rem;
}
.sidebar-form {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.sidebar-input {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  color: #FFFFFF;
  font-size: 0.8rem;
  transition: all 0.2s;
  width: 100%;
}
.sidebar-input::placeholder { color: rgba(255,255,255,0.6); }
.sidebar-input:focus {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
  outline: none;
}
.sidebar-submit {
  background: #FFFFFF;
  color: #3E7A9C;
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.2rem;
  transition: all 0.2s;
}
.sidebar-submit:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}
.sidebar-submit:active { transform: translateY(0); }

.sidebar-footer {
  margin-top: auto;
  font-size: 0.68rem;
  color: rgba(240,248,255,0.45);
  line-height: 2.1;
  padding: 10px 4px;
}
.sidebar-footer .footer-title {
  margin-bottom: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.3);
}

/* ══════════════════════════════════════
   主內容區
══════════════════════════════════════ */
.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page { display: none; flex-direction: column; height: 100%; overflow: hidden; padding: 1.2rem 1.4rem 0.6rem; }
.page.active { display: flex; }

.page-header { 
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.2rem; 
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: #1D1D1F; letter-spacing: -0.01em; margin-bottom: 4px; }
.page-sub { font-size: 0.88rem; color: #6E6E73; margin-top: 2px; }

/* 數據儀表板樣式 */
.stats-bar {
  display: flex; gap: 1.2rem;
}
.stat-item {
  display: flex; flex-direction: column; align-items: flex-end;
  border-right: 2px solid rgba(168,204,224,0.4);
  padding-right: 1.2rem;
}
.stat-item:last-child { border-right: none; padding-right: 0; }
.stat-value {
  font-size: 1.4rem; font-weight: 900; color: #0071E3;
  line-height: 1; margin-bottom: 4px;
}
.stat-label {
  font-size: 0.72rem; font-weight: 700; color: #8E8E93;
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   資料管理  Dashboard Grid (3 欄)
══════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 1rem;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── 面板卡片 ── */
.panel {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(168,204,224,0.55);
  box-shadow: 0 4px 20px rgba(80,140,180,0.09);
  padding: 1rem 1.1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.panel-header-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 0.2rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(168,204,224,0.4);
}
.panel-header-row .panel-title { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.75rem; border-radius: 7px; }

/* ══════════════════════════════════════
   辨識  Dashboard Grid (2 欄)
══════════════════════════════════════ */
.recognize-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* 左側上傳面板不捲動，強制讓圖片縮放；右側結果面板如果有很多人臉也可透過內部的區塊捲動 */
.recognize-grid > .panel:first-child {
  overflow: hidden; 
}
.recognize-grid > .panel:last-child {
  overflow: hidden; 
}

#reco-results {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}
#reco-results::-webkit-scrollbar { width: 4px; }
#reco-results::-webkit-scrollbar-track { background: transparent; }
#reco-results::-webkit-scrollbar-thumb { background: rgba(168,204,224,0.6); border-radius: 4px; }


/* ══════════════════════════════════════
   表單元素
══════════════════════════════════════ */
.select-box, .input-field {
  width: 100%;
  padding: 0.42rem 0.75rem;
  border-radius: 9px;
  border: 1px solid #C8DCE8;
  background: rgba(255,255,255,0.92);
  color: #1D1D1F;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.select-box:focus, .input-field:focus {
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.14);
  background: #FFFFFF;
}
.input-row { display: flex; gap: 0.5rem; align-items: center; }
.input-narrow { width: 72px; min-width: 72px; }
.form-label { font-size: 0.8rem; font-weight: 600; color: #6E6E73; margin-bottom: 2px; display: block; }

/* ══════════════════════════════════════
   按鈕
══════════════════════════════════════ */
.btn {
  padding: 0.4rem 0.9rem;
  border-radius: 9px;
  border: 1px solid #C8DCE8;
  background: rgba(255,255,255,0.9);
  color: #1D1D1F;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(200,220,232,0.6); border-color: #8ABBD4; }

.btn-primary {
  background: linear-gradient(150deg, #0071E3, #005BBE);
  color: #FFFFFF; border: none;
  box-shadow: 0 3px 10px rgba(0,113,227,0.28);
}
.btn-primary:hover {
  background: linear-gradient(150deg, #007AED, #0063CB);
  box-shadow: 0 4px 14px rgba(0,113,227,0.38);
}
.btn-danger {
  background: rgba(255,200,200,0.6);
  color: #991B1B; border-color: #FCA5A5;
}
.btn-danger:hover { background: rgba(254,180,180,0.8); }

.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.full-width { width: 100%; justify-content: center; }

/* ══════════════════════════════════════
   名人資訊卡
══════════════════════════════════════ */
.celeb-card {
  background: linear-gradient(135deg, rgba(180,220,240,0.45), rgba(210,235,250,0.55));
  border: 1px solid rgba(140,190,215,0.55);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.celeb-name    { font-size: 1.05rem; font-weight: 800; color: #1D1D1F; }
.celeb-name-en { font-size: 0.8rem;  color: #4A87A8; }
.celeb-count   { font-size: 0.82rem; color: #6E6E73; }
.celeb-count b { color: #0071E3; }

.confirm-box {
  background: rgba(255,240,220,0.7);
  border: 1px solid #FCA5A5;
  border-radius: 10px;
  padding: 0.7rem;
  font-size: 0.83rem;
  color: #7F1D1D;
}

/* ══════════════════════════════════════
   即時搜尋名人清單
══════════════════════════════════════ */
.list-count-badge {
  display: inline-block;
  background: rgba(0,113,227,0.12);
  color: #0071E3;
  font-size: 0.7rem; font-weight: 700;
  padding: 1px 7px; border-radius: 20px;
  margin-left: 6px; vertical-align: middle;
}

.search-input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 9px;
  font-size: 0.85rem; pointer-events: none; opacity: 0.5;
}
.celeb-search-input {
  width: 100%;
  padding: 0.4rem 2rem 0.4rem 2rem;
  border-radius: 9px;
  border: 1px solid #C8DCE8;
  background: rgba(255,255,255,0.92);
  color: #1D1D1F;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.celeb-search-input:focus {
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
  background: #FFFFFF;
}
.search-clear-btn {
  position: absolute; right: 8px;
  background: none; border: none;
  cursor: pointer; color: #8E8E93;
  font-size: 0.8rem; padding: 2px 4px;
  border-radius: 50%; line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.search-clear-btn:hover { color: #1D1D1F; background: rgba(0,0,0,0.06); }

/* 可捲動清單 */
.celeb-list {
  flex: 1;
  overflow-y: auto;
  max-height: 220px;
  display: flex; flex-direction: column; gap: 2px;
  padding-right: 2px;
}
.celeb-list::-webkit-scrollbar { width: 4px; }
.celeb-list::-webkit-scrollbar-track { background: transparent; }
.celeb-list::-webkit-scrollbar-thumb { background: rgba(168,204,224,0.6); border-radius: 4px; }

/* 每一個名人列表項目 */
.celeb-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.13s;
  border: 1px solid transparent;
  gap: 6px;
}
.celeb-list-item:hover {
  background: rgba(0,113,227,0.07);
  border-color: rgba(0,113,227,0.15);
}
.celeb-list-item.active {
  background: rgba(0,113,227,0.12);
  border-color: rgba(0,113,227,0.3);
}
.celeb-list-item .item-name {
  font-size: 0.88rem; font-weight: 600; color: #1D1D1F;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.celeb-list-item .item-en {
  font-size: 0.72rem; color: #8E8E93;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.celeb-list-item .item-count {
  font-size: 0.7rem; color: #0071E3; font-weight: 700;
  flex-shrink: 0;
  background: rgba(0,113,227,0.08);
  padding: 1px 6px; border-radius: 10px;
}
.celeb-list-empty {
  text-align: center; color: #8E8E93;
  font-size: 0.82rem; padding: 1.5rem 0;
}


/* ══════════════════════════════════════
   照片格線
══════════════════════════════════════ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
  align-content: start;
}
.search-grid { grid-template-columns: repeat(5, 1fr); }

.photo-item { 
  position: relative;
  display: flex; flex-direction: column; gap: 3px; 
}
.photo-item img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.photo-item img:hover { border-color: #0071E3; }

/* 刪除照片按鈕 */
.del-photo-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(220,38,38,0.3);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: #DC2626;
  cursor: pointer; opacity: 0.6; transform: scale(0.95);
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 5;
}
.photo-item:hover .del-photo-btn { opacity: 1; transform: scale(1); }
.del-photo-btn:hover { background: #DC2626; color: #FFFFFF; }

.photo-item label {
  font-size: 0.72rem; color: #6E6E73; text-align: center; cursor: pointer;
}
.photo-item input[type="checkbox"] { accent-color: #0071E3; }

/* ══════════════════════════════════════
   搜尋進度
══════════════════════════════════════ */
.progress-label { font-size: 0.82rem; color: #4A87A8; margin-bottom: 4px; }
.progress-bar-bg {
  background: rgba(168,204,224,0.35);
  border-radius: 20px; height: 6px; overflow: hidden;
}
.progress-bar-fill {
  background: linear-gradient(90deg, #0071E3, #5AC8FA);
  height: 100%; width: 0%;
  border-radius: 20px;
  transition: width 0.2s ease;
}
.results-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.4rem; }

/* ══════════════════════════════════════
   上傳區
══════════════════════════════════════ */
.upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed #90BDD4;
  border-radius: 14px;
  padding: 1.2rem 1rem;
  background: rgba(234,244,251,0.55);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.upload-zone:hover { border-color: #0071E3; background: rgba(200,228,244,0.45); }
.upload-zone.drag-over { border-color: #0071E3; background: rgba(180,220,240,0.5); }
.upload-icon { font-size: 2rem; opacity: 0.45; margin-bottom: 0.3rem; }
.upload-text { font-size: 0.95rem; font-weight: 600; color: #4A87A8; }
.upload-sub  { font-size: 0.78rem; color: #8E8E93; margin-top: 4px; }

#result-image-wrap {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.result-img  {
  width: 100%;
  flex: 1 1 0px;
  height: 0;
  min-height: 0;
  border-radius: 12px;
  display: block;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  object-fit: contain;
}

#camera-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex; /* overridden by .hidden when not in use */
}
#camera-wrap.hidden { display: none !important; }

#camera-wrap video {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

#camera-wrap canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.img-caption { font-size: 0.75rem; color: #6E6E73; margin-top: 6px; text-align: center; }

/* 小型上傳框（影片用） */
.upload-zone-sm {
  padding: 0.8rem 1rem;
}

/* 影片播放區 */
#video-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  /* 高度不超出畫面：限制最夣高度 */
  max-height: 38vh;
  display: flex;
  flex-direction: column;
}
#video-wrap.hidden { display: none !important; }

#upload-video {
  width: 100%;
  max-height: 38vh;
  object-fit: contain;
  display: block;
}

#video-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 10; /* 確保在影片之上 */
}

/* ══════════════════════════════════════
   辨識結果卡片
══════════════════════════════════════ */
.reco-header {
  background: linear-gradient(135deg, rgba(180,222,244,0.55), rgba(210,238,252,0.65));
  border: 1px solid rgba(140,190,215,0.4);
  border-radius: 11px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
}
.reco-header .count { font-size: 1.5rem; font-weight: 900; color: #0071E3; }
.reco-header .label { font-size: 0.85rem; color: #4A87A8; font-weight: 600; }

.reco-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(168,204,224,0.45);
  border-radius: 13px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.55rem;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 2px 8px rgba(80,140,180,0.07);
  backdrop-filter: blur(10px);
}
.reco-card-left { display: flex; flex-direction: column; gap: 3px; }
.reco-badge {
  display: inline-block;
  padding: 2px 9px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700;
}
.badge-green { background: rgba(180,240,210,0.7); color: #065F46; }
.badge-blue  { background: rgba(180,220,244,0.7); color: #1E3A8A; }
.badge-red   { background: rgba(255,210,210,0.6); color: #991B1B; }
.badge-blue-text { background: rgba(200,228,250,0.7); color: #1E3A8A; }

.reco-name    { font-size: 1rem; font-weight: 800; color: #1D1D1F; }
.reco-name-en { font-size: 0.76rem; color: #8E8E93; }
.reco-card-right { text-align: right; flex-shrink: 0; margin-left: 10px; }
.reco-conf  { font-size: 1.45rem; font-weight: 900; line-height: 1; }
.reco-unit  { font-size: 0.68rem; color: #8E8E93; }

/* ══════════════════════════════════════
   空狀態 / Loading
══════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; padding: 3rem 1rem; text-align: center; color: #8E8E93;
  gap: 0.5rem;
}
.empty-icon { font-size: 2.5rem; opacity: 0.3; }
.empty-text { font-size: 0.9rem; font-weight: 600; }

.loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; gap: 1rem; color: #4A87A8; font-size: 0.9rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(0,113,227,0.2);
  border-top-color: #0071E3;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   Modal
══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 60, 90, 0.35);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(24px);
  border-radius: 18px;
  border: 1px solid rgba(168,204,224,0.6);
  box-shadow: 0 20px 60px rgba(60,120,160,0.2);
  padding: 1.6rem;
  width: 380px; max-width: 90vw;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: #1D1D1F; margin-bottom: 0.3rem; }
.modal-btns  { justify-content: flex-end; margin-top: 0.4rem; }

/* ══════════════════════════════════════
   Toast 通知
══════════════════════════════════════ */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  background: rgba(30,30,30,0.88);
  color: #FFFFFF;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-size: 0.88rem; font-weight: 500;
  z-index: 200;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  animation: fadeup 0.25s ease;
}
@keyframes fadeup {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── 工具 ── */
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid rgba(168,204,224,0.4); margin: 0.3rem 0; }
.tip-text { font-size: 0.78rem; color: #6E6E73; }

/* 隱藏原生全螢幕按鈕，引導使用者使用上方整合了框線的「⛶ 全螢幕」按鈕 */
#upload-video::-webkit-media-controls-fullscreen-button { display: none; }
#upload-video::-internal-media-controls-fullscreen-button { display: none; }

/* 影片全螢幕容器樣式 (Fullscreen API 作用對象) */
#video-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#video-wrap:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: #000;
}

#video-wrap:fullscreen video,
#video-wrap:fullscreen canvas {
  width: 100%;
  height: 100%;
  max-height: 100vh;
}

