:root {
    color-scheme: dark;
    --bg: #000000;
    --panel: #041008;
    --panel-2: #07180d;
    --text: #e6ffeb;
    --muted: #79a985;
    --accent: #00ff41;
    --accent-strong: #00d936;
    --accent-soft: rgba(0,255,65,.14);
    --line: rgba(0,255,65,.20);
    --shadow: 0 18px 50px rgba(0,0,0,.58), 0 0 30px rgba(0,255,65,.04);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(0,255,65,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,65,.012) 1px, transparent 1px),
        var(--bg);
    background-size: 34px 34px, 34px 34px, auto;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }


/* Nome do app centralizado em todas as páginas */
.center-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    max-width: calc(100% - 190px);
    white-space: nowrap;
    pointer-events: auto;
}
.app-name-center {
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 950;
    letter-spacing: .15em;
    font-size: clamp(1.55rem, 3.4vw, 2.35rem);
    line-height: .92;
    text-shadow: 0 0 7px rgba(0,255,65,.72), 0 0 18px rgba(0,255,65,.28);
}
.page-name-center {
    color: #77ff98;
    font-size: clamp(.53rem, 1vw, .68rem);
    font-weight: 800;
    letter-spacing: .22em;
    line-height: 1;
    text-transform: uppercase;
    opacity: .82;
}
.topbar .topnav { margin-left: auto; }
.stream-header > .menu-trigger,
.stream-header > .header-actions,
.watch-top > .back-button,
.topbar > .topnav {
    position: relative;
    z-index: 5;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 68px;
    padding: 0 4vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(0,8,2,.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0,255,65,.12);
}
.brand {
    color: var(--accent);
    font-weight: 950;
    letter-spacing: .045em;
    font-size: clamp(1rem, 2.2vw, 1.42rem);
    white-space: nowrap;
}
.topnav { display: flex; align-items: center; gap: 8px; }
.topnav a {
    color: #9fdcab;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: .92rem;
}
.topnav a:hover, .topnav a.active { color: var(--accent); background: rgba(0,255,65,.09); }
.topnav .upload-link { background: var(--accent); color: #001605; box-shadow: 0 0 16px rgba(0,255,65,.22); }
.topnav .upload-link:hover, .topnav .upload-link.active { background: #37ff68; }

.catalog-page { min-height: calc(100vh - 68px); }
.hero {
    min-height: min(42vh, 430px);
    display: flex;
    align-items: flex-end;
    padding: 70px 4vw 52px;
    background:
        radial-gradient(circle at 78% 28%, rgba(0,255,65,.18), transparent 30%),
        linear-gradient(to bottom, #131313 0%, #0b0b0b 55%, var(--bg) 100%);
}
.hero-copy { max-width: 740px; }
.eyebrow {
    display: inline-block;
    color: #79ff9a;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.hero h1, .panel-head h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 4.4rem);
    line-height: .98;
    letter-spacing: -.045em;
}
.hero p, .panel-head p { color: var(--muted); max-width: 620px; line-height: 1.55; }

.catalog-section { padding: 4px 4vw 60px; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.search-box { width: min(320px, 44vw); }
.search-box input,
.field input,
.field textarea,
.speed-select {
    width: 100%;
    border: 1px solid var(--line);
    background: #031006;
    color: var(--text);
    outline: none;
    border-radius: 12px;
}
.search-box input { height: 42px; padding: 0 14px; }
.search-box input:focus, .field input:focus, .field textarea:focus { border-color: rgba(0,255,65,.85); box-shadow: 0 0 0 3px rgba(0,255,65,.12); }

.video-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}
.video-card { min-width: 0; }
.card-link { display: block; }
.poster-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 10px;
    background: #161616;
    box-shadow: 0 10px 26px rgba(0,0,0,.3);
    transition: transform .2s ease, box-shadow .2s ease;
}
.poster-wrap img { width: 100%; height: 100%; object-fit: cover; }
.poster-fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background:
        radial-gradient(circle at 25% 20%, rgba(0,255,65,.24), transparent 32%),
        linear-gradient(135deg, #262626, #080808);
    color: rgba(255,255,255,.58);
    font-size: 2rem;
}
.play-badge {
    position: absolute;
    inset: auto auto 12px 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding-left: 2px;
    background: rgba(0,0,0,.74);
    border: 1px solid rgba(255,255,255,.55);
    opacity: 0;
    transform: scale(.9);
    transition: .2s ease;
}
.video-card:hover .poster-wrap { transform: scale(1.035); box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.video-card:hover .play-badge { opacity: 1; transform: scale(1); }
.card-meta { padding: 10px 2px 0; }
.card-meta h3 { margin: 0 0 5px; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta p { color: var(--muted); margin: 0; font-size: .82rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.empty-state, .no-results {
    min-height: 310px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #0b0b0b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}
.empty-state h3 { margin: 8px 0 0; }
.empty-state p { color: var(--muted); }
.empty-icon { font-size: 2rem; color: var(--accent); }

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn:disabled { opacity: .55; cursor: wait; }
.primary-btn.full { width: 100%; min-height: 52px; }

.upload-page {
    min-height: calc(100vh - 68px);
    display: grid;
    place-items: center;
    padding: 34px 16px 60px;
    background: radial-gradient(circle at 50% 0%, rgba(0,255,65,.12), transparent 35%);
}
.upload-panel {
    width: min(720px, 100%);
    background: rgba(2,16,6,.92);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: clamp(22px, 4vw, 42px);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(0,255,65,.025);
}
.panel-head h1 { font-size: clamp(1.35rem, 3.4vw, 2rem); letter-spacing: -.015em; }
.panel-head p { margin-bottom: 28px; }
.field { display: block; margin: 0 0 18px; }
.field > span { display: block; font-size: .9rem; font-weight: 750; margin-bottom: 8px; }
.field small { color: var(--muted); font-weight: 500; }
.field input { height: 50px; padding: 0 14px; }
.field textarea { resize: vertical; min-height: 100px; padding: 14px; }
.file-drop {
    min-height: 150px;
    border: 1.5px dashed rgba(0,255,65,.28);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 22px;
    margin-bottom: 16px;
    background: #020b04;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.file-drop:hover { border-color: rgba(0,255,65,.8); background: #041408; box-shadow: inset 0 0 18px rgba(0,255,65,.04); }
.file-drop.compact { min-height: 112px; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-icon { font-size: 1.8rem; color: var(--accent); }
.file-drop small { color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
.form-message { margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(0,255,65,.10); color: #9cffb4; border: 1px solid rgba(0,255,65,.18); }
.form-message.error { background: rgba(255,70,70,.10); color: #ff9a9a; border-color: rgba(255,70,70,.22); }
.upload-progress { margin: 18px 0; }
.progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .88rem; }
.progress-track { height: 9px; border-radius: 999px; background: #0a1c0f; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .1s linear; }

.watch-body { overflow-x: hidden; background: #000; }
.watch-page { min-height: 100vh; background: #000; }
.watch-top {
    position: fixed;
    z-index: 25;
    top: 0; left: 0; right: 0;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    background: linear-gradient(to bottom, rgba(0,0,0,.82), transparent);
    pointer-events: none;
}
.back-button {
    pointer-events: auto;
    width: 42px; height: 42px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.15);
    font-size: 1.35rem;
}
.watch-title { font-weight: 800; text-shadow: 0 2px 10px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-shell {
    position: relative;
    width: 100%;
    max-height: 100vh;
    aspect-ratio: 16/9;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
    user-select: none;
}
.player-shell video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.player-shell:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; }
.player-shell:fullscreen video { width: 100%; height: 100%; }
.center-play {
    position: absolute;
    z-index: 5;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(68px, 8vw, 90px);
    height: clamp(68px, 8vw, 90px);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: var(--text);
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    padding-left: 7px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}
.center-play.hidden { opacity: 0; pointer-events: none; }
.player-controls {
    position: absolute;
    z-index: 10;
    left: 0; right: 0; bottom: 0;
    padding: 42px 18px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.94), transparent);
    opacity: 1;
    transition: opacity .22s ease;
}
.player-shell.controls-hidden .player-controls { opacity: 0; pointer-events: none; }
.seek-row { width: 100%; }
.seek-bar, .volume-bar { accent-color: var(--accent); cursor: pointer; }
.seek-bar { width: 100%; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; }
.control-group { display: flex; align-items: center; gap: 6px; min-width: 0; }
.icon-btn {
    width: 40px; height: 40px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.08rem;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }
.text-icon { font-size: .78rem; font-weight: 850; }
.volume-bar { width: 90px; }
.time-display { font-size: .82rem; color: #ddd; white-space: nowrap; }
.speed-select { width: auto; min-width: 68px; height: 36px; padding: 0 8px; border-radius: 8px; }
.watch-info { max-width: 1100px; margin: 0 auto; padding: 28px 4vw 60px; }
.watch-info h1 { margin: 0 0 12px; font-size: clamp(1.2rem, 3vw, 1.8rem); color: #caffd6; }
.watch-info p { color: #c4c4c4; line-height: 1.65; max-width: 850px; }
.not-found { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1200px) { .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) {
    .topbar { min-height: 60px; padding: 0 14px; }
    .topbar .topnav a:first-child { display: none; }
    .center-brand { max-width: calc(100% - 150px); gap: 2px; }
    .app-name-center { font-size: 1.35rem; letter-spacing: .12em; }
    .page-name-center { font-size: .48rem; letter-spacing: .18em; }
    .topnav a { padding: 9px 10px; font-size: .82rem; }
    .hero { min-height: 300px; padding: 54px 16px 34px; }
    .hero p { font-size: .93rem; }
    .catalog-section { padding: 4px 16px 42px; }
    .section-head { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card-meta h3 { font-size: .9rem; }
    .card-meta p { display: none; }
    .play-badge { opacity: 1; width: 32px; height: 32px; font-size: .8rem; bottom: 8px; left: 8px; }
    .upload-page { padding: 18px 10px 40px; align-items: start; }
    .upload-panel { border-radius: 18px; padding: 20px 14px; }
    .file-drop { min-height: 130px; }
    .watch-top { height: 58px; padding: 0 10px; }
    .back-button { width: 38px; height: 38px; }
    .player-shell { aspect-ratio: auto; height: min(56.25vw, 58vh); min-height: 230px; }
    .player-controls { padding: 36px 8px 7px; }
    .control-row { gap: 4px; }
    .icon-btn { width: 34px; height: 34px; font-size: .95rem; }
    .volume-bar { display: none; }
    .time-display { font-size: .68rem; }
    .speed-select { min-width: 58px; height: 32px; font-size: .75rem; padding: 0 5px; }
    .watch-info { padding: 22px 16px 50px; }
}

@media (max-width: 390px) {
    .brand { font-size: .9rem; }
    .topnav a:first-child { display: none; }
    .video-grid { gap: 10px; }
    .left-controls #back10, .left-controls #forward10 { display: none; }
    .time-display { max-width: 95px; overflow: hidden; text-overflow: ellipsis; }
}

/* =========================================================
   EGERSIS3 - catálogo responsivo com identidade Matrix
   ========================================================= */
.catalog-body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #000;
    color: var(--text);
}

.stream-header {
    position: sticky;
    top: 0;
    z-index: 80;
    height: 64px;
    padding: env(safe-area-inset-top) 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 5, 1, .985);
    border-bottom: 1px solid rgba(0,255,65,.10);
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b7ffc7;
    cursor: pointer;
}
.header-icon:active { background: rgba(0,255,65,.10); color: var(--accent); }
.header-icon svg,
.drawer-nav svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.profile-trigger {
    border: 1px solid rgba(0,255,65,.32);
    width: 36px;
    height: 36px;
}
.profile-trigger svg { width: 21px; height: 21px; }

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 89;
    background: rgba(0,0,0,.68);
    backdrop-filter: blur(2px);
}
.side-drawer {
    position: fixed;
    z-index: 90;
    inset: 0 auto 0 0;
    width: min(82vw, 320px);
    padding: max(18px, env(safe-area-inset-top)) 16px 22px;
    background: #020a04;
    border-right: 1px solid rgba(0,255,65,.16);
    transform: translateX(-102%);
    transition: transform .24s ease;
    box-shadow: 18px 0 60px rgba(0,0,0,.55);
}
.side-drawer.is-open { transform: translateX(0); }
.drawer-head {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 18px;
    border-bottom: 1px solid rgba(0,255,65,.12);
}
.drawer-head strong { font-size: 1.08rem; letter-spacing: .16em; color: var(--accent); text-shadow: 0 0 10px rgba(0,255,65,.30); }
.drawer-close {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.drawer-nav { padding-top: 14px; display: grid; gap: 4px; }
.drawer-nav a {
    min-height: 52px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-radius: 8px;
    color: #9fdcab;
    font-size: .96rem;
}
.drawer-nav a.active,
.drawer-nav a:hover { background: #151515; color: var(--text); }
.drawer-nav svg { width: 22px; height: 22px; }

.reference-catalog {
    width: 100%;
    min-height: calc(100vh - 64px);
    background: #000;
    padding: 22px 0 max(52px, env(safe-area-inset-bottom));
}
.video-shelf {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 20px 0 30px;
    background: #010703;
    border-top: 1px solid rgba(0,255,65,.05);
    border-bottom: 1px solid rgba(0,255,65,.06);
}
.shelf-head {
    padding: 0 clamp(18px, 4vw, 56px) 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.shelf-head h2 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(1.1rem, 2.8vw, 1.75rem);
    line-height: 1.03;
    font-weight: 420;
    letter-spacing: -.025em;
}
.shelf-arrows { display: flex; gap: 7px; flex: 0 0 auto; }
.shelf-arrow {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding: 0 0 3px;
    background: #39ff68;
    color: #001605;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: .95;
}
.shelf-arrow:disabled { opacity: .3; cursor: default; }

.portrait-track {
    --portrait-width: clamp(205px, 27vw, 335px);
    display: flex;
    gap: clamp(13px, 2vw, 24px);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 8px max(4vw, calc((100vw - min(100%, 1500px))/2 + 4vw)) 10px;
}
.portrait-track::-webkit-scrollbar { display: none; }
.portrait-card {
    flex: 0 0 var(--portrait-width);
    min-width: 0;
    scroll-snap-align: center;
    transform: scale(.965);
    opacity: .77;
    transition: transform .2s ease, opacity .2s ease;
}
.portrait-card.is-active { transform: scale(1); opacity: 1; }
.portrait-card a { display: block; }
.portrait-media {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #031006;
    border-radius: 3px;
    box-shadow: 0 12px 28px rgba(0,0,0,.52), 0 0 0 1px rgba(0,255,65,.05);
}
.portrait-media img { width: 100%; height: 100%; object-fit: cover; }
.portrait-media::after {
    content: '';
    position: absolute;
    inset: 60% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,.68));
    pointer-events: none;
}
.portrait-title {
    position: absolute;
    z-index: 2;
    left: 12px;
    right: 12px;
    bottom: 11px;
    color: rgba(255,255,255,.94);
    font-size: clamp(.73rem, 1.6vw, .92rem);
    font-weight: 650;
    line-height: 1.2;
    text-shadow: 0 1px 5px rgba(0,0,0,.95);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.portrait-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 24px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 36%, rgba(0,255,65,.11), transparent 28%),
        linear-gradient(150deg, #09220f, #010503 65%);
}
.fallback-name {
    max-width: 90%;
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
}
.fallback-play {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border: 1px solid rgba(0,255,65,.64);
    border-radius: 50%;
    font-size: 1.25rem;
}
.shelf-dots {
    min-height: 23px;
    padding-top: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.shelf-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #164f25;
    cursor: pointer;
    transition: width .18s ease, background .18s ease;
}
.shelf-dot.is-active { width: 9px; height: 9px; background: var(--accent); box-shadow: 0 0 9px rgba(0,255,65,.55); }

.reference-empty {
    min-height: calc(100vh - 120px);
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.reference-empty h1 {
    max-width: 520px;
    margin: 16px 0 6px;
    font-size: clamp(1.45rem, 5vw, 2.4rem);
    font-weight: 500;
}
.reference-empty p { margin: 0 0 24px; color: #75a981; }
.empty-film-icon {
    width: 72px; height: 72px;
    display: grid; place-items: center;
    border: 1px solid rgba(0,255,65,.45); border-radius: 50%;
    color: var(--accent); padding-left: 4px;
}
.reference-upload-btn {
    min-height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #001405;
    border-radius: 3px;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .06em;
}

@media (max-width: 700px) {
    .stream-header { height: 58px; padding-inline: 10px; }
    .reference-catalog { min-height: calc(100vh - 58px); padding-top: 10px; }
    .video-shelf { padding-top: 20px; }
    .shelf-head { padding: 0 18px 14px; }
    .shelf-head h2 { max-width: 72%; font-size: 1.1rem; }
    .shelf-arrow { width: 29px; height: 29px; font-size: 1.75rem; }
    .portrait-track {
        --portrait-width: min(70.5vw, 300px);
        gap: 13px;
        padding-left: calc((100vw - var(--portrait-width)) / 2);
        padding-right: calc((100vw - var(--portrait-width)) / 2);
    }
    .portrait-card { transform: scale(.94); opacity: .62; }
    .portrait-card.is-active { transform: scale(1); opacity: 1; }
    .portrait-media { border-radius: 2px; }
    .portrait-title { left: 10px; right: 10px; bottom: 9px; font-size: .78rem; }
}

@media (min-width: 701px) {
    .portrait-card:hover { transform: scale(1.018); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .portrait-track { scroll-behavior: auto; }
    .portrait-card,
    .side-drawer { transition: none; }
}

/* =========================================================
   EGERSIS4 - atualizações por ZIP + edição de vídeos
   ========================================================= */
.secondary-btn {
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid rgba(0,255,65,.38);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a9ffba;
    background: rgba(0,255,65,.055);
    font-weight: 750;
    cursor: pointer;
}
.secondary-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,255,65,.10); }
.secondary-back { position: relative; z-index: 5; flex: 0 0 auto; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 20px; }
.current-poster {
    margin: 0 0 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #020b04;
}
.current-poster img { width: 74px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; border: 1px solid rgba(0,255,65,.18); }
.current-poster > div { display: grid; gap: 9px; min-width: 0; }
.check-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .88rem; cursor: pointer; }
.check-line input { accent-color: var(--accent); }
.watch-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.watch-title-row h1 { flex: 1; min-width: 0; }
.edit-video-btn { flex: 0 0 auto; min-height: 38px; padding-inline: 13px; font-size: .82rem; }

.portrait-card { position: relative; }
.portrait-edit {
    position: absolute;
    z-index: 7;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    display: grid !important;
    place-items: center;
    border: 1px solid rgba(0,255,65,.45);
    border-radius: 50%;
    background: rgba(0,0,0,.78);
    color: var(--accent);
    font-size: 1.12rem;
    box-shadow: 0 3px 14px rgba(0,0,0,.55);
    opacity: .78;
}
.portrait-edit:hover { opacity: 1; background: #021207; box-shadow: 0 0 16px rgba(0,255,65,.16); }

.updates-page { align-items: start; padding-top: 34px; }
.update-panel { width: min(700px, 100%); }
.update-auth-form, .update-install-form { margin-top: 18px; }
.security-note {
    display: grid;
    gap: 4px;
    margin: 0 0 18px;
    padding: 13px 14px;
    border-left: 3px solid var(--accent);
    background: rgba(0,255,65,.055);
    color: #9fdcab;
    font-size: .86rem;
    line-height: 1.45;
}
.security-note strong { color: #d8ffe0; }
.compact-note { margin-top: 16px; }
.update-drop { min-height: 168px; }
.logout-form { margin-top: 13px; text-align: center; }
.text-btn { border: 0; background: transparent; color: #79a985; cursor: pointer; padding: 8px 12px; }
.text-btn:hover { color: var(--accent); }
.update-history { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.update-history h2 { margin: 0 0 10px; font-size: 1rem; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(0,255,65,.08); }
.history-item strong { color: var(--accent); }
.history-item span { color: var(--muted); font-size: .75rem; text-align: right; overflow-wrap: anywhere; }

@media (max-width: 680px) {
    .topbar .updates-link { display: none; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .form-actions .primary-btn, .form-actions .secondary-btn { width: 100%; }
    .watch-title-row { align-items: stretch; flex-direction: column; gap: 6px; }
    .edit-video-btn { align-self: flex-start; }
    .portrait-edit { width: 35px; height: 35px; top: 8px; right: 8px; opacity: .94; }
    .updates-page { padding-top: 18px; }
}

/* EGERSIS6 - teste Kiwify */
.kiwify-page{align-items:start;padding-top:30px}.kiwify-panel{width:min(820px,100%)}.kiwify-block{margin-top:18px;padding:18px;border:1px solid rgba(0,255,65,.18);border-radius:15px;background:rgba(0,255,65,.035)}.kiwify-block-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.kiwify-kicker{display:block;margin-bottom:4px;color:var(--accent);font-size:.67rem;font-weight:900;letter-spacing:.14em}.kiwify-block h2,.kiwify-history h2{margin:0;font-size:1rem}.status-pill{flex:0 0 auto;padding:6px 8px;border-radius:999px;font-size:.65rem;font-weight:900;letter-spacing:.08em;border:1px solid rgba(0,255,65,.26)}.status-ready,.status-ok{color:#8dffa8;background:rgba(0,255,65,.10)}.status-wait{color:#d4d4d4;background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.15)}.copy-field{display:flex;gap:8px}.copy-field input{flex:1;min-width:0;height:48px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:#010703;color:#bfffcf;outline:none;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem}.kiwify-help{margin:11px 0 0;color:var(--muted);font-size:.84rem;line-height:1.5}.kiwify-help strong{color:#caffd6}.event-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.event-grid>div{min-width:0;padding:11px;border:1px solid rgba(0,255,65,.10);border-radius:10px;background:#010703}.event-grid span{display:block;color:var(--muted);font-size:.68rem;margin-bottom:4px}.event-grid strong{display:block;color:#e5ffeb;font-size:.86rem;overflow-wrap:anywhere}.access-preview{margin-top:12px;padding:13px 14px;border-left:3px solid #7e8b82;background:rgba(255,255,255,.035)}.access-preview span{display:block;color:var(--muted);font-size:.72rem;margin-bottom:3px}.access-preview strong{font-size:.88rem;letter-spacing:.04em}.access-preview[data-code="grant"]{border-left-color:var(--accent)}.access-preview[data-code="grant"] strong{color:#8dffa8}.access-preview[data-code="revoke"]{border-left-color:#ff5b5b}.access-preview[data-code="revoke"] strong{color:#ff9696}.access-preview[data-code="late"],.access-preview[data-code="cancel"],.access-preview[data-code="pending"]{border-left-color:#ffd24d}.access-preview[data-code="late"] strong,.access-preview[data-code="cancel"] strong,.access-preview[data-code="pending"] strong{color:#ffe38d}.access-preview[data-code="rejected"]{border-left-color:#ff5b5b}.access-preview[data-code="rejected"] strong{color:#ff9696}.kiwify-history{margin-top:25px;padding-top:20px;border-top:1px solid var(--line)}.kiwify-event-list{margin-top:10px;display:grid;gap:6px}.kiwify-event-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid rgba(0,255,65,.07)}.kiwify-event-item>div{min-width:0;display:grid;gap:2px}.kiwify-event-item strong{color:#caffd6;font-size:.82rem;overflow-wrap:anywhere}.kiwify-event-item span,.kiwify-event-item time{color:var(--muted);font-size:.7rem;overflow-wrap:anywhere}.kiwify-event-item time{flex:0 0 auto;text-align:right}@media(max-width:680px){.kiwify-page{padding-top:16px}.kiwify-block{padding:14px}.copy-field{flex-direction:column}.copy-field .secondary-btn{width:100%}.event-grid{grid-template-columns:1fr}.kiwify-event-item{align-items:flex-start;flex-direction:column;gap:4px}.kiwify-event-item time{text-align:left}}
