:root { 
    --ods-bg-dark: #1b1c1e; 
    --ods-bg-header: #202124; 
    --ods-blue-deep: #0028b5; 
    --ods-blue-light: #00c6ff; 
    --ods-text-main: #e8e8e8; 
    --ods-text-dim: #9aa0a6; 
    --ods-card-bg: #292a2d; 
    --ods-card-hover: #35363a; 
}

@font-face { font-family: 'ODS-Sans'; src: local('Helvetica Neue'), local('Arial'), sans-serif; }

.ods-tv-root { 
    font-family: 'ODS-Sans', Arial, sans-serif; 
    background: var(--ods-bg-dark); 
    color: var(--ods-text-main); 
    border-radius: 8px; 
    overflow: hidden; 
    position: relative; 
    user-select: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    border: 1px solid #333; 
    min-height: 200px; 
}

/* LOADER */
.ods-tv-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 180px; color: #888; }
.ods-spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.1); border-top: 4px solid var(--ods-blue-light); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* HEADER */
.ods-tv-header { display: flex; align-items: center; padding: 0; background: var(--ods-bg-header); border-bottom: 1px solid #333; height: 50px; overflow: hidden; position: relative; width: 100%; }

.ods-tv-date-display { 
    position: relative; z-index: 100; font-size: 15px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.5px;
    background: linear-gradient(90deg, var(--ods-blue-deep) 20%, var(--ods-blue-light) 70%, rgba(0,0,0,0) 100%);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); 
    padding: 0 50px 0 25px; display: flex; align-items: center; height: 100%;
    box-shadow: 5px 0 15px rgba(0, 40, 181, 0.4); flex-shrink: 0;
}

