
:root {
  --bg: #0f1115;
  --card: #171a21;
  --muted: #8b909a;
  --text: #e6e9ef;
  --accent: #5fb3ff;
  --border: #232838;
}
::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb:hover {
  background: var(--card) !important; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Noto Sans, Apple Color Emoji, Segoe UI Emoji;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
.topbar {
  width: 100%;
  border-bottom: 1px solid var(--border); /* 你的邊框顏色 */
  position: sticky; /* 讓它固定在頂部 (可選) */
  top: 0;
  background: rgba(15,17,21,.9);
  backdrop-filter: blur(8px); 
  z-index: 1000;
}
.topbar-inner{
  max-width: 1800px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;                 /* 新增：啟用 flex 排版 */
  justify-content: space-between;/* 新增：左右兩側貼邊 */
  align-items: center;           /* 建議：垂直置中（可保留/可省略） */
}
.logo { font-weight: 700; font-size: 20pt;}
.container { max-width: 1800px; margin: 24px auto; padding: 0 20px; }
.video-comments-layout {
  display: flex;
  gap: 20px; /* 左右間距 */
  align-items: flex-start;
}

.video-section {
  flex: 3; /* 左側影片區較大 */
}

.comments-section {
  flex: 1; /* 右側評論區較小 */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  max-height: 86vh;
  overflow-y: auto;
}

.card, .player-card, .comment-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.footer {
  border-top: 1px solid var(--border);
  padding: 7px 10px;
  /*position: sticky; bottom: 0;*/
}
.footer p{
  font-size: 14px;
  display: flex;
  justify-content: center; /* 水平置中 */
  align-items: center;     /* 垂直置中 */
}
label { display:block; margin-bottom:6px; color: var(--muted);}
input[type="text"], input[type="file"], input[type="password"] {
  width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: #0f131c; color: var(--text); margin-bottom: 12px;
}
button, .button {
  background: var(--accent); color: #001020; border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.button.good { background: white; border: 1px solid var(--border);}
.button.good:hover { background: #45a049; }
.button.bad { background: white; border: 1px solid var(--border);}
.button.bad:hover { background: #d32f2f; }
#quick-good, #quick-bad { padding: 6px 6px; font-size: 1em; font-weight: none;}

.controls { display:flex; gap:10px; align-items:center; margin-top: 8px; }
#player { width: 100%; max-height: 65vh; background: #000; border-radius: 8px; }
.comments { list-style: none; padding: 0; margin: 0; }
.comment-item {
  display:flex; align-items:flex-start; gap: 10px; padding: 10px; border-bottom: 1px dashed var(--border);
}
.comment-item .tc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent); min-width: 96px; cursor: pointer;
}
.comment-item .meta { color: var(--muted); font-size: 12px; }

.form-row { display:flex; gap:10px; }
.share-row { display:flex; gap:10px; align-items:center; margin-top: 8px; }
#shareLink { flex:1; }
@media (max-width: 700px) {
  .form-row { flex-direction: column; }
  .share-row { flex-direction: column; align-items: stretch; }
}

/* ---------- Project page: toolbar & toggles ---------- */
.project-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.project-header .title { margin: 0; }

.videos-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.videos-title { margin: 0; }

.view-toggle button {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; margin-left: 6px; cursor: pointer;
}
.view-toggle button.active { background: var(--accent); color: #001020; }

/* ---------- Grid view (已存在 video-item 基礎樣式可繼續沿用) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.video-item {
  display: flex; flex-direction: column;
  background: #141821; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  text-decoration: none; color: var(--text);
  transition: transform .12s ease, border-color .12s ease;
}
.video-item:hover { transform: translateY(-2px); border-color: #2c3246; }
.video-item .thumb {
  width: 100%; aspect-ratio: 16 / 9;
  background-color: #0b0e14; background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.thumb-fallback { color: var(--muted); font-size: 12px; line-height: 1.1; text-align: center; opacity: .8; }
.video-item .meta { padding: 10px 12px 12px; }
.video-item .title { font-weight: 600; margin-bottom: 6px; }
.video-item .sub { font-size: 12px; color: var(--muted); }

/* ---------- List view（不顯示縮圖，只顯示文字） ---------- */
.video-list { display: flex; flex-direction: column; gap: 10px; }
.video-list .video-item {
  flex-direction: row; align-items: center; min-height: 64px;
}
.video-list .video-item .thumb { display: none !important; }
.video-list .video-item .meta { padding: 10px 14px; }
.video-list .video-item .title { margin: 0; }
.video-list .video-item .sub { margin-top: 4px; }

/* ---------- Index page header ---------- */
.index-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.index-header .title { margin: 0; }

/* ---------- Projects grid（沿用先前的） ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.project-item {
  display: flex; flex-direction: column;
  background: #141821; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  text-decoration: none; color: var(--text);
  transition: transform .12s ease, border-color .12s ease;
}
.project-item:hover { transform: translateY(-2px); border-color: #2c3246; }
.project-item .thumb {
  width: 100%; aspect-ratio: 16/9;
  background: #0b0e14; background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.project-item .meta { padding: 10px 12px 12px; }
.project-item .title { font-weight: 600; margin-bottom: 6px; }
.project-item .sub { font-size: 12px; color: var(--muted); }
.thumb-fallback { color: var(--muted); font-size: 12px; opacity: .8; text-align: center; }

/* ---------- Modal ---------- */
.modal::backdrop {
  background: rgba(0,0,0,.5);
}
.modal {
  border: none;
  padding: 0;
  background: transparent;
}
.modal-card {
  width: min(520px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  color: var(--text);
}
.modal-card label { display:block; margin-top: 10px; color: var(--muted); }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px;
}
/* 拖拉區基本樣式 */
.drop-zone {
  max-width: 100%;
  height: 150px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  border: 2px dashed var(--border);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* 拖入檔案時的樣式 */
.drop-zone--over {
  border-color: var(--accent);
  background: rgba(95, 179, 255, 0.05);
  color: var(--text);
}

.drop-zone__input {
  display: none; /* 隱藏原本醜醜的 input */
}

/* 待上傳檔案清單樣式 */
.file-list {
  margin-top: 1rem;
  font-size: 0.9em;
}
.file-item {
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}
.progress-wrapper {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent); /* 藍色進度條 */
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.2s ease;
}