:root {
    --primary: #0066ff;
    --bg-dark: #050505;
    --text: #ffffff;
}

body, html {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    background-color: #000;
    color: var(--text);
    font-family: 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    z-index: 10;
}
.screen.active { display: flex; }

/* --- Splash --- */
#splash { 
    background: #000; justify-content: center; align-items: center; z-index: 100; 
}
.splash-logo { width: 250px; animation: pulse 2s infinite; }

/* --- LOGIN CENTRALIZADO --- */
#login-screen { 
    justify-content: center; align-items: center; 
}

.login-bg {
    position: absolute; width: 100%; height: 100%;
    /* Imagem de fundo estilo cinema/streaming */
    background: url('https://images.unsplash.com/photo-1574375927938-d5a98e8ffe85?q=80&w=1469&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    filter: brightness(0.3) blur(5px);
    z-index: -1;
}

.login-container {
    width: 100%; display: flex; justify-content: center; align-items: center;
}

.login-box {
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.login-box h2 { margin: 10px 0 5px; font-size: 1.8rem; }
.login-box p { color: #aaa; margin-bottom: 25px; font-size: 0.9rem; }

.input-group input {
    width: 100%; padding: 15px; border-radius: 10px; border: 1px solid #333;
    background: #111; color: #fff; font-size: 1.1rem; text-align: center;
    box-sizing: border-box; margin-bottom: 20px;
}

#login-btn {
    width: 100%; padding: 15px; border-radius: 10px; border: none;
    background: var(--primary); color: #fff; font-weight: bold;
    font-size: 1rem; cursor: pointer; transition: 0.3s;
}

#login-btn:hover { background: #0052cc; transform: translateY(-2px); }
.error-msg { color: #ff4444; font-size: 0.85rem; margin-top: 15px; }

/* --- PLAYER --- */
#video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* --- MENU EM GRADE CIRCULAR --- */
#channel-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 50;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: 0.3s;
}
#channel-menu.visible { opacity: 1; pointer-events: auto; }

.menu-content { width: 95%; height: 85%; overflow-y: auto; padding: 20px; }

#channel-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 25px; justify-items: center;
}

.channel-card {
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; transition: 0.2s;
}
.channel-card:hover { transform: scale(1.1); }

.logo-circle {
    width: 85px; height: 85px;
    background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 8px;
    border: 3px solid transparent; transition: 0.2s;
}
.channel-card:hover .logo-circle { border-color: var(--primary); }

.logo-circle img { width: 70%; height: 70%; object-fit: contain; }

.channel-card span {
    font-size: 0.75rem; text-align: center; color: #eee;
    text-transform: uppercase; font-weight: 600;
}

/* --- TOAST INFO --- */
#channel-info {
    position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%);
    z-index: 60; pointer-events: none; opacity: 0; transition: 0.5s;
}
#channel-info.show { opacity: 1; }
.info-badge {
    background: rgba(0,0,0,0.8); padding: 12px 25px;
    border-radius: 50px; display: flex; align-items: center;
    border: 1px solid rgba(255,255,255,0.2);
}
#info-logo { width: 35px; height: 35px; border-radius: 50%; margin-right: 15px; background: #fff; }

.hidden { display: none !important; }

@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }