/* Bistv - Web TV App Styling */
* {
    outline: none !important;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Background Player */
#player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Force GPU acceleration for smoother video rendering on Android TV */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Common Overlay Styles */
.hidden {
    display: none !important;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    padding: 20px;
    box-sizing: border-box;
}

.panel {
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#group-container {
    width: 300px;
}

.list-space {
    width: 16px;
}

#channel-container {
    flex: 1;
}

/* UI Logic for Groups Hiding */
#channel-overlay.group-hidden #group-container,
#channel-overlay.group-hidden .list-space {
    display: none;
}

h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

/* Highlights */
.focused-column h2 {
    color: #00FF00; /* Green highlight for focused column title */
    opacity: 1;
}

.unfocused-column h2 {
    color: white;
    opacity: 0.7;
}

.list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Item Styling */
.item {
    padding: 10px 14px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.item.selected {
    color: #00FF00; /* Green for selected item */
    font-weight: bold;
}

.item.focused {
    color: #00FF00; /* Only green text highlight on focus */
}

/* EPG Banner */
.overlay.banner {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: auto;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    display: block;
    padding: 20px;
}

#epg-title {
    font-size: 22px;
}

#epg-body {
    font-size: 18px;
    color: #00FF00;
    margin-top: 10px;
    white-space: pre-wrap;
}

/* Status Text */
.status {
    position: absolute;
    top: 20px; /* Top */
    right: 20px; /* Right */
    background-color: rgba(0, 0, 0, 0.75);
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 15px;
    z-index: 50;
    color: #FF3333; /* Bright red for visibility */
    border: 1px solid rgba(255, 51, 51, 0.4);
    max-width: 350px;
    text-align: right;
    pointer-events: none; /* Don't block clicks */
}

/* Dialog */
.dialog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
}

.dialog-content {
    background-color: #222;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 350px;
}

.dialog-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: space-around;
}

.dialog-buttons button {
    padding: 10px 25px;
    font-size: 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#btn-confirm { background-color: #00FF00; color: black; }
#btn-cancel { background-color: #444; color: white; }

#btn-confirm.focused { transform: scale(1.1); }
#btn-cancel.focused { transform: scale(1.1); }
