
    :root {
      --bg: #0b0e13;
      --bg-2: #0f131a;
      --card: #161c25;
      --card-2: #1c2330;
      --line: #232c39;
      --accent: #f5a623;
      --accent-2: #ff7b00;
      --t: #e6e9ee;
      --muted: #8b94a3;
      --muted-2: #5b6473;
      --good: #4ade80;
      --bad: #ff6b6b;
      --info: #60a5fa;
      --shadow: 0 10px 30px rgba(0,0,0,.35);
      --radius: 14px;
    }
    * { box-sizing: border-box; }
    html, body { height: 100%; }
    body {
      margin: 0;
      font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background:
        radial-gradient(1200px 600px at 80% -10%, rgba(245,166,35,.08), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(96,165,250,.05), transparent 60%),
        var(--bg);
      color: var(--t);
      -webkit-font-smoothing: antialiased;
      line-height: 1.5;
    }
    a { color: var(--accent); text-decoration: none; }
    .ver-galeria-link {
      font-size: 11px;
      text-transform: none;
      letter-spacing: 0;
      background: rgba(245,166,35,.12);
      border: 1px solid rgba(245,166,35,.35);
      padding: 4px 10px;
      border-radius: 999px;
      color: var(--accent);
      font-weight: 700;
      transition: all .15s;
    }
    .ver-galeria-link:hover {
      background: rgba(245,166,35,.22);
      border-color: var(--accent);
      color: var(--accent-2);
    }
    code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; padding: 2px 6px; background: var(--card-2); border-radius: 4px; border: 1px solid var(--line); }

    /* === Layout === */
    main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }
    .section-title {
      margin: 32px 0 12px; font-size: 12px; color: var(--muted);
      text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700;
      display: flex; align-items: center; gap: 10px;
    }
    .section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

    /* === Tabs === */
    .tabs {
      display: flex; gap: 4px; margin: 24px 0 0; border-bottom: 1px solid var(--line);
    }
    .tab {
      padding: 11px 20px; font-size: 13px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 1px; color: var(--muted); cursor: pointer; border-radius: 8px 8px 0 0;
      border: 1px solid transparent; border-bottom: none; transition: all .15s;
    }
    .tab:hover { color: var(--t); }
    .tab.active { color: var(--accent); background: var(--card); border-color: var(--line); border-bottom-color: transparent; }
    .tab-pane { display: none; }
    .tab-pane.active { display: block; }

    .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    @media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

    /* === Como funciona === */
    .how-it-works {
      display: grid;
      grid-template-columns: 1fr auto 1fr auto 1fr;
      gap: 12px;
      align-items: stretch;
      margin-top: 12px;
    }
    .hiw-step {
      background: linear-gradient(180deg, var(--card), var(--card-2));
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 22px 20px;
      text-align: center;
      position: relative;
      transition: transform .15s, border-color .15s;
    }
    .hiw-step:hover { transform: translateY(-2px); border-color: #34405a; }
    .hiw-num {
      position: absolute;
      top: -12px;
      left: 50%;
      transform: translateX(-50%);
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: #111;
      font-weight: 800;
      font-size: 12px;
      display: grid;
      place-items: center;
      box-shadow: 0 4px 10px rgba(245,166,35,.35);
    }
    .hiw-icon {
      width: 52px;
      height: 52px;
      border-radius: 14px;
      margin: 4px auto 12px;
      background: rgba(245,166,35,.12);
      display: grid;
      place-items: center;
      color: var(--accent);
    }
    .hiw-step h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
    .hiw-step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
    .hiw-arrow {
      display: grid;
      place-items: center;
      color: var(--muted-2);
      flex-shrink: 0;
    }
    @media (max-width: 800px) {
      .how-it-works {
        grid-template-columns: 1fr;
        gap: 18px;
      }
      .hiw-arrow { transform: rotate(90deg); }
      .hiw-step { padding: 20px 16px; }
    }

    /* === Upload === */
    .upload {
      background: linear-gradient(180deg, var(--card), var(--card-2));
      border: 1px dashed #2f3a4a; border-radius: var(--radius);
      padding: 48px 28px; text-align: center; position: relative; overflow: hidden;
      transition: border-color .2s, transform .15s;
    }
    .upload:hover { border-color: var(--accent); }
    .upload.drag { border-color: var(--accent); background: linear-gradient(180deg, rgba(245,166,35,.06), var(--card-2)); }
    .upload-icon {
      width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px;
      background: rgba(245,166,35,.12); display: grid; place-items: center; color: var(--accent);
    }
    .upload h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
    .upload p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
    .file-input-wrap { position: relative; display: inline-block; }
    .upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
    .file-pill {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 8px 14px; border-radius: 999px;
      background: var(--card-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
    }
    .file-pill.has-file { color: var(--t); border-color: var(--accent); }
    .file-pill .name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* === Reportar erro (botao no canto da caixa de upload + modal) === */
    .report-error { position: absolute; top: 12px; right: 12px; z-index: 5; }
    .report-error-btn {
      background: var(--card-2); color: var(--muted); border: 1px solid var(--line);
      box-shadow: none; padding: 6px 12px; font-size: 12px; font-weight: 600; border-radius: 999px;
    }
    .report-error-btn:hover:not(:disabled) {
      transform: none; box-shadow: none; border-color: var(--accent); color: var(--accent);
    }
    .report-error-modal { max-width: 420px; }
    .report-error-modal textarea:focus { border-color: var(--accent); }
    .report-error-files { font-size: 11px; color: var(--muted-2); margin-top: 6px; min-height: 14px; }
    .report-error-status { min-height: 16px; }
    .report-error-status.err { color: var(--bad); }
    .report-error-status.ok { color: var(--good); }

    /* === Buttons === */
    button {
      background: linear-gradient(180deg, var(--accent), var(--accent-2));
      color: #111; border: 0; padding: 10px 18px; border-radius: 10px;
      font-weight: 700; font-size: 14px; cursor: pointer;
      transition: transform .1s, box-shadow .15s, opacity .15s;
      display: inline-flex; align-items: center; gap: 8px;
      box-shadow: 0 4px 14px rgba(245,166,35,.25);
    }
    button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(245,166,35,.35); }
    button:active:not(:disabled) { transform: translateY(0); }
    button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
    button.secondary { background: var(--card-2); color: var(--t); box-shadow: none; border: 1px solid var(--line); }
    button.secondary:hover:not(:disabled) { border-color: var(--accent); }
    button.ghost { background: transparent; color: var(--muted); box-shadow: none; padding: 6px 10px; font-size: 12px; }
    button.ghost:hover:not(:disabled) { color: var(--t); }

    /* === Status === */
    .status { margin-top: 12px; color: var(--muted); min-height: 20px; font-size: 13px; }
    .status .err { color: var(--bad); }
    .status .ok { color: var(--good); }
    /* Servico ocupado (worker offline): pedido aceito e enfileirado (202). */
    .status .warn { color: #f0b429; }
    .spinner {
      width: 14px; height: 14px; border-radius: 50%;
      border: 2px solid rgba(245,166,35,.3); border-top-color: var(--accent);
      animation: spin .8s linear infinite; display: inline-block; vertical-align: -2px; margin-right: 6px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .progress-wrap { width: 100%; max-width: 400px; margin: 12px auto 0; display: none; }
    .progress-bar { height: 6px; background: #2c3440; border-radius: 4px; overflow: hidden; }
    .progress-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; transition: width .15s; width: 0%; }
    .progress-text { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }
    .progress-cancel { display: block; margin: 8px auto 0; font-size: 12px; padding: 5px 12px; }
    .progress-cancel[hidden] { display: none; }
    .progress-hint { font-size: 11px; color: var(--muted-2); margin-top: 6px; text-align: center; }

    /* Resultado da analise: aparece logo abaixo do upload */
    #results { margin-top: 24px; scroll-margin-top: 96px; }
    #results .section-title { margin-top: 20px; }

    /* === Stat cards === */
    .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 4px; }
    .stat {
      background: linear-gradient(180deg, var(--card), var(--card-2));
      border: 1px solid var(--line); border-radius: var(--radius);
      padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
      transition: transform .15s, border-color .15s;
    }
    .stat:hover { transform: translateY(-2px); border-color: #34405a; }
    .stat .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
    .stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
    .stat .icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(245,166,35,.12); color: var(--accent); margin-bottom: 4px; }

    /* === Highlight controls === */
    .hl-bar {
      background: linear-gradient(180deg, var(--card), var(--card-2));
      border: 1px solid var(--line); border-radius: var(--radius);
      padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    }
    .hl-bar .label { color: var(--muted); font-size: 13px; }
    select {
      background: var(--card-2); color: var(--t); border: 1px solid var(--line);
      border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit;
      min-width: 180px; cursor: pointer;
    }
    select:focus { outline: none; border-color: var(--accent); }
    select:disabled { opacity: .5; cursor: not-allowed; }
    .wm-input {
      background: var(--card-2); color: var(--t); border: 1px solid var(--line);
      border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit;
      min-width: 200px; width: 100%; max-width: 260px;
    }
    .wm-input:focus { outline: none; border-color: var(--accent); }
    .hl-bar .spacer { flex: 1; }
    .hl-hint { color: var(--muted-2); font-size: 12px; width: 100%; }

    /* === Clips grid === */
    .clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
    .clip {
      background: linear-gradient(180deg, var(--card), var(--card-2));
      border: 1px solid var(--line); border-radius: var(--radius);
      padding: 16px; display: flex; flex-direction: column; gap: 10px;
      transition: transform .15s, border-color .15s;
    }
    .clip:hover { transform: translateY(-2px); border-color: #34405a; }
    .clip-head { display: flex; align-items: center; gap: 8px; }
    .clip-num { width: 32px; height: 32px; border-radius: 8px; background: rgba(245,166,35,.15); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
    .clip-meta { flex: 1; min-width: 0; }
    .clip-meta .round { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
    .clip-meta .type { font-weight: 700; font-size: 15px; }
    .badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 700; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
    .badge.akill { background: rgba(74,222,128,.12); color: var(--good); border-color: rgba(74,222,128,.3); }
    .badge.multi { background: rgba(245,166,35,.15); color: var(--accent); border-color: rgba(245,166,35,.3); }
    .clip ul { margin: 0; padding-left: 18px; font-size: 13px; color: #cbd2dd; }
    .clip ul li { margin: 2px 0; }
    .clip .hs { color: var(--accent); font-weight: 700; }
    .clip-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
    .clip-foot .ticks { font-size: 11px; color: var(--muted-2); font-family: ui-monospace, monospace; }
    .clip-empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
    .clip { cursor: pointer; user-select: none; }
    .clip.checked { border-color: rgba(74,222,128,.5); box-shadow: 0 0 0 1px rgba(74,222,128,.35); }
    .clip-check { position: relative; display: inline-block; width: 22px; height: 22px; flex: 0 0 22px; }
    .clip-check input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
    .clip-check span { position: absolute; inset: 0; border: 2px solid #3a4557; border-radius: 6px; background: var(--card-2); transition: all .12s; }
    .clip-check input:checked + span { background: var(--good); border-color: var(--good); }
    .clip-check input:checked + span::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #08111f; border-width: 0 2px 2px 0; transform: rotate(45deg); }
    button#btnGenVideo:disabled { opacity: .45; cursor: not-allowed; }
    /* Multi-selecao: contador + "selecionar todos" na barra de highlights. */
    .hl-hint .link-btn { background: none; border: 0; padding: 0; margin-left: 6px; color: var(--accent); font-size: 12px; font-family: inherit; cursor: pointer; text-decoration: underline; }
    .hl-hint .link-btn:hover { color: #ffc46b; }
    .hl-hint .hl-pick { display: block; margin-top: 2px; color: var(--muted); }

    /* === Tables === */
    .table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
    .scroll { max-height: 360px; overflow: auto; }
    /* A barra das tabelas herda o estilo global de base.css. */
    table { width: 100%; border-collapse: collapse; }
    th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
    th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: var(--card-2); position: sticky; top: 0; }
    tr:last-child td { border-bottom: 0; }
    tr:hover td { background: rgba(255,255,255,.02); }
    .bar { height: 6px; background: #2c3440; border-radius: 4px; overflow: hidden; min-width: 80px; }
    .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; }
    .rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-weight: 800; font-size: 12px; background: var(--card-2); color: var(--muted); }
    .rank.top1 { background: linear-gradient(135deg, #ffd86b, #f5a623); color: #111; box-shadow: 0 4px 12px rgba(245,166,35,.3); }
    .rank.top2 { background: linear-gradient(135deg, #d8dde4, #a4abb5); color: #111; }
    .rank.top3 { background: linear-gradient(135deg, #d4925a, #a05c2c); color: #111; }
    .player-cell { display: flex; align-items: center; gap: 10px; }
    .avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #2c3440, #1c2330); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--accent); border: 1px solid var(--line); }
    .hs-cell { font-weight: 700; }
    .hs-cell.high { color: var(--accent); }
    .hs-cell.low { color: var(--muted); }

    /* === Event pills === */
    .event-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
    .event-pill.planted { background: rgba(96,165,250,.15); color: var(--info); }
    .event-pill.defused { background: rgba(74,222,128,.15); color: var(--good); }
    .event-pill.exploded { background: rgba(255,107,107,.15); color: var(--bad); }
    .side-tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .5px; }
    .side-tag.CT { background: rgba(245,166,35,.15); color: var(--accent); }
    .side-tag.T { background: rgba(96,165,250,.15); color: var(--info); }

    /* === Console log === */
    .console { margin-top: 14px; background: #06080c; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
    .console-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: #0a0d12; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
    .console-head .lights { display: flex; gap: 6px; }
    .console-head .lights span { width: 10px; height: 10px; border-radius: 50%; }
    .console-head .lights .r { background: #ff5f57; }
    .console-head .lights .y { background: #febc2e; }
    .console-head .lights .g { background: #28c840; }
    .console-body { padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #c8d0dc; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

    /* === Round timeline === */
    .round-timeline { display: flex; flex-wrap: wrap; gap: 4px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
    .round-cell { width: 38px; height: 58px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #111; position: relative; cursor: default; transition: transform .1s; }
    .round-cell:hover { transform: translateY(-2px); }
    .round-cell .rn { font-size: 10px; opacity: .8; }
    .round-cell.CT { background: linear-gradient(135deg, #f5a623, #ff7b00); }
    .round-cell.T { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; }
    .round-cell .dur { font-size: 8px; opacity: .6; margin-top: 1px; font-variant-numeric: tabular-nums; }
    .round-cell .reason { font-size: 8px; opacity: .65; margin-top: 1px; }
    .round-cell.pistol::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
    .timeline-legend { display: flex; gap: 16px; padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
    .timeline-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

    /* === Notes === */
    .notes { background: linear-gradient(180deg, rgba(245,166,35,.06), var(--card)); border: 1px solid rgba(245,166,35,.3); border-radius: var(--radius); padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
    .notes .title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
    .notes ul { margin: 0; padding-left: 22px; color: #cbd2dd; font-size: 14px; }
    .notes li { margin: 4px 0; }

    /* === Top plays === */
    .top-plays { display: flex; flex-direction: column; gap: 8px; }
    .play { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
    .play .icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: rgba(245,166,35,.15); color: var(--accent); font-weight: 800; flex-shrink: 0; }
    .play .info { flex: 1; min-width: 0; }
    .play .info .l1 { font-weight: 700; font-size: 14px; }
    .play .info .l2 { color: var(--muted); font-size: 12px; }
    .play .tags { display: flex; gap: 4px; flex-wrap: wrap; }
    .play .tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
    .play .tag.hs { background: rgba(245,166,35,.15); color: var(--accent); border-color: rgba(245,166,35,.3); }
    .play .tag.noscope { background: rgba(96,165,250,.15); color: var(--info); border-color: rgba(96,165,250,.3); }
    .play .tag.smoke { background: rgba(160,160,160,.15); color: #cbd2dd; border-color: rgba(160,160,160,.3); }
    .play .tag.flash { background: rgba(255,235,59,.15); color: #fde047; border-color: rgba(255,235,59,.3); }

    /* === Charts === */
    .chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
    .chart-card h3 { margin: 0 0 12px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
    .chart-card canvas { display: block; max-width: 100%; }

    /* === Galeria de highlights === */
    .gallery-bar { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
    .gallery-bar .count { color: var(--muted); font-size: 13px; }
    .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 12px; }

    /* === Destaques da home (Pro / Mais acessados) === */
    .featured-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .feat-badge {
      display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
      padding: 3px 8px; border-radius: 999px; vertical-align: middle;
      background: rgba(245,166,35,.15); color: var(--accent); border: 1px solid rgba(245,166,35,.3);
      text-decoration: none; transition: all .15s;
    }
    /* O badge "Oficiais" da secao Pro e link pra galeria ja filtrada. */
    a.feat-badge:hover { background: rgba(245,166,35,.25); border-color: var(--accent); color: var(--accent-2); }
    .views-badge {
      position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px;
      background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-weight: 700;
      padding: 3px 8px; border-radius: 999px; pointer-events: none;
    }
    .g-card { background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
    .g-card video { width: 100%; aspect-ratio: 16/9; background: #000; display: block; }
    .g-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
    .g-name { font-size: 13px; font-weight: 700; word-break: break-word; }
    /* Titulo do card e link para a pagina de detalhes (/watch/<arquivo>) */
    .g-name a { color: inherit; text-decoration: none; }
    .g-name a:hover { color: var(--accent); text-decoration: underline; }
    /* Dono do video: conta que enviou a demo (nome antes do '@' do email) */
    .g-owner { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--accent); font-weight: 700; min-width: 0; }
    .g-owner svg { flex-shrink: 0; opacity: .8; }
    .g-owner .g-owner-label { color: var(--muted); font-weight: 500; flex-shrink: 0; }
    .g-owner .g-owner-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gallery-empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
    /* Esconde o botao de menu (3 pontos) do player nativo nos cards */
    .g-card video::-webkit-media-controls-overflow-button { display: none !important; }
    /* Home: highlights recentes menores + espaço antes do upload */
    #recentWrap .gallery-grid {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      margin-top: 4px;
      margin-bottom: 32px;
    }
    #recentWrap .section-title { margin-bottom: 6px; }

    /* O painel unico do Top 10 (duas listas lado a lado) e os contadores/selos
       dos usuarios ficam em public/css/top10.css. */

    .filter-bar {
      display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap;
    }
    .filter-bar .spacer { flex: 1; }
    .filter-bar input[type=search] {
      background: var(--card-2); color: var(--t); border: 1px solid var(--line);
      border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit;
      min-width: 200px; width: 100%; max-width: 280px;
    }
    .filter-bar input[type=search]:focus { outline: none; border-color: var(--accent); }
    .filter-bar select {
      background: var(--card-2); color: var(--t); border: 1px solid var(--line);
      border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit;
      min-width: 120px; cursor: pointer;
    }
    .filter-bar select:focus { outline: none; border-color: var(--accent); }
    .pagination {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      margin-top: 32px; flex-wrap: wrap;
    }
    .pagination button {
      background: var(--card-2); color: var(--t); border: 1px solid var(--line);
      box-shadow: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 13px;
    }
    .pagination button:hover:not(:disabled) { border-color: var(--accent); }
    .pagination button:disabled { opacity: .4; cursor: not-allowed; }
    .pagination .page-info { color: var(--muted); font-size: 13px; padding: 0 8px; }

    .hidden { display: none; }

    /* === Video Player === */
    .video-player {
      margin-top: 14px;
      background: linear-gradient(180deg, var(--card), var(--card-2));
      border: 1px solid rgba(74,222,128,.3);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: 0 8px 30px rgba(0,0,0,.4);
    }
    .video-player video {
      display: block;
      width: 100%;
      max-height: 70vh;
      background: #000;
    }
    .video-player-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 18px;
      background: var(--card-2);
      border-top: 1px solid var(--line);
    }
    .video-player-actions .vp-title {
      flex: 1;
      font-size: 13px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .video-player-actions .vp-title strong {
      color: var(--good);
    }

    /* === Resultados do lote (1 video por round) === */
    .video-results {
      margin-top: 14px;
      background: linear-gradient(180deg, var(--card), var(--card-2));
      border: 1px solid rgba(74,222,128,.3);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: 0 8px 30px rgba(0,0,0,.4);
    }
    .vr-head { padding: 14px 18px; background: var(--card-2); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
    .vr-head strong { color: var(--good); }
    .video-results ul { list-style: none; margin: 0; padding: 0; }
    .vr-item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
    .vr-item:last-child { border-bottom: 0; }
    .vr-thumb { width: 148px; flex: 0 0 148px; }
    .vr-thumb .g-media { border-radius: 8px; }
    .vr-info { flex: 1; min-width: 0; }
    .vr-round { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; }
    .vr-name { display: block; font-size: 13px; color: var(--t); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .vr-name:hover { color: var(--accent); }
    .vr-msg { font-size: 13px; color: var(--bad); }
    .vr-item.vr-err { border-left: 3px solid var(--bad); }
    .vr-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
    .vr-btn {
      display: inline-block; padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
      background: var(--accent); color: #101216; text-decoration: none;
    }
    .vr-btn:hover { filter: brightness(1.08); }

    /* === Responsive === */
    @media (max-width: 640px) {
      main { padding: 20px 14px 60px; }
      .upload { padding: 32px 18px; }
      .hl-bar { flex-direction: column; align-items: stretch; }
      .hl-bar .spacer { display: none; }
      select { width: 100%; }
      .vr-item { flex-wrap: wrap; }
      .vr-thumb { width: 100%; flex: 1 1 100%; }
      .vr-actions { justify-content: flex-start; }
    }
  

    .modal {
      display:none;position:fixed;inset:0;background:rgba(0,0,0,.65);z-index:100;align-items:center;justify-content:center;padding:24px;
    }
    .modal.show { display:flex; }
    .modal-content {
      background:linear-gradient(180deg, var(--card), var(--card-2));border:1px solid var(--line);border-radius:var(--radius);padding:24px;width:100%;max-width:380px;box-shadow:var(--shadow);position:relative;
    }
    input {
      width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line);
      border-radius: 10px; color: var(--t); font-size: 14px; outline: none;
    }
    input:focus { border-color: var(--accent); }
    button.link-btn {
      background:none;border:none;color:var(--accent);cursor:pointer;font-weight:700;padding:0;font-size:12px;
    }
    button.link-btn:hover { text-decoration:underline; }
    button.icon-btn {
      background: var(--card-2); border: 1px solid var(--line); color: var(--t); width: 32px; height: 32px;
      border-radius: 8px; cursor: pointer; font-size: 16px;
    }
    button.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
    .err { color: var(--bad); font-size: 13px; margin-top: 10px; text-align: center; }
    .ok { color: var(--good); font-size: 13px; margin-top: 10px; text-align: center; }
