/* ===== index.html ===== */
  :root {
    --bg: #0f1115;
    --card: #171a21;
    --accent: #6ee7b7;
    --accent2: #34d399;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #262a33;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .card {
    width: 100%;
    max-width: 480px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
  }
  h1 {
    font-size: 1.4rem;
    margin: 0 0 4px;
  }
  p.sub {
    color: var(--muted);
    margin: 0 0 24px;
    font-size: 0.9rem;
  }
  .drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
  }
  .drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(110, 231, 183, 0.05);
  }
  .drop-zone svg { margin-bottom: 8px; opacity: 0.6; }
  .drop-zone .main-text { font-weight: 600; margin-bottom: 4px; }
  .drop-zone .sub-text { color: var(--muted); font-size: 0.85rem; }
  input[type="file"] { display: none; }

  .file-info {
    margin-top: 16px;
    padding: 12px 14px;
    background: #1e222b;
    border-radius: 10px;
    font-size: 0.9rem;
    display: none;
  }
  .file-info.show { display: block; }
  .file-info .name { font-weight: 600; word-break: break-all; }
  .file-info .size { color: var(--muted); margin-top: 2px; }

  .progress-wrap {
    margin-top: 16px;
    display: none;
  }
  .progress-wrap.show { display: block; }
  .progress-bar-bg {
    background: #1e222b;
    border-radius: 8px;
    height: 10px;
    overflow: hidden;
  }
  .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    width: 0%;
    transition: width 0.15s ease;
  }
  .progress-text {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
  }

  button.upload-btn {
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #06251a;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
  }
  button.upload-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  button.upload-btn:not(:disabled):active { opacity: 0.85; }

  .result {
    margin-top: 20px;
    padding: 16px;
    background: #10261c;
    border: 1px solid #1f4d38;
    border-radius: 12px;
    display: none;
  }
  .result.show { display: block; }
  .result .label { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
  .link-row {
    display: flex;
    gap: 8px;
  }
  .link-row input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0f1115;
    color: var(--accent);
    font-size: 0.85rem;
  }
  .link-row button {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #06251a;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }
  .expire-note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--muted);
  }
  .error {
    margin-top: 16px;
    padding: 12px 14px;
    background: #2b1414;
    border: 1px solid #5c2323;
    color: #fca5a5;
    border-radius: 10px;
    font-size: 0.88rem;
    display: none;
  }
  .error.show { display: block; }

/* ===== watch.html ===== */
  :root {
    --bg: #0f1115;
    --card: #171a21;
    --accent: #6ee7b7;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #262a33;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .wrap {
    width: 100%;
    max-width: 720px;
  }
  video {
    width: 100%;
    border-radius: 12px;
    background: #000;
    display: block;
  }
  .image-viewer {
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none; /* Cho phép JS tự xử lý pinch/pan, không để trình duyệt cuộn trang can thiệp */
    cursor: grab;
  }
  .image-viewer img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    transition: transform 0.05s ease-out;
  }
  .meta {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.88rem;
  }
  .meta .name { font-weight: 600; margin-bottom: 6px; word-break: break-all; }
  .meta .row { color: var(--muted); display: flex; justify-content: space-between; margin-top: 4px; }
  .loading, .error-msg {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
  }
  .error-msg { color: #fca5a5; }

/* ===== expired.html ===== */
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f1115;
    color: #e5e7eb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
  }
  .box { max-width: 360px; }
  .emoji { font-size: 3rem; margin-bottom: 12px; }
  h1 { font-size: 1.2rem; margin: 0 0 8px; }
  p { color: #9ca3af; font-size: 0.9rem; }

.hidden { display: none; }
