* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, sans-serif; user-select: none; }
body { background: #0b0f19; color: #fff; overflow: hidden; height: 100vh; width: 100vw; }
.modal-pwa { position: absolute; z-index: 9999; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.pwa-content { background: #162032; padding: 30px; border-radius: 16px; width: 350px; text-align: center; border: 1px solid #2a3b55; }
.btn-primary { background: linear-gradient(90deg, #ff3b6b, #ff5b84); color: #fff; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; }
#login-wrapper, #dashboard-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; z-index: 1000; background: #070b14; }
.login-box { background: #0f1523; padding: 40px; border-radius: 20px; width: 420px; box-shadow: 0 25px 50px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05); }
.dash-container { width: 90%; max-width: 800px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-card { background: #162032; padding: 25px; border-radius: 16px; border: 1px solid #2a3b55; }
.dash-card span { font-size: 11px; color: #8ba0b2; letter-spacing: 1px; }
.dash-card h3 { font-size: 24px; margin: 10px 0; }
.dash-card p { font-size: 13px; color: #aaa; }
.btn-outline { background: transparent; border: 1px solid #374151; color: #fff; padding: 10px 20px; border-radius: 20px; cursor: pointer; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 14px; font-weight: bold; color: #fff; margin-bottom: 8px; }
.form-group input { width: 100%; padding: 15px; border-radius: 12px; border: none; background: #eef2f6; color: #000; font-size: 15px; outline: none; font-weight: 500; }
.btn-entrar { width: 100%; padding: 16px; background: linear-gradient(90deg, #ff3b6b, #ff5b84); color: #fff; font-weight: bold; font-size: 16px; border: none; border-radius: 30px; cursor: pointer; box-shadow: 0 10px 20px rgba(255, 59, 107, 0.3); }
#app-wrapper { width: 100vw; height: 100vh; position: relative; }
#video-player { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; background: #000; }
#ui-layer { position: absolute; z-index: 10; width: 100%; height: 100%; pointer-events: none; }
.top-left-controls { position: absolute; top: 25px; left: 25px; pointer-events: auto; z-index: 20; }
.top-right-controls { position: absolute; top: 25px; right: 25px; pointer-events: auto; z-index: 20; display:flex; gap:15px; }
.icon-btn { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); color: white; padding: 10px 15px; border-radius: 8px; cursor: pointer; font-weight: bold; backdrop-filter: blur(5px); }
.hamburger { background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); color: #fff; border: 1px solid rgba(255,255,255,0.2); font-size: 24px; border-radius: 8px; width: 45px; height: 45px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.icon-cast { width: 45px; height: 45px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; cursor: pointer; backdrop-filter: blur(5px); }
.sidebar { width: 350px; background: rgba(15, 15, 25, 0.8); backdrop-filter: blur(20px); height: 100%; padding: 25px; pointer-events: auto; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s ease; position: absolute; left: 0; top: 0; z-index: 30; }
.sidebar.hidden { transform: translateX(-100%); }
.cat-scroller { display: flex; overflow-x: auto; gap: 10px; margin-bottom: 20px; padding-bottom: 5px; scrollbar-width: none; }
.cat-pill { background: rgba(255,255,255,0.1); padding: 8px 15px; border-radius: 20px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.cat-pill.active { background: #ff3b6b; color: white; font-weight: bold; }
.channel-list { flex-grow: 1; overflow-y: auto; scrollbar-width: none; }
.channel-item { display: flex; align-items: center; background: rgba(255,255,255,0.05); padding: 12px; margin-bottom: 10px; border-radius: 12px; cursor: pointer; }
.channel-item.active { border: 1px solid #ff3b6b; background: rgba(255, 59, 107, 0.1); }
.channel-item img { width: 55px; height: 55px; border-radius: 8px; margin-right: 15px; background: #000; object-fit: contain; }
.ch-number { font-size: 11px; color: #aaa; font-weight: bold; display: block;}
.ch-name { font-size: 15px; font-weight: bold; color: #fff; }
.btn-logout { margin-top: 20px; padding: 15px; background: transparent; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: white; cursor: pointer; font-weight: bold; }
#bottom-osd { position: absolute; bottom: 40px; right: 40px; text-align: right; text-shadow: 2px 2px 8px rgba(0,0,0,0.9); transition: opacity 0.3s ease; pointer-events: none;}
#bottom-osd.hidden-osd { opacity: 0; }
.clock { font-size: 64px; font-weight: 300; line-height: 1; margin-bottom: 5px; }
.current-prog { font-size: 22px; font-weight: bold; }
.zapping-zone { position: absolute; top: 0; width: 15%; height: 100%; z-index: 5; display: flex; align-items: center; cursor: pointer; opacity: 0; transition: 0.3s; pointer-events: auto; }
.zapping-zone.left { left: 0; justify-content: flex-start; padding-left: 20px; background: linear-gradient(90deg, rgba(0,0,0,0.6), transparent); }
.zapping-zone.right { right: 0; justify-content: flex-end; padding-right: 20px; background: linear-gradient(-90deg, rgba(0,0,0,0.6), transparent); }
.zapping-zone:hover { opacity: 1; }
.zapping-zone span { font-size: 40px; color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.5); border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
#loader { position: absolute; top:0; left:0; width:100%; height:100%; background: #070b14; z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.spinner { width: 50px; height: 50px; border: 4px solid rgba(255,255,255,0.1); border-top-color: #ff3b6b; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }