* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background: #14161a; color: #e8eaed; min-height: 100vh;
}
.container { max-width: 640px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 1.6rem; margin-bottom: 4px; }
h2 { font-size: 1rem; margin: 24px 0 8px; color: #9aa0a6; }
.sub { color: #9aa0a6; margin-bottom: 24px; }
.note { color: #9aa0a6; font-size: 0.85rem; margin-top: 24px; }
.btn {
  border: none; border-radius: 10px; cursor: pointer;
  font-size: 1rem; padding: 10px 16px; color: #e8eaed; background: #2d3138;
}
.btn.primary { background: #2f6fed; }
.btn.danger { background: #b3261e; }
.btn.big { width: 100%; padding: 16px; font-size: 1.1rem; }
.btn:disabled { opacity: 0.5; cursor: default; }
.history { list-style: none; }
.history li { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.hist-del { background: none; border: none; color: #9aa0a6; cursor: pointer; font-size: 1.1rem; padding: 2px 8px; }
.hist-del:hover { color: #f28b82; }
.history a { color: #8ab4f8; text-decoration: none; word-break: break-all; }
.history .empty { color: #9aa0a6; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.tile { background: #1d2025; border-radius: 10px; overflow: hidden; }
.tile img { width: 100%; height: 140px; object-fit: cover; display: block; }
.tile .video-ph {
  width: 100%; height: 140px; display: flex; align-items: center;
  justify-content: center; font-size: 2.5rem; background: #23262c;
}
.tile .meta { padding: 8px; font-size: 0.75rem; color: #9aa0a6; word-break: break-all; }
.tile .meta .name { color: #e8eaed; display: block; margin-bottom: 4px; }
.tile .actions { display: flex; gap: 6px; padding: 0 8px 8px; }
.tile .actions a, .tile .actions button {
  flex: 1; text-align: center; font-size: 0.8rem; padding: 6px 4px;
  border-radius: 6px; border: none; cursor: pointer;
  background: #2d3138; color: #e8eaed; text-decoration: none;
}
.uplist { list-style: none; margin: 12px 0; }
.uplist li { font-size: 0.85rem; margin-bottom: 6px; }
.uplist progress { width: 100%; }
.uplist .error { color: #f28b82; }
.status { color: #9aa0a6; margin: 12px 0; }
#qr-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; z-index: 10; }
#qr-overlay[hidden] { display: none; }
#qr-box { background: #fff; border-radius: 12px; padding: 20px; text-align: center; }
#qr-box p { color: #333; font-size: 0.85rem; margin-top: 8px; }
#qr-svg svg { width: 240px; height: 240px; display: block; margin: 0 auto; }
