/* Pythera TV (16/10): "YouTube dos jogadores", na paleta escura e dourada do site. */
:root {
  --tv-accent: #e0b95a;
  --tv-accent-2: #9d7529;
  --tv-panel: #0d1118;
  --tv-panel-2: #141a23;
  --tv-border: #303a48;
  --tv-copy: #d9dee6;
  --tv-muted: #9099a7;
  --tv-red: #c8463c;
}

body { background: linear-gradient(#080b10, #05070a 70%); color: var(--tv-copy); }

/* topo: marca, busca, postar */
.tv-topo { position: sticky; top: 0; z-index: 5; display: flex; gap: 14px; align-items: center; max-width: 1280px; margin: 0 auto; padding: 12px 16px; box-sizing: border-box; background: rgba(8, 11, 16, .94); border-bottom: 1px solid var(--tv-border); }
.tv-marca { font: bold 20px Georgia, serif; letter-spacing: .06em; color: var(--tv-accent); text-decoration: none; white-space: nowrap; }
.tv-marca span { color: #fff; background: var(--tv-red); padding: 0 .3em; border-radius: 4px; margin-left: .1em; }
.tv-busca { flex: 1; display: flex; max-width: 560px; margin: 0 auto; }
.tv-busca input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--tv-border); border-right: 0; border-radius: 20px 0 0 20px; background: #090d12; color: var(--tv-copy); font: inherit; }
.tv-busca button { padding: 0 16px; border: 1px solid var(--tv-border); border-radius: 0 20px 20px 0; background: var(--tv-panel-2); color: var(--tv-copy); cursor: pointer; }
@media (max-width: 640px) { .tv-topo { flex-wrap: wrap; } .tv-busca { order: 3; flex-basis: 100%; max-width: none; } }

.tv-shell { max-width: 1280px; margin: 0 auto; padding: 16px 16px 40px; box-sizing: border-box; }
.tv-card { background: var(--tv-panel); border: 1px solid var(--tv-border); border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.tv-card h1 { margin: 0; font-size: 22px; color: var(--tv-accent); }
.tv-card h2 { margin: 0 0 10px; font-size: 16px; color: var(--tv-accent); }
.tv-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tv-title-row a:not(.tv-btn) { color: var(--tv-muted); }
.tv-sec { margin: 22px 0 12px; font-size: 19px; color: #f1e6c8; }
.tv-sec-box { margin-bottom: 8px; }

.tv-btn { display: inline-block; padding: 8px 16px; border: 1px solid var(--tv-accent-2); border-radius: 18px; background: linear-gradient(#2a2416, #17140d); color: var(--tv-accent); font: inherit; font-weight: bold; text-decoration: none; cursor: pointer; white-space: nowrap; }
.tv-btn:hover { border-color: var(--tv-accent); color: #fff3cf; }
.tv-btn-alt { background: var(--tv-panel-2); border-color: var(--tv-border); color: var(--tv-copy); }
.tv-btn-on { background: #3a2f12; border-color: var(--tv-accent); color: #fff3cf; }
.tv-btn-sub { background: #e9e3d3; border-color: #e9e3d3; color: #111; }
.tv-btn-sub:hover { color: #000; background: #fff; }
.tv-btn[disabled] { opacity: .6; cursor: wait; }
.tv-link { background: none; border: 0; padding: 0; color: var(--tv-muted); text-decoration: underline; cursor: pointer; font: inherit; }
.tv-inline { display: inline; margin: 0; }

.tv-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; }
.tv-cats a { padding: 6px 12px; border-radius: 8px; background: var(--tv-panel-2); color: var(--tv-copy); text-decoration: none; font-size: 14px; white-space: nowrap; }
.tv-cats a[aria-current="page"] { background: #e9e3d3; color: #111; }

/* grade de vídeos */
.tv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 16px; }
.tv-card-video { min-width: 0; }
.tv-capa { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--tv-panel-2); }
.tv-capa img { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: pixelated; }
.tv-capa:hover img { filter: brightness(1.1); }
.tv-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .82); color: #fff; font-size: 12px; font-weight: bold; }
.tv-dur-live { background: var(--tv-red); }
.tv-card-info { display: grid; gap: 2px; padding-top: 8px; }
.tv-card-title { color: #f1e6c8; font-weight: bold; text-decoration: none; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-card-chan { color: var(--tv-muted); font-size: 13px; text-decoration: none; }
.tv-card-chan:hover { color: var(--tv-copy); }
.tv-card-meta, .tv-meta { color: var(--tv-muted); font-size: 13px; }
.tv-meta a { color: var(--tv-accent); }
.tv-why { color: var(--tv-accent); font-size: 12px; }

/* capa gerada quando o vídeo não tem print: cor por categoria */
.tv-capa-gerada { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 14px; box-sizing: border-box; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); background: linear-gradient(135deg, #3a4558, #11161f); }
.tv-capa-gerada b { font-size: 18px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tv-capa-gerada small { opacity: .85; }
.tv-cat-hunt { background: linear-gradient(135deg, #3f6b2c, #10200c); }
.tv-cat-quest { background: linear-gradient(135deg, #7a5a1c, #241806); }
.tv-cat-pvp { background: linear-gradient(135deg, #8a2620, #250807); }
.tv-cat-boss { background: linear-gradient(135deg, #5b2a7a, #170923); }
.tv-cat-death { background: linear-gradient(135deg, #4b4f57, #0c0d10); }
.tv-cat-funny { background: linear-gradient(135deg, #2a6f80, #08202a); }
.tv-cat-tutorial { background: linear-gradient(135deg, #2b4f8a, #0a1426); }
.tv-cat-live { background: linear-gradient(135deg, #a32d24, #2a0907); }
.tv-capa-live { background: linear-gradient(135deg, #a32d24, #2a0907); }

/* página do vídeo */
.tv-watch { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .tv-watch { grid-template-columns: 1fr; } }
.tv-player-capa { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #000; }
.tv-player-capa img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; opacity: .75; }
.tv-player-capa .tv-capa-gerada { opacity: .8; }
.tv-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; background: rgba(200, 70, 60, .92); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; padding-left: 6px; box-sizing: border-box; }
.tv-play-label { position: absolute; left: 50%; top: calc(50% + 58px); transform: translateX(-50%); color: #fff; font-weight: bold; text-shadow: 0 2px 6px #000; }
.tv-player-capa:hover .tv-play { background: #e0574b; }
.tv-watch-title { margin: 14px 0 10px; font-size: 21px; color: #f1e6c8; }
.tv-watch-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tv-chan-mini { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tv-chan-mini small { display: block; color: var(--tv-muted); font-size: 12px; }
.tv-chan-name { color: #f1e6c8; font-weight: bold; text-decoration: none; }
.tv-acoes { display: flex; gap: 8px; }
.tv-subs-count { color: var(--tv-muted); font-size: 13px; }
.tv-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--tv-accent), var(--tv-accent-2)); color: #1a1408; font-weight: bold; font-size: 18px; text-decoration: none; }
.tv-avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.tv-avatar-lg { width: 88px; height: 88px; font-size: 38px; }
.tv-desc-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--tv-panel-2); line-height: 1.5; }
.tv-desc-box p { margin: 6px 0 0; }
.tv-help { margin-top: 8px; }
.tv-help summary, .tv-report summary { cursor: pointer; color: var(--tv-accent); }
.tv-help ol { margin: 8px 0 0; }
.tv-watch-side h2 { margin: 0 0 10px; font-size: 16px; color: #f1e6c8; }
.tv-lista-lado { display: grid; gap: 12px; }
.tv-lista-lado .tv-card-video { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px; }
.tv-lista-lado .tv-card-info { padding-top: 0; }
.tv-lista-lado .tv-capa-gerada b { font-size: 13px; }
.tv-lista-lado .tv-capa-gerada { padding: 8px; }

.tv-comments { margin-top: 22px; }
.tv-comments h2 { font-size: 17px; color: #f1e6c8; }
.tv-comment-form { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; margin-bottom: 18px; }
@media (max-width: 640px) { .tv-comment-form { grid-template-columns: 1fr; } }
.tv-comment-form select, .tv-comment-form textarea { padding: 8px 10px; background: #090d12; border: 1px solid var(--tv-border); border-radius: 6px; color: var(--tv-copy); font: inherit; }
.tv-comments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.tv-comments li { display: flex; gap: 10px; }
.tv-comments li p { margin: 4px 0; line-height: 1.45; overflow-wrap: anywhere; }
.tv-comments small { color: var(--tv-muted); }

/* canal */
.tv-canal-topo { display: flex; gap: 20px; align-items: center; padding: 22px 0 16px; border-bottom: 1px solid var(--tv-border); margin-bottom: 14px; flex-wrap: wrap; }
.tv-canal-topo h1 { margin: 0 0 4px; font-size: 26px; color: #f1e6c8; }
.tv-canal-topo .tv-meta { margin: 0 0 10px; }

.tv-tag { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--tv-panel-2); border: 1px solid var(--tv-border); color: var(--tv-muted); font-size: 12px; text-decoration: none; }
.tv-tag-live { background: var(--tv-red); border-color: var(--tv-red); color: #fff; font-weight: bold; }
.tv-live-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--tv-red); box-shadow: 0 0 0 0 rgba(200, 70, 60, .7); animation: tv-pulse 1.6s infinite; vertical-align: middle; }
@keyframes tv-pulse { 70% { box-shadow: 0 0 0 10px rgba(200, 70, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 70, 60, 0); } }
@media (prefers-reduced-motion: reduce) { .tv-live-dot { animation: none; } }

.tv-empty { padding: 28px; text-align: center; color: var(--tv-muted); border: 1px dashed var(--tv-border); border-radius: 10px; }
.tv-empty h2 { color: var(--tv-copy); margin-top: 0; }

.tv-form { display: grid; gap: 4px; max-width: 620px; }
.tv-form input:not([type]), .tv-form select, .tv-form textarea, .tv-report input, .tv-report select { width: 100%; box-sizing: border-box; padding: 8px 10px; background: #090d12; border: 1px solid var(--tv-border); border-radius: 5px; color: var(--tv-copy); font: inherit; }
.tv-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; line-height: 1.4; }
.tv-check input { margin-top: 3px; }
.tv-form .hint { color: var(--tv-muted); font-size: 13px; margin-top: 4px; }
.tv-moderation { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; border-top: 1px solid var(--tv-border); padding-top: 12px; margin-top: 18px; }
.tv-moderation form { margin: 0; }
.tv-report form { display: grid; gap: 6px; margin-top: 8px; min-width: 260px; }
.tv-reports { margin-top: 14px; padding: 12px; border: 1px solid var(--tv-red); border-radius: 6px; }
.tv-player-capa .tv-capa-gerada b, .tv-player-capa .tv-capa-gerada small { display: none; }
.tv-cats { scrollbar-width: none; } .tv-cats::-webkit-scrollbar { display: none; }

/* fazer live */
.tv-btn-live { background: linear-gradient(#a32d24, #6b1a14); border-color: var(--tv-red); color: #fff; }
.tv-btn-live:hover { color: #fff; border-color: #ff8a7a; }
.tv-atraso { border: 1px solid var(--tv-border); border-radius: 8px; padding: 10px 14px; margin: 8px 0; display: grid; gap: 6px; }
.tv-atraso legend { color: var(--tv-copy); padding: 0 6px; }
.tv-atraso .hint { color: var(--tv-muted); font-size: 13px; }
.tv-live-status { display: grid; gap: 10px; max-width: 640px; }
.tv-live-status h2 { margin: 0; font-size: 19px; color: #f1e6c8; }
.tv-live-status p { margin: 0; line-height: 1.5; }
.tv-live-status form { margin: 6px 0 0; }
/* 20/10: live automatica no tv.php?live=1 */
.tv-auto { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--tv-border); }
.tv-auto h2 { margin: 0 0 6px; }
.tv-auto > p { color: var(--tv-muted); margin: 0 0 12px; max-width: 620px; }
.tv-auto-char { border: 1px solid var(--tv-border); border-radius: 8px; padding: 6px 14px 10px; margin: 0 0 12px; }
.tv-auto-char legend { padding: 0 6px; font-weight: 700; }
.tv-auto-char .tv-check { margin: 6px 0; }
.tv-chave b { color: #ff5a5a; }
