/* ==================== VARIÁVEIS ==================== */
:root {
    --primary: #e50914;
    --secondary: #564d4d;
    --dark: #141414;
    --darker: #000000;
    --light: #ffffff;
    --gray: #808080;
    --success: #46d369;
    --warning: #ffa500;
    --danger: #dc3545;
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* ==================== TELAS ==================== */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* ==================== LOGIN ==================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
}

.login-box {
    background: rgba(0, 0, 0, 0.75);
    padding: 60px;
    border-radius: 10px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.login-box .logo {
    display: block;
    max-width: 200px;
    margin: 0 auto 30px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: var(--light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--light);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    background: var(--secondary);
    color: var(--light);
    font-size: 16px;
}

.form-group input:focus {
    outline: 2px solid var(--primary);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: var(--light);
    width: 100%;
}

.btn-primary:hover {
    background: #f40612;
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--light);
}

.btn-secondary:hover {
    background: #6e6464;
}

.btn-danger {
    background: var(--danger);
    color: var(--light);
}

.btn-block {
    width: 100%;
    margin-bottom: 10px;
}

.error-message {
    color: var(--danger);
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

/* ==================== PERFIS ==================== */
.profile-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px;
}

.profile-container h1 {
    font-size: 48px;
    margin-bottom: 40px;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin-bottom: 40px;
}

.profile-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.profile-card:hover,
.profile-card-focused {
    transform: scale(1.1);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin-bottom: 15px;
    border: 3px solid transparent;
    transition: border-color 0.3s;
}

.profile-card:hover .profile-avatar,
.profile-card-focused .profile-avatar {
    border-color: var(--light);
}

.profile-name {
    font-size: 18px;
    color: var(--gray);
}

.profile-card:hover .profile-name,
.profile-card-focused .profile-name {
    color: var(--light);
}

/* ==================== LOADING ==================== */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-top: 8px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 28px;
    font-weight: bold;
    color: var(--light);
    margin: 0 0 10px 0;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-subtitle {
    font-size: 16px;
    color: var(--gray);
    margin: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== HEADER ==================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: linear-gradient(180deg, rgba(20,20,20,0.98) 0%, rgba(20,20,20,0.85) 100%);
    z-index: 100;
    transition: background 0.3s;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-header.scrolled {
    background: rgba(20, 20, 20, 0.98);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 50px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    height: 35px;
    width: 35px;
    object-fit: contain;
}

.app-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--light);
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-item {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 4px;
    text-transform: uppercase;
}

.nav-item:hover {
    color: var(--light);
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    color: var(--light);
    background: rgba(229,9,20,0.2);
}

.nav-item.kids {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--light);
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}

.wifi-icon,
.time-display {
    font-size: 14px;
    color: var(--light);
}

/* ==================== CONTEÚDO PRINCIPAL ==================== */
.main-content {
    padding-top: 80px;
    min-height: 100vh;
    overflow: hidden;
    width: 100%;
    height: 100vh;
}

/* Banner Principal */
.hero-banner {
    position: relative;
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 100px 50px;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--light);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-hero {
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-play {
    background: var(--light);
    color: var(--dark);
}

.btn-play:hover {
    background: rgba(255, 255, 255, 0.8);
}

.btn-info {
    background: rgba(109, 109, 110, 0.7);
    color: var(--light);
}

.btn-info:hover {
    background: rgba(109, 109, 110, 0.9);
}

/* Seções de Conteúdo */
.content-section {
    padding: 20px 40px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Grid em Mosaico */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 200px);
    gap: 15px;
    padding: 20px 0;
}

.mosaic-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mosaic-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* Tamanhos diferentes para criar mosaico */
.mosaic-card.large {
    grid-column: span 3;
    grid-row: span 2;
}

