/*
 * V4 theme (Netflix-dark) over V3 z.css. Loaded last by index.php.
 * Selectors mirror z.css specificity ([class~=x] == .x), so later-wins applies.
 * --accent is injected by index.php from config.php (ACCENT_COLOR).
 * ponytail: only the accent is a variable; every var() line has a literal fallback
 * before it because older WebOS/Tizen browsers (Chromium < 49) drop var() declarations.
 */
:root { --accent: #e50914; }

html, body { background-color: #000; }
* { font-family: 'Inter', 'Roboto', Arial, sans-serif !important; }

/* ───────── Top bar ───────── */
.navbar {
	right: 0;
	background-color: #000;
	border-bottom: 1px solid #1f1f1f;
}
.navbar .logo-left {
	margin-top: 0;
	padding-left: 24px;
	box-sizing: border-box;
	text-align: left;
	line-height: 58px;
}
.navbar .logo-left img {
	width: auto;
	height: auto;
	max-width: 190px;
	max-height: 40px;
	margin-top: 0;
	vertical-align: middle;
}
.v4-brand { color: #fff; font-size: 22px; font-weight: 900; letter-spacing: .5px; white-space: nowrap; }
.v4-brand b { color: #e50914; color: var(--accent); font-weight: 900; }

.navbar a {
	color: #d6d6d6;
	min-width: 0;
	margin: 10px 2px 0;
	padding: 9px 14px; /* 6 tabs must fit next to the right block on 1280px TVs */
	border: 0;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
	text-transform: none;
}
.navbar a.red, .navbar a.green, .navbar a.yellow, .navbar a.blue, .navbar a.purple, .navbar a.orange { border: 0; }
.navbar a .svg-navbar { display: none; }
.navbar a.bg-active { background-color: #2a2a2a; color: #fff !important; }
.navbar a:focus { background-color: #fff; color: #000 !important; }

.navbar .search, .navbar-right .navbar-hora, .navbar-right .config-app { color: #fff; }
/* Right block: date | gear | time | search. z.css floats these right (reversed order);
   flex puts them in this order. Date comes from hero.js (data-date attr).
   ponytail: margins instead of gap: flex gap needs Chromium 84, older TVs ignore it. */
.navbar-right {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: flex-end;
	justify-content: flex-end;
	height: 58px;
	padding-right: 24px;
}
.navbar-right:before {
	content: attr(data-date);
	-webkit-order: 1;
	order: 1;
	color: #9a9a9a;
	font-size: 18px;
	font-weight: 500;
	white-space: nowrap;
}
.navbar-right .config-app { -webkit-order: 2; order: 2; margin-left: 16px; padding: 6px; min-width: 0; line-height: 0; border-radius: 50%; }
.navbar-right .config-app svg { width: 26px; height: 26px; }
.navbar-right .navbar-hora { -webkit-order: 3; order: 3; margin-left: 16px; padding: 0; min-width: 0; font-size: 26px; font-weight: 700; line-height: 1; white-space: nowrap; }
.navbar-right .search { -webkit-order: 4; order: 4; margin-left: 20px; }
.navbar .search { border-radius: 12px; }
.navbar .search:focus, .navbar .config-app:focus { background-color: #2a2a2a; }
.navbar .search .keyboard { background-color: #1c1c1c; color: #bbb; border-radius: 12px; }

/* ───────── Left categories ───────── */
.sidenav {
	background-color: #0a0a0a;
	border-right: 1px solid #1a1a1a;
	padding: 12px 10px;
	box-sizing: border-box;
}
.sidenav a {
	color: #c8c8c8;
	font-size: 16px;
	font-weight: 500;
	text-transform: none;
	padding: 11px 14px;
	margin-bottom: 4px;
	border-radius: 8px;
}
.sidenav .bg-active { background-color: #262626; color: #fff; font-weight: 700; }
.sidenav a:focus { background-color: #fff; color: #000; font-weight: 700; }

/* ───────── Content ───────── */
/* z.css .mainbox is position:fixed with no right edge; pin it so the content
   always spans to the screen edge whatever margin-left z.js sets for the sidenav.
   (width:100% would overflow by that margin.) hero.js centers the leftover column space. */
.mainbox { background-color: #0a0a0a; right: 0; }
#content .meio { text-align: left; padding-top: 10px; }
#content h1 { color: #fff; font-size: 34px; font-weight: 900; text-transform: uppercase; text-align: left; padding-left: 20px; }

/* Poster cards (movies / series grid). Title sits BELOW the poster:
   padding-bottom reserves the strip, background-size keeps the image above it. */
.meio .item:not(.tv) {
	width: 159px;
	margin: 0 8px 22px;
	padding-bottom: 34px;
	border: 3px solid transparent;
	border-radius: 10px;
	background-color: transparent;
	background-size: 100% calc(100% - 34px) !important;
	background-position: center top !important;
	color: #fff;
	transition: transform .15s;
}
.meio .item:not(.tv):focus {
	border-color: #fff;
	box-shadow: none;
	color: #fff;
	-webkit-transform: scale(1.04);
	transform: scale(1.04);
}
.meio .item .title-vod {
	left: 0;
	right: 0;
	width: auto;
	height: 34px;
	margin: 0;
	padding: 9px 6px 0;
	box-sizing: border-box;
	background-color: transparent;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Rating badge: dark pill, yellow star */
.meio .item .nota-vod, .meio .item-home .nota-vod, .modal-capa .nota-vod-big {
	top: 8px;
	right: 8px;
	width: auto;
	padding: 3px 8px;
	border-radius: 999px;
	background-color: rgba(0, 0, 0, .8);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}
.meio .item .nota-vod:before, .meio .item-home .nota-vod:before, .modal-capa .nota-vod-big:before {
	content: "\2605\00a0";
	color: #f5c518;
}

/* Live TV rows */
.meio .item.tv {
	background-color: #141414;
	border: 3px solid transparent;
	border-radius: 10px;
	overflow: hidden;
	color: #ddd;
}
.meio .item.tv:focus { border-color: #fff; box-shadow: none; color: #fff; }
.meio .item.tv .title-tv { background-color: rgba(0, 0, 0, .75); color: #fff; font-size: 15px; font-weight: 600; }
.meio .item .img-tv { background-color: rgba(0, 0, 0, .6); }
.body .box-tv, .body .box-epg { background-color: rgba(10, 10, 10, .85); border-radius: 12px; }
.body .box-epg .list-epg { background-color: #141414; color: #9a9a9a; }
.body .box-epg .list-epg .title-epg { color: #fff; }

/* ───────── Home ───────── */
/* Hero: built by theme/hero.js before .filme-a-title from the #1 "Filmes em alta" card */
.v4-hero {
	position: relative;
	width: 100%;
	min-height: 320px;
	margin-bottom: 20px;
	padding: 48px 40px 32px;
	box-sizing: border-box;
	overflow: hidden;
	background-color: #000;
	text-align: left;
}
.v4-hero-bg {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	background-size: cover;
	background-position: center top;
	-webkit-filter: blur(8px) brightness(.75) saturate(1.2);
	filter: blur(8px) brightness(.75) saturate(1.2);
	-webkit-transform: scale(1.05);
	transform: scale(1.05);
}
.v4-hero-glow {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	/* Dark gradient left-side so text stays readable, fades to transparent right */
	background: linear-gradient(to right, rgba(0,0,0,.75) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,0) 80%),
		linear-gradient(rgba(0, 0, 0, 0) 60%, #0a0a0a);
}
.v4-hero-content { position: relative; z-index: 1; max-width: 600px; }
.v4-hero-label { color: #e50914; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; }
.v4-hero-title { color: #fff; font-size: 52px; font-weight: 900; line-height: 1.05; margin-bottom: 14px; white-space: normal; }
.v4-hero-rating { color: #f5c518; font-size: 20px; font-weight: 700; }
.v4-hero-rating span { color: #ddd; font-size: 18px; margin-left: 4px; }
.filme-a-title, .serie-a-title { color: #fff; font-size: 22px; font-weight: 700; }

/* Row cards. ponytail: width/margins/border kept at V3 values (159/5/3px) because
   z.css offsets the carousel with left:-175px; change both together. */
.meio .item-home {
	border-color: transparent;
	border-radius: 10px;
	background-color: transparent;
	padding-bottom: 34px;
	background-size: 100% calc(100% - 34px) !important;
	background-position: center top !important;
	color: #fff;
}
.meio .item-home:focus {
	border-color: #fff;
	box-shadow: none;
	color: #fff;
	-webkit-filter: brightness(1.12);
	filter: brightness(1.12);
}
.meio .item-home .title-vod {
	left: 0;
	right: 0;
	width: auto;
	height: 34px;
	margin: 0;
	padding: 9px 6px 0;
	box-sizing: border-box;
	background-color: transparent;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Big ranking number bottom-left of the poster */
.meio .top-dia {
	top: auto;
	bottom: 36px;
	left: 6px;
	width: auto;
	padding: 0;
	background-color: transparent;
	color: #fff;
	font-size: 56px;
	font-weight: 900;
	line-height: 1;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .9), 0 0 2px #000;
}

/* ───────── Movie / series dialog ───────── */
.modal-f, .modal-s { background-color: rgba(0, 0, 0, .85); }
.modal-f .modal-content, .modal-s .modal-content {
	background-color: #141414;
	border: 1px solid #2a2a2a;
	border-radius: 16px;
}
.modal-f .modal-bg, .modal-s .modal-bg { opacity: .18; border-radius: 16px; }
.modal-f .modal-capa, .modal-s .modal-capa {
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .6);
}
.modal-f .modal-capa:after, .modal-s .modal-capa:after {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 28px 0 10px;
	text-align: center;
	color: #ddd;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 4px;
	background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .85));
}
.modal-f .modal-capa:after { content: "FILME"; }
.modal-s .modal-capa:after { content: "S\00c9RIE"; }
.modal-capa .nota-vod-big { font-size: 15px; padding: 4px 10px; }

.modal-f .modal-nome, .modal-s .modal-nome { color: #fff; font-size: 34px; font-weight: 800; }
.modal-f .modal-genero, .modal-s .modal-genero { color: #bdbdbd; font-size: 18px; }
.modal-f .modal-diretor-elenco, .modal-s .modal-diretor-elenco { color: #bdbdbd; font-size: 16px; }

.modal-f .modal-assistir a {
	min-width: 280px;
	padding: 16px 56px;
	border: 3px solid transparent;
	border-radius: 50px;
	background-color: #e50914;
	background-color: var(--accent);
	color: #fff;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: .5px;
	text-transform: uppercase;
}
.modal-f .modal-assistir a:focus {
	background-color: #e50914;
	background-color: var(--accent);
	color: #fff;
	border-color: #fff;
	box-shadow: 0 0 18px rgba(229, 9, 20, .6);
}

.modal-f .modal-sinopse, .modal-s .modal-sinopse {
	background-color: #0d0d0d;
	border-radius: 12px;
	padding: 14px 16px;
}
.modal-f .modal-sinopse span, .modal-s .modal-sinopse span { color: #e6e6e6; font-size: 17px; line-height: 1.6; }

span.modal-close { color: #fff; font-size: 28px; padding: 2px 10px; border-radius: 50%; }
span.modal-close:focus { color: #fff; background-color: rgba(255, 255, 255, .15); }

/* Seasons / episodes */
.modal-s .modal-temp { background-color: #0d0d0d; border-radius: 12px; }
.modal-s .modal-temp .modal-ep .temp-title { background-color: #1a1a1a; color: #fff; }
.modal-s .modal-temp .modal-ep .ep-title { background-color: transparent; color: #bbb; }
.modal-s .modal-temp .modal-ep .ep-title.bg-active { background-color: #e50914; background-color: var(--accent); color: #fff; }
.modal-s .modal-temp .modal-ep .ep-title:focus { background-color: #fff; color: #000; }

/* ───────── Login / detect dialogs ───────── */
.modal-l .modal-bg, .modal-d .modal-bg { background-color: #000; }
.modal-l .modal-content, .modal-d .modal-content { background-color: transparent; }
.modal-l .modal-usuario, .modal-l .modal-senha, .modal-d .modal-texto { background-color: rgba(20, 20, 20, .9); border-color: #2a2a2a; }
.modal-l .modal-usuario:focus, .modal-l .modal-senha:focus, .modal-l .bg-active, .modal-d .modal-texto:focus {
	border-color: #e50914;
	border-color: var(--accent);
	box-shadow: 0 0 10px rgba(229, 9, 20, .5);
	color: #fff;
}
.modal-l .modal-login a, .modal-d .modal-detectar a { background-color: #2a2a2a; color: #ddd; border-radius: 50px; font-weight: 700; }
.modal-l .modal-login a:focus, .modal-d .modal-detectar a:focus {
	background-color: #e50914;
	background-color: var(--accent);
	color: #fff;
}
.modal-l .modal-error .texto-error { color: #ff4d4d; }

/* ───────── Settings ───────── */
.config-meio .config-topic { background-color: #000; color: #8a8a8a; border-radius: 8px; }
.config-meio .config-box, .config-meio .btn-logoff { background-color: #141414; border-radius: 12px; }
.config-meio .config-box .config-item:focus { background-color: #e50914; background-color: var(--accent); border-radius: 8px; }
.config-meio .btn-logoff a { border-radius: 50px; color: #ddd; background-color: #2a2a2a; }
.config-meio .btn-logoff a:focus { background-color: #e50914; background-color: var(--accent); color: #fff; }
.search-error .error-text { background-color: #141414; color: #9a9a9a; }

/* ───────── On-screen keyboard ───────── */
button.jQKeyboardBtn { background: #1c1c1c; color: #ddd; border-color: #0a0a0a; border-radius: 6px; }
button.jQKeyboardBtn:hover, button.jQKeyboardBtn:focus, button.jQKeyboardBtn.shift-active, button.jQKeyboardBtn:active {
	background: #e50914;
	background: var(--accent);
	color: #fff;
}
div.jQKeyboardContainer { background: #0a0a0a; border-radius: 10px; }

/* ───────── Player ───────── */
.video-player-bottom { background-color: rgba(0, 0, 0, .85); }
.video-player-top .video-back, .video-player-top .video-hora, .video-player-bottom .video-play-pause { background-color: #141414; border-radius: 10px; color: #ddd; }
.video-player-bottom .video-play-pause:focus, .video-player-top .video-back:focus { background-color: #e50914; background-color: var(--accent); color: #fff; }
.video-info .video-title { color: #fff; }
.video-info .video-progress progress::-webkit-progress-value { background-color: #e50914 !important; background-color: var(--accent) !important; }
.video-info .video-progress progress::-moz-progress-bar { background-color: #e50914 !important; background-color: var(--accent) !important; }

/* ── Kids/Novelas: full-width grid without sidebar ─────────────────────── */
html.v4-cat-only .sidenav { display: none !important; }
html.v4-cat-only .mainbox { margin-left: 0 !important; width: auto !important; right: 0; }

/* ── Hero Assistir button ───────────────────────────────────────────────── */
.v4-hero-play {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 28px;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    border: none;
}
.v4-hero-play:focus {
    background: #e50914;
    background: var(--accent);
    color: #fff;
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
}

/* ── Navbar date ────────────────────────────────────────────────────────── */
.v4-date {
    color: #999;
    font-size: 14px;
    white-space: nowrap;
    margin-right: 12px;
}
