* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    position: relative;
    /* TV optimization: disable text selection and focus outline */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

/* Fullscreen optimization */
body.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* TV Browser specific fixes and optimizations */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Disable outline for TV remote navigation */
    outline: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    /* Hardware acceleration for smooth animations on TV */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100px;
    /* Background will be set dynamically via JavaScript */
}

.header-left .logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.header-right h1 {
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Main Content Styles */
.content {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

.content-left {
    width: 70%;
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-wrapper .placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 1.2rem;
    text-align: center;
}

.content-right {
    width: 30%;
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-text {
    color: #666;
    font-size: 1.2rem;
    text-align: center;
}

/* Footer Styles */
.footer {
    background-color: #2a2a2a;
    height: 80px;
    overflow: hidden;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.ticker-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    /* Background will be set dynamically via JavaScript */
}

.ticker-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 320px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 20%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 5;
}

.datetime-display {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    border-radius: 8px 0 0 8px;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 200px;
}

#current-datetime {
    color: #ffffff;
    text-align: right;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.ticker-text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: scroll-left 30s linear infinite;
    font-size: 1.5rem;
    font-weight: 600;
    will-change: transform;
}

@keyframes scroll-left {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100%, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }
    
    .header {
        padding: 15px 20px;
        height: 80px;
    }
    
    .header-right h1 {
        font-size: 1.5rem;
    }
    
    .header-left .logo {
        height: 50px;
    }
    
    .ticker-text {
        font-size: 1.2rem;
    }
}
