:root {
	--epg-primary: #04a5e5;
	--epg-secondary: #8a2be2;
	--epg-bg: rgba(20, 20, 30, 0.95);
	--epg-text: #ffffff;
	--epg-highlight: #ff6b00;
	--epg-banner-height: 40vh; /* 40% of viewport height */
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'LG Smart UI', Arial, sans-serif;
}

body {
	background-color: transparent;
	color: var(--epg-text);
	overflow: hidden;
	height: 100vh;
	width: 100vw;
}

.epg-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: var(--epg-banner-height);
	min-height: 180pt; /* Minimum height for readability */
	background: var(--epg-bg);
	color: var(--epg-text);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
	/*backdrop-filter: blur(5px);*/
	display: flex;
	flex-direction: column;
	transform: translateY(0);
	transition: transform 0.3s ease;
	z-index: 1030;
}

.cheader {
	background: linear-gradient(90deg, var(--epg-primary), var(--epg-secondary));
	padding: 10pt 15pt;
	min-height: 35%;
}

.channel-header {
	display: flex;
	align-items: center;
}

.channel-logo {
	width: 80pt;
	height: 100pt;
	object-fit: contain;
	margin-right: 12pt;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.channel-name {
	font-size: 3.2rem;
	font-weight: 600;
	flex-grow: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 20pt;
}

.channel-number {
	font-size: 6rem;
	font-weight: 600;
	flex-grow: 1;
	text-align: right;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: 5pt;
	padding: 20pt;
}

.channel-nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-left: 10pt;
}

.nav-arrow {
	width: 22pt;
	height: 22pt;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 2pt;
	cursor: pointer;
	font-size: 0.7rem;
	transition: all 0.2s ease;
}

.nav-arrow:hover {
	background: rgba(255, 255, 255, 0.4);
}

.programs-container {
	display: flex;
	flex: 1;
	padding: 8pt 15pt;
}

.program-box {
	flex: 1;
	padding: 10pt 15pt;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.program-box.current {
	border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.program-label {
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--epg-highlight);
    margin-bottom: 3pt;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10pt 10pt 10pt 0;
}

.program-title {
	font-size: 2rem;
	font-weight: 600;
	margin-bottom: 5pt;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 10pt 0;
}

.program-time {
	font-size: 2.4rem;
	opacity: 0.8;
	margin-bottom: 5pt;
	padding: 5pt 0;
}

.program-desc {
	font-size: 2.2rem;
	line-height: 1.2;
	opacity: 0.9;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
	padding: 5pt 0;
}

.progress-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3pt;
	background: var(--epg-highlight);
	transition: width 1s linear;
}

.watermark {
    position: absolute;
    bottom: 10pt;
    right: 10pt;
    font-size: 2.6rem;
    opacity: 0.5;
    padding: 20pt;
}

/* Animation for channel change */
@keyframes channelChange {
	0% { opacity: 0; transform: translateY(10px); }
	100% { opacity: 1; transform: translateY(0); }
}

.channel-change {
	animation: channelChange 0.3s ease-out;
}

/* Compact layout for smaller screens */
@media (max-height: 600px) {
	.program-title {
		font-size: 0.9rem;
	}
	.program-time, .program-desc {
		font-size: 0.7rem;
	}
	.channel-name {
		font-size: 1rem;
	}
}