.ods-tv-ticker-wrap { position: relative; flex-grow: 1; height: 100%; overflow: hidden; background: var(--ods-bg-header); z-index: 1; }
.ods-tv-ticker-content { position: absolute; top: 0; bottom: 0; left: 100%; white-space: nowrap; display: flex; align-items: center; animation: marquee 30s linear infinite; font-size: 13px; color: #ccc; font-weight: 500; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-200%); } }

.ods-t-label { font-weight: 800; text-transform: uppercase; margin-right: 5px; }
.ods-t-curr { color: var(--ods-blue-light); text-shadow: 0 0 5px rgba(0, 198, 255, 0.4); } 
.ods-t-next { color: #5599ff; margin-left: 50px; border-left: 1px solid #444; padding-left: 15px; } 
.ods-t-title { color: #fff; font-weight: 700; margin-right: 5px; text-transform: uppercase;}
.ods-t-desc { color: #999; font-style: italic; font-size: 12px; opacity: 0.8; margin-left: 5px; }

/* BODY */
.ods-tv-body { position: relative; width: 100%; background: var(--ods-bg-dark); height: 160px; }
.ods-tv-body::before { content: ''; position: absolute; top:0; bottom:0; left:0; width:50px; background: linear-gradient(to right, var(--ods-bg-dark), transparent); z-index:20; pointer-events:none; }
.ods-tv-body::after { content: ''; position: absolute; top:0; bottom:0; right:0; width:50px; background: linear-gradient(to left, var(--ods-bg-dark), transparent); z-index:20; pointer-events:none; }

.ods-tv-scroll-area { overflow-x: auto; overflow-y: hidden; position: relative; height: 100%; padding: 0 40px; scrollbar-width: thin; scrollbar-color: var(--ods-blue-deep) #222; }
.ods-tv-scroll-area::-webkit-scrollbar { height: 6px; }
.ods-tv-scroll-area::-webkit-scrollbar-track { background: #222; }
.ods-tv-scroll-area::-webkit-scrollbar-thumb { background-color: var(--ods-blue-deep); border-radius: 10px; }

.ods-tv-content { position: relative; height: 100%; }
.ods-tv-ruler { height: 40px; position: relative; margin-bottom: 5px; }
.ods-tv-time-mark { position: absolute; top: 15px; transform: translateX(-50%); font-size: 13px; color: var(--ods-text-dim); font-weight: 600; }
.ods-tv-time-mark::after { content: ''; position: absolute; top: 20px; left: 50%; height: 6px; width: 1px; background: #444; }

.ods-tv-track { position: relative; height: 90px; }

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ods-tv-card { 
    position: absolute; top: 5px; bottom: 10px; 
    background: var(--ods-card-bg); border-radius: 6px; 
    padding: 10px 14px; overflow: hidden; cursor: pointer; 
    border-left: 4px solid #444; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    animation: slideUpFade 0.5s ease-out forwards;
}

.ods-tv-card.is-live-card {
    border-left-color: var(--ods-blue-light);
    background: linear-gradient(to right, rgba(0, 40, 181, 0.2), var(--ods-card-bg));
    box-shadow: 0 0 15px rgba(0, 198, 255, 0.15);
    animation: slideUpFade 0.5s ease-out forwards, pulseBorder 2s infinite;
    /* Kartica koja je live mora biti IZNAD blura */
    z-index: 45; 
}

@keyframes pulseBorder {
    0% { border-left-color: var(--ods-blue-light); box-shadow: 0 0 10px rgba(0, 198, 255, 0.2); }
    50% { border-left-color: #fff; box-shadow: 0 0 20px rgba(0, 198, 255, 0.5); }
    100% { border-left-color: var(--ods-blue-light); box-shadow: 0 0 10px rgba(0, 198, 255, 0.2); }
}

.ods-tv-card:hover { 
    z-index: 55; /* Mora biti veći od blura i live kartice */
    transform: scale(1.02) translateY(-2px); 
    background: var(--ods-card-hover); 
    border-left-color: var(--ods-blue-light); 
    box-shadow: 0 10px 25px rgba(0, 198, 255, 0.2); 
}

.ods-progress-bg {
    position: absolute; top: 0; left: 0; bottom: 0;
    background: rgba(0, 40, 181, 0.3); 
    z-index: 0; pointer-events: none; border-right: 1px solid rgba(0, 198, 255, 0.3);
}

.ods-tv-title, .ods-tv-meta { position: relative; z-index: 1; }
.ods-tv-title { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.ods-tv-meta { font-size: 11px; color: var(--ods-text-dim); display: flex; align-items: center; gap: 8px; }
.ods-badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; border-radius: 4px; font-weight: 800; font-size: 10px; color: #fff; }
.b-serija { background: #b71c1c; } .b-rep { background: #555; border-radius: 50%; width: 18px; height: 18px; padding:0; color:#ccc;}

/* OVO JE NOVO - ZAMUĆENJE PROŠLOSTI */
.ods-past-overlay {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    background: rgba(0, 0, 0, 0.4); /* Malo potamni */
    backdrop-filter: grayscale(90%) blur(1.5px); /* Isperi boje i malo zamuti */
    -webkit-backdrop-filter: grayscale(90%) blur(1.5px); /* Za Safari */
    z-index: 40; /* Iznad običnih kartica, ispod live kartice */
    pointer-events: none; /* Da se može kliknuti kroz to ako treba */
    transition: width 1s linear; /* Glatko pomicanje */
    border-right: 1px solid rgba(255,255,255,0.1);
}

.ods-tv-now-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--ods-blue-light); z-index: 50; pointer-events: none; box-shadow: 0 0 10px rgba(0, 198, 255, 0.6); }
.ods-tv-now-label { position: absolute; top: -5px; left: -25px; background: linear-gradient(135deg, var(--ods-blue-light) 0%, var(--ods-blue-deep) 100%); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 0; border-radius: 12px; width: 50px; text-align: center; box-shadow: 0 2px 8px rgba(0, 40, 181, 0.6); text-shadow: 0 1px 1px rgba(0,0,0,0.5); }