.mosaic-card.medium {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-card.small {
    grid-column: span 2;
    grid-row: span 1;
}

.mosaic-card.tall {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mosaic-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.mosaic-card:hover .mosaic-card-overlay {
    opacity: 1;
}

.mosaic-card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--light);
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.mosaic-card-category {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cards com label */
.mosaic-card-label {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 15px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: var(--light);
    text-transform: capitalize;
    z-index: 2;
}

/* Carrossel horizontal (fallback) */
.content-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) transparent;
}

.content-row::-webkit-scrollbar {
    height: 8px;
}

.content-row::-webkit-scrollbar-track {
    background: transparent;
}

.content-row::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

.content-card {
    min-width: 200px;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.content-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.content-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.content-card-title {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}

/* ==================== PÁGINA KIDS ==================== */
.kids-page {
    display: flex;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: calc(100vh - 80px);
    background: #000;
    overflow: hidden;
}

.kids-sidebar {
    width: 350px;
    background: rgba(20,20,20,0.95);
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.kids-title {
    padding: 20px;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--light);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kids-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.kids-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.kids-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.kids-item.active {
    background: linear-gradient(90deg, rgba(229,9,20,0.3), rgba(229,9,20,0.1));
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(229,9,20,0.5);
    transform: translateX(8px);
}

.kids-item.playing {
    border-left: 4px solid var(--success);
    background: rgba(70,211,105,0.1);
}

.kids-item.playing .kids-item-number {
    color: var(--success);
}

.kids-item-number {
    font-size: 18px;
    font-weight: bold;
    color: var(--light);
    min-width: 30px;
    text-align: center;
}

.kids-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.kids-item-info {
    flex: 1;
}

.kids-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
    line-height: 1.4;
}

.kids-hint {
    padding: 15px 20px;
    background: rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

.kids-hint strong {
    color: var(--light);
    background: rgba(229,9,20,0.3);
    padding: 2px 8px;
    border-radius: 4px;
}

.kids-player {
    flex: 1;
    position: relative;
    background: #000;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.kids-player .video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.kids-player #kids-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.kids-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    z-index: 10;
}

.kids-info-overlay h2 {
    margin: 0;
    font-size: 32px;
    font-weight: bold;
    color: var(--light);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

/* ==================== PÁGINA TV ==================== */
.tv-page {
    display: flex;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: calc(100vh - 80px);
    background: #000;
    overflow: hidden;
}

.tv-sidebar {
    width: 300px;
    background: rgba(20,20,20,0.95);
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.tv-title {
    padding: 20px;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--light);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tv-categories-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.tv-category-item {
    padding: 15px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.tv-category-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.tv-category-item.active {
    background: linear-gradient(90deg, rgba(78,205,196,0.3), rgba(78,205,196,0.1));
    border-color: #4ecdc4;
    box-shadow: 0 0 20px rgba(78,205,196,0.5);
    transform: translateX(8px);
}

.tv-category-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
    line-height: 1.4;
}

.tv-special-item {
    background: rgba(78,205,196,0.1);
    border-left: 3px solid #4ecdc4;
}

.tv-special-item:hover {
    background: rgba(78,205,196,0.2);
}

.tv-category-icon {
    font-size: 18px;
    margin-right: 8px;
}

.tv-categories-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 10px 0;
}

.tv-hint {
    padding: 15px 20px;
    background: rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

.tv-hint strong {
    color: var(--light);
    background: rgba(78,205,196,0.3);
    padding: 2px 8px;
    border-radius: 4px;
}

.tv-channels-section {
    width: 350px;
    background: rgba(30,30,30,0.95);
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.tv-channels-title {
    padding: 20px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: var(--light);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(78,205,196,0.1);
}

.tv-channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.tv-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.tv-channel-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.tv-channel-item.active {
    background: linear-gradient(90deg, rgba(78,205,196,0.3), rgba(78,205,196,0.1));
    border-color: #4ecdc4;
    box-shadow: 0 0 15px rgba(78,205,196,0.4);
    transform: translateX(6px);
}

.tv-channel-item.playing {
    border-left: 4px solid var(--success);
    background: rgba(70,211,105,0.1);
}

.tv-channel-item.playing .tv-channel-number {
    color: var(--success);
}

.tv-channel-number {
    font-size: 14px;
    font-weight: bold;
    color: rgba(255,255,255,0.6);
    min-width: 25px;
    text-align: center;
}

.tv-channel-item.active .tv-channel-number {
    color: #4ecdc4;
}

.tv-channel-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.tv-channel-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--light);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tv-player-section {
    flex: 1;
    position: relative;
    background: var(--dark);
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tv-player-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.tv-video-wrapper {
    width: 100%;
    height: 60%;
    position: relative;
    background: #000;
}

.tv-video-wrapper:fullscreen {
    width: 100vw;
    height: 100vh;
}

.tv-video-wrapper:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
}

.tv-video-wrapper:-moz-full-screen {
    width: 100vw;
    height: 100vh;
}

.tv-video-wrapper:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
}

.tv-video-wrapper #tv-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.tv-player-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    pointer-events: none;
}

.tv-player-overlay h2 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    color: var(--light);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.tv-player-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.tv-player-loading p {
    color: var(--light);
    margin-top: 15px;
    font-size: 14px;
}

.tv-epg-container {
    flex: 1;
    background: rgba(20,20,20,0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
    padding: 15px;
}

.tv-epg-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
    color: var(--light);
    padding-bottom: 10px;
    border-bottom: 2px solid #4ecdc4;
}

.tv-epg-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tv-epg-empty {
    text-align: center;
    color: rgba(255,255,255,0.5);
    padding: 20px;
    font-size: 14px;
}

.tv-epg-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 14px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.tv-epg-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(4px);
}

.tv-epg-item.active {
    background: linear-gradient(90deg, rgba(78,205,196,0.3) 0%, rgba(78,205,196,0.15) 100%);
    border-left-color: #4ecdc4;
    border-left-width: 5px;
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(78,205,196,0.4), inset 0 0 20px rgba(78,205,196,0.1);
}

.tv-epg-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent 0%, #4ecdc4 50%, transparent 100%);
    animation: epgGlow 2s ease-in-out infinite;
}

