:root {
    --bg-dark: #000000;
    --bg-col-1: #111111;      /* Fundo Coluna Categorias */
    --bg-col-2: #0a0a0a;      /* Fundo Coluna Canais */
    --accent: #b71c1c;        /* Vermelho IBO Player */
    --accent-rgb: 183, 28, 28;
    --accent-dark: #4a0000;   /* Vermelho escuro dashboard */
    --accent-light: #d32f2f;
    --highlight-red: #d50000; /* Vermelho vivo da categoria ativa */
    --highlight-blue: #0277bd; /* Azul do canal ativo */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --text-yellow: #ffeb3b;
}

html, body { width: 100%; min-height: 100%; margin: 0 !important; padding: 0 !important; }
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); height: 100vh; overflow: hidden; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* =========================================
   1. HOME DASHBOARD (ESTILO IBO PLAYER PRO)
   ========================================= */
.dashboard-bg {
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, #1a0b0b 0%, #050508 100%);
    display: flex; flex-direction: column;
    padding: 30px 60px;
}
.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; height: 60px; position: relative; }
.logo-area { font-size: 32px; font-weight: 300; display: flex; align-items: center; justify-content: center; width: 100%; position: absolute; left: 0; pointer-events: none; text-transform: uppercase; letter-spacing: 2px; }
.logo-area span { color: var(--text-main); }
.expiry-info { position: absolute; right: 0; font-size: 14px; color: #ddd; font-weight: 500; }
.dashboard-container { display: flex; justify-content: center; align-items: center; height: 100%; gap: 20px; max-width: 1200px; margin: 0 auto; width: 100%; }
a { text-decoration: none; color: white; transition: 0.3s; }

.card-big, .card-square { background: linear-gradient(145deg, var(--accent-dark), #111111); border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid transparent; color: #fff; cursor: pointer; }
.card-wide { background: rgba(255,255,255,0.05); border: 1px solid var(--accent); border-radius: 10px; display: flex; align-items: center; padding-left: 20px; cursor: pointer; }
.card-big:hover, .card-square:hover, .card-wide:hover { transform: scale(1.03); border-color: #fff; box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.6); z-index: 10; }

.col-big { width: 320px; height: 340px; display: flex; }
.card-big { width: 100%; height: 100%; font-size: 20px; font-weight: bold; }
.card-big i { font-size: 80px; margin-bottom: 20px; border: 3px solid #fff; padding: 20px; border-radius: 20px; width: 140px; height: 100px; display:flex; align-items:center; justify-content:center; }
.col-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 15px; width: 340px; height: 340px; }
.card-square { width: 100%; height: 100%; font-size: 14px; font-weight: 500; }
.card-square i { font-size: 24px; margin-bottom: 10px; border: 2px solid #fff; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
.col-list { display: flex; flex-direction: column; justify-content: space-between; width: 280px; height: 340px; }
.card-wide { width: 100%; height: 30%; font-size: 16px; font-weight: 500; }
.card-wide i { margin-right: 15px; font-size: 20px; color: #eee; }

@media (max-width: 900px) {
    .dashboard-container { flex-direction: column; height: auto; padding-bottom: 50px; overflow-y: auto; }
    .col-big, .col-grid, .col-list { width: 100%; max-width: 400px; height: auto; }
    .logo-area { position: relative; top: 0; left: auto; }
    .expiry-info { position: relative; right: 0; text-align: center; }
    .top-header { flex-direction: column; height: auto; }
}

/* =========================================
   2. LAYOUT INTERNO (VOD / SERIES)
   ========================================= */
.layout-wrapper { display: flex; height: 100vh; }
.sidebar { width: 300px; background: #141414; display: flex; flex-direction: column; border-right: 1px solid #222; }
.sidebar-header { padding: 20px; font-size: 20px; font-weight: bold; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; }
.back-btn { background: var(--accent); border: none; color: white; cursor: pointer; font-size: 20px; width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.2s, background 0.2s; }
.back-btn:hover { background: var(--accent-light); transform: scale(1.08); }
.cat-list { flex: 1; overflow-y: auto; list-style: none; padding: 10px; }
.cat-item { padding: 12px 15px; margin-bottom: 5px; cursor: pointer; border-radius: 6px; color: var(--text-muted); transition: 0.2s; }
.cat-item:hover { background: #222; color: #fff; }
.cat-item.active { background: var(--accent); color: white; font-weight: bold; }
.content-area { flex: 1; display: flex; flex-direction: column; background: var(--bg-dark); }
.top-bar { padding: 20px; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #222; }
.search-box { background: #222; border: 1px solid #333; padding: 10px 20px; border-radius: 20px; color: white; width: 300px; outline: none; transition: 0.3s; }
.search-box:focus { border-color: var(--accent); }

.media-grid { padding: 20px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
.media-card { position: relative; cursor: pointer; transition: transform 0.2s; }
.media-card:hover { transform: scale(1.05); z-index: 10; }
.poster { width: 100%; aspect-ratio: 2/3; background: #222; border-radius: 8px; overflow: hidden; border: 2px solid transparent; }
.media-card:hover .poster { border-color: var(--accent); box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.5); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.media-title { margin-top: 8px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #ddd; text-align: center; }

/* =========================================
   3. LIVE TV LAYOUT (3 COLUNAS - XUI ONE)
   ========================================= */
.xui-layout { display: flex; width: 100%; height: 100vh; }
.col-categories { width: 22%; min-width: 250px; background-color: var(--bg-col-1); display: flex; flex-direction: column; border-right: 1px solid #222; }
.cat-header { padding: 20px; display: flex; align-items: center; border-bottom: 1px solid #333; height: 60px; }
.cat-header h3 { color: var(--text-yellow); font-size: 18px; text-transform: uppercase; font-weight: bold; margin-left: 10px; }
.btn-back { background: var(--accent); border: none; color: white; cursor: pointer; font-size: 20px; width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.2s, background 0.2s; }
.btn-back:hover { background: var(--accent-light); transform: scale(1.08); }
.cat-menu { list-style: none; overflow-y: auto; flex: 1; }
.cat-menu li { padding: 12px 20px; font-size: 14px; color: #aaa; cursor: pointer; border-bottom: 1px solid #1a1a1a; transition: 0.2s; position: relative; overflow: hidden; }
.category-count { float: right; min-width: 24px; padding: 2px 7px; border-radius: 12px; text-align: center; font-size: 11px; color: #ddd; background: rgba(255,255,255,0.12); }
.cat-menu li.active .category-count { background: rgba(255,255,255,0.22); color: #fff; }
.cat-menu li.active { color: #fff; font-weight: bold; background: linear-gradient(90deg, rgba(var(--accent-rgb),0.6) 0%, rgba(0,0,0,0) 100%); border-left: 4px solid var(--highlight-red); }

.col-channels { width: 28%; background-color: var(--bg-col-2); border-right: 1px solid #222; display: flex; flex-direction: column; }
.channel-list { list-style: none; overflow-y: auto; flex: 1; }
.channel-item { display: flex; align-items: center; padding: 10px 15px; border-bottom: 1px solid #1a1a1a; cursor: pointer; color: #ccc; font-size: 14px; }
.channel-item:hover { background-color: #151515; }
.channel-item.active { background: linear-gradient(90deg, var(--highlight-blue) 0%, rgba(var(--accent-rgb),0.2) 100%); color: #fff; font-weight: 500; }
.ch-num { width: 30px; font-weight: bold; color: #666; font-size: 12px; }
.channel-item.active .ch-num { color: #fff; }
.ch-icon { width: 35px; height: 35px; margin-right: 10px; display: flex; align-items: center; justify-content: center; }
.ch-icon img { max-width: 100%; max-height: 100%; }
.ch-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favorite-marker { display: none; margin-left: auto; color: #ff5c7c; font-size: 13px; }
.channel-item.is-favorite .favorite-marker { display: inline-block; }
.empty-channels { padding: 24px 16px; color: var(--text-muted); text-align: center; }

.col-player { flex: 1; display: flex; flex-direction: column; background: #000; }
.video-wrapper { height: 55%; background: #000; position: relative; border-bottom: 2px solid var(--highlight-red); }
#videoPlayer { width: 100%; height: 100%; outline: none; }
#loader { position: absolute; top:50%; left:50%; transform:translate(-50%,-50%); color:white; display:none; }

.info-wrapper {
    flex: 1; position: relative; padding: 30px; background-color: #050505;
    background-image:
        linear-gradient(30deg, #111 12%, transparent 12.5%, transparent 87%, #111 87.5%, #111),
        linear-gradient(150deg, #111 12%, transparent 12.5%, transparent 87%, #111 87.5%, #111),
        linear-gradient(60deg, #0a0a0a 25%, transparent 25.5%, transparent 75%, #0a0a0a 75%, #0a0a0a);
    background-size: 80px 140px;
}
#channelName { font-size: 24px; color: #fff; margin-bottom: 20px; border-left: 4px solid #fff; padding-left: 15px; }
.bottom-actions { position: absolute; bottom: 30px; right: 30px; display: flex; gap: 10px; }
.btn-xui { padding: 10px 25px; border-radius: 50px; border: none; font-weight: bold; cursor: pointer; color: white; display: flex; align-items: center; gap: 8px; }
.btn-xui.blue { background: var(--highlight-blue); }
.btn-xui.blue:hover { background: var(--accent-light); }

@media (max-width: 800px) {
    .xui-layout { flex-direction: column; overflow-y: auto; }
    .col-categories { width: 100%; height: 25vh; border-bottom: 1px solid #333; }
    .col-channels { width: 100%; height: 35vh; }
    .col-player { height: 40vh; }
    .video-wrapper { height: 250px; }
}

/* =========================================
   4. TELA DE LOGIN
   ========================================= */
.login-body { background: url('https://img.freepik.com/free-vector/dark-hexagonal-background-with-gradient-color_79603-1409.jpg') no-repeat center center fixed; background-size: cover; height: 100vh; display: flex; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif; position: relative; }
.login-body::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); z-index: 0; }
.login-wrapper { position: relative; z-index: 1; width: 100%; max-width: 900px; padding: 20px; display: flex; flex-direction: column; align-items: center; }
.login-card { display: flex; width: 100%; background: #141414; border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); overflow: hidden; border: none; min-height: 500px; }
.lc-left { width: 45%; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; color: white; position: relative; overflow: hidden; }
.lc-left::after { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%); pointer-events: none; }
.brand-showcase { text-align: center; z-index: 2; margin-top: 40px; }
.big-icon { font-size: 60px; margin-bottom: 20px; background: rgba(0,0,0,0.2); width: 100px; height: 100px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,0.2); }
.big-icon.login-logo { background: transparent; border: none; overflow: hidden; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-showcase h1 { font-size: 32px; font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
.slogan { font-size: 14px; opacity: 0.8; margin-bottom: 30px; font-weight: 300; }
.features-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.features-list span { background: rgba(0,0,0,0.2); padding: 5px 12px; border-radius: 20px; font-size: 12px; display: flex; align-items: center; gap: 5px; }
.lc-right { width: 55%; padding: 50px; display: flex; flex-direction: column; justify-content: center; background: #0f0f0f; }
.form-header h2 { color: #fff; font-size: 26px; margin-bottom: 5px; }
.form-header p { color: #777; font-size: 14px; margin-bottom: 30px; }
.input-container { margin-bottom: 20px; }
.input-container label { display: block; color: #aaa; font-size: 12px; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; }
.input-wrapper { position: relative; background: #1a1a1a; border: 1px solid #333; border-radius: 8px; transition: 0.3s; }
.input-wrapper:focus-within { border-color: var(--accent-light); box-shadow: 0 0 10px rgba(211, 47, 47, 0.2); }
.input-wrapper i { position: absolute; left: 15px; top: 15px; color: #555; }
.input-wrapper input { width: 100%; padding: 12px 12px 12px 45px; background: transparent; border: none; color: #fff; font-size: 15px; outline: none; }
.btn-submit { width: 100%; padding: 15px; background: linear-gradient(90deg, var(--accent-light) 0%, var(--accent) 100%); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.3s; margin-top: 10px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(211, 47, 47, 0.3); }
.login-alert { background: rgba(211, 47, 47, 0.1); border: 1px solid rgba(211, 47, 47, 0.3); color: #ff5252; padding: 10px; border-radius: 6px; font-size: 13px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }

@media (max-width: 768px) {
    .login-card { flex-direction: column; min-height: auto; }
    .lc-left { width: 100%; padding: 30px; text-align: center; }
    .lc-right { width: 100%; padding: 30px; }
    .brand-showcase { margin-top: 10px; }
    .features-list { display: none; }
}

/* =========================================
   5. EPG
   ========================================= */
.epg-area { margin-top: 10px; color: #ccc; }
.epg-title { font-size: 18px; font-weight: bold; color: #fff; margin-bottom: 5px; }
.epg-time { font-size: 13px; color: var(--highlight-blue); font-weight: 600; margin-bottom: 10px; display: block; }
.epg-desc { font-size: 14px; color: #aaa; line-height: 1.4; max-height: 60px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.progress-container { width: 100%; background-color: #333; border-radius: 5px; margin: 15px 0; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; background-color: var(--highlight-red); width: 0%; transition: width 0.5s; box-shadow: 0 0 10px rgba(213, 0, 0, 0.7); }