.tv-epg-current {
    background: rgba(78,205,196,0.15);
    border-left-color: #4ecdc4;
}

.tv-epg-current.active {
    background: linear-gradient(90deg, rgba(78,205,196,0.4) 0%, rgba(78,205,196,0.2) 100%);
    border-left-color: #4ecdc4;
    border-left-width: 5px;
    box-shadow: 0 6px 20px rgba(78,205,196,0.5), inset 0 0 30px rgba(78,205,196,0.15);
}

@keyframes epgGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.tv-epg-time {
    font-size: 12px;
    color: #4ecdc4;
    font-weight: 600;
    margin-bottom: 5px;
}

.tv-epg-program strong {
    font-size: 14px;
    color: var(--light);
    display: block;
    margin-bottom: 5px;
}

.tv-epg-program p {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin: 0;
    line-height: 1.4;
}

.tv-epg-progress {
    margin-top: 8px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.tv-epg-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #44a8a0 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ==================== PLAYER ==================== */
.player-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: var(--darker);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 50px;
}

.btn-player {
    background: none;
    border: none;
    color: var(--light);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.btn-player:hover {
    transform: scale(1.2);
}

.player-info {
    position: absolute;
    top: 20px;
    left: 20px;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
}

.player-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.player-info p {
    font-size: 14px;
    color: var(--gray);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--dark);
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--secondary);
}

.modal-header h2 {
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--light);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.search-input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    background: var(--secondary);
    color: var(--light);
    font-size: 16px;
    margin-bottom: 20px;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

/* ==================== LOADING ==================== */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--secondary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== MODAL EPG ==================== */
.epg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.epg-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.3s;
}

.epg-modal-content h2 {
    color: #4ecdc4;
    margin: 0 0 20px 0;
    font-size: 24px;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 10px;
}

.epg-modal-time {
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.epg-modal-time strong {
    color: #4ecdc4;
}

.epg-modal-description {
    margin-bottom: 25px;
}

.epg-modal-description strong {
    color: #4ecdc4;
    display: block;
    margin-bottom: 10px;
}

.epg-modal-description p {
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin: 0;
}

.epg-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.epg-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.epg-modal-btn-schedule {
    background: #4ecdc4;
    color: #000;
}

.epg-modal-btn-schedule:hover,
.epg-modal-btn-schedule.epg-modal-btn-active {
    background: #44a8a0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78,205,196,0.5);
}

.epg-modal-btn-close {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.epg-modal-btn-close:hover,
.epg-modal-btn-close.epg-modal-btn-active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.epg-modal-btn-active::before {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid currentColor;
    border-radius: 8px;
    animation: btnPulse 1.5s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==================== OSD FULLSCREEN ==================== */
.tv-osd {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999999;
    pointer-events: none;
    animation: slideUpOSD 0.3s ease-out;
}

.tv-osd-hide {
    animation: slideDownOSD 0.3s ease-out forwards;
}

.tv-osd-content {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.98) 50%, rgba(0,0,0,1) 100%);
    padding: 50px 60px 35px 60px;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.tv-osd-header {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(0,0,0,0.7);
    padding: 25px 35px;
    border-radius: 16px;
    border: 2px solid rgba(78,205,196,0.4);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.tv-osd-logo {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(20,20,20,0.9);
    padding: 10px;
    border: 3px solid rgba(78,205,196,0.5);
    box-shadow: 0 4px 16px rgba(78,205,196,0.3);
}

.tv-osd-channel-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.tv-osd-channel-name {
    font-size: 36px;
    font-weight: bold;
    color: #4ecdc4;
    text-shadow: 3px 3px 8px rgba(0,0,0,1), 0 0 20px rgba(78,205,196,0.5);
    letter-spacing: 0.5px;
}

.tv-osd-program-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tv-osd-program-time {
    font-size: 16px;
    color: #4ecdc4;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,1);
}

.tv-osd-program-title {
    font-size: 22px;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0,0,0,1);
    line-height: 1.4;
    font-weight: 500;
}

.tv-osd-progress {
    margin-top: 6px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.tv-osd-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #44a8a0 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(78,205,196,0.6);
}

@keyframes slideUpOSD {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownOSD {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* ==================== NETFLIX STYLE ==================== */
.netflix-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

.netflix-loading p {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

.netflix-container {
    padding: 0;
}

/* Hero Banner estilo Netflix */
.netflix-hero {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.netflix-hero-bg-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.netflix-hero-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.netflix-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.netflix-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0.5) 33%, 
        rgba(0,0,0,0.85) 67%,
        rgba(0,0,0,0.95) 100%);
}

.netflix-content-wrapper {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
}

.netflix-info-section {
    flex: 0 0 45%;
    padding: 30px 60px 20px 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(180deg, 
        transparent 0%,
        rgba(0,0,0,0.3) 15%,
        rgba(0,0,0,0.6) 40%,
        rgba(0,0,0,0.85) 70%,
        rgba(0,0,0,0.95) 100%);
    overflow: hidden;
}

.netflix-info-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.netflix-categories-section {
    flex: 1;
    background: rgba(0,0,0,0.9);
    padding-top: 30px;
    padding-bottom: 40px;
    overflow-y: auto;
    overflow-x: hidden;
}

.netflix-categories-section::-webkit-scrollbar {
    width: 12px;
}

.netflix-categories-section::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
}

.netflix-categories-section::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
}

.netflix-categories-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.netflix-hero-content {
    max-width: 650px;
}

.netflix-hero-title {
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.netflix-hero-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 15px;
}

.netflix-hero-rating,
.netflix-hero-year,
.netflix-hero-duration {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.netflix-hero-plot {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255,255,255,0.95);
    margin: 0 0 20px 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.netflix-hero-buttons {
    display: flex;
    gap: 12px;
}

.netflix-hero-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.netflix-hero-btn span {
    font-size: 24px;
}

.netflix-hero-btn-play {
    background: #fff;
    color: #000;
}

.netflix-hero-btn-play:hover {
    background: rgba(255,255,255,0.85);
    transform: scale(1.05);
}

.netflix-hero-btn-info {
    background: rgba(109,109,110,0.7);
    color: #fff;
}

.netflix-hero-btn-info:hover {
    background: rgba(109,109,110,0.5);
    transform: scale(1.05);
}

.netflix-main-title {
    font-size: 42px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 30px;
}

.netflix-row {
    margin-bottom: 50px;
    padding: 0 60px;
    position: relative;
}

.netflix-row:first-child {
    margin-top: 0;
}

#netflix-rows {
    position: relative;
}

.netflix-row-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    padding-left: 4px;
}

/* Grid de filmes (Ver Todos) */
.netflix-grid-container {
    padding: 40px 60px;
}

.netflix-grid-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.netflix-back-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.netflix-back-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-5px);
}

.netflix-grid-title {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.netflix-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.netflix-grid-item {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.netflix-grid-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.netflix-grid-item-active {
    transform: scale(1.08);
    z-index: 20;
    box-shadow: 0 0 0 4px #4ecdc4, 0 8px 24px rgba(78,205,196,0.5);
}

.netflix-grid-item-active .netflix-grid-item-overlay {
    opacity: 1;
}

.netflix-grid-item-image {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}

.netflix-grid-item-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.netflix-grid-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 70%, rgba(0,0,0,0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.netflix-grid-item:hover .netflix-grid-item-overlay {
    opacity: 1;
}

.netflix-grid-item-overlay h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

@media (max-width: 1400px) {
    .netflix-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .netflix-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.netflix-row-content {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 4px;
    scroll-behavior: smooth;
}

.netflix-row-content::-webkit-scrollbar {
    height: 8px;
}

.netflix-row-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.netflix-row-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.netflix-row-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.netflix-item {
    flex: 0 0 160px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    position: relative;
}

.netflix-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.netflix-item-active,
.netflix-item-focused {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 0 0 3px #4ecdc4, 0 6px 20px rgba(78,205,196,0.5);
}

.netflix-item-active .netflix-item-overlay,
.netflix-item-focused .netflix-item-overlay {
    opacity: 1;
}

.netflix-see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.netflix-see-all:hover,
.netflix-see-all.netflix-item-active {
    background: rgba(78,205,196,0.15);
    border-color: #4ecdc4;
    border-style: solid;
}

.netflix-see-all-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.netflix-see-all-icon {
    font-size: 40px;
    color: #4ecdc4;
    font-weight: bold;
}

.netflix-see-all-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.netflix-item-image {
    position: relative;
    width: 160px;
    height: 240px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}

.netflix-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.netflix-item-image img.lazy-load {
    opacity: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    background-size: 200% 200%;
    animation: shimmer 1.5s infinite;
}

.netflix-item-image img.lazy-loaded {
    opacity: 1;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.netflix-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 70%, rgba(0,0,0,0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.netflix-item:hover .netflix-item-overlay {
    opacity: 1;
}

.netflix-item-overlay h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.netflix-play-btn {
    background: #4ecdc4;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.netflix-play-btn:hover {
    background: #44a8a0;
    transform: scale(1.05);
}

.netflix-loading-small {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner-small {
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

.netflix-empty {
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 40px;
    font-size: 14px;
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 768px) {
    .main-header {
        padding: 15px 20px;
    }
    
    .header-left {
        gap: 20px;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero-banner {
        height: 60vh;
        padding: 50px 20px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .profiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
