.navbar.fixed-top {
    background-color: #1e293b !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease-in-out;
}
.navbar.fixed-top {
    transition: all 0.3s ease-in-out;
    /* Kondisi awal bisa dibuat transparan penuh atau seperti biasa */
}
.navbar.fixed-top.scrolled {
    background-color: rgb(30 41 59) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.iptv_links {
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
}
.iptv_links:hover {
    color: #FA4262 !important;
    font-size: 15px;
    font-weight: 600;
}

/* Live Stream */
.offline-ui {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    align-items: center;
    justify-content: center;
}

.offline-box {
    text-align: center;
    max-width: 420px;
    padding: 40px 30px;
    background: rgb(16 26 36);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    color: #fff;
    animation: fadeIn 0.4s ease;
}

.offline-icon {
    font-size: 42px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.offline-box h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.offline-box p {
    font-size: 14px;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-grad {
  background-image: linear-gradient(to right, #1FA2FF 0%, #12D8FA 51%, #1FA2FF 100%);
}

.btn-grad {
  margin: 10px;
  padding: 15px 45px;
  text-align: center;
  text-transform: uppercase;
  transition: 0.5s;
  background-size: 200% auto;
  color: white;
  box-shadow: 0 0 20px #eee;
  border-radius: 10px;
  display: block;
  outline: none;
  border: none;
}

.boffline-actions button:hover {
  background-position: right center;
  color: #fff;
  text-decoration: none;
}

.offline-actions button {
    background: linear-gradient(135deg, #ff3c5e, #870ae7);
    border: none;
    padding: 7px 23px 8px;
    border-radius: 100px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.offline-actions button:hover {
    background: #FA4262;
    transform: translateY(-1px);
}

.offline-note {
    display: block;
    margin-top: 18px;
    font-size: 11px;
    color: #666;
}

/* Animasi smooth */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
#error-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px; 
    background: #000;
    z-index: 9999;
    pointer-events: none;
}
#iptv-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.iptv-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top: 5px solid #ff3c5e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Indikator Waktu Rekaman */
#rec-timer-overlay {
  display: none; /* Ubah ke 'flex' via JS saat merekam */
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px 12px;
  font-family: monospace;
  align-items: center;
  border-radius: 4px; /* Opsional: memperhalus sudut */
}

.rec-dot {
  color: #ff2500;
  margin-right: 5px;
  font-size: 20px;
  line-height: 0;
}

/* Animasi Kedip (Blink) */
.blink {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}


/* =========================
   EPISODE GRID
========================= */
.episode-wrap{
    display:grid;
    grid-template-columns:repeat(5, 1fr);
    gap:10px;
    width:100%;
}

/* Tablet */
@media(max-width:768px){
    .episode-wrap{
        grid-template-columns:repeat(4, 1fr);
    }
}

/* Mobile */
@media(max-width:576px){
    .episode-wrap{
        grid-template-columns:repeat(3, 1fr);
    }
}

/* =========================
   BUTTON BASE
========================= */
.episode-btn{
    position:relative;
    overflow:hidden;
    border-radius:12px;
    text-decoration:none;
    transition:all .25s ease;
    width:100%;
}

.episode-btn:hover{
    transform:translateY(-2px);
}

.episode-btn span{
    display:flex;
    align-items:center;
    justify-content:center;

    width:100%;
    height:44px;

    font-size:13px;
    font-weight:600;

    border-radius:12px;
    transition:all .25s ease;

    user-select:none;
}

/* =========================
   NORMAL BUTTON
========================= */
.badges_VOD_name {
    background: #fff;
    padding: 5px 20px 7px;
    color: #0f172a;
    border-radius: 7px;
}
.episode-normal span{
    background:#0f172a;
    color:#dbe5ff;
    border:0px solid #263248;
}

.episode-normal:hover span{
    background:#fff;
    color:#ff298a;
}

/* =========================
   ACTIVE BUTTON
========================= */
.episode-active{
    position:relative;
}

.episode-active span{
    background-image:
        linear-gradient(
            to right,
            #DA22FF 0%,
            #9733EE 51%,
            #DA22FF 100%
        );

    background-size:200% auto;

    color:transparent;

    border:none;

    box-shadow:
        0 0 14px rgba(218,34,255,.25);

    animation:gradientMove 3s linear infinite;
}

/* =========================
   AUDIO BAR ICON
========================= */
.episode-active::after{
    content:"";
    position:absolute;

    top:50%;
    left:50%;

    width:24px;
    height:14px;

    transform:translate(-50%,-50%);

    opacity:.95;

    background:
        linear-gradient(#fff,#fff) 0 100% / 3px 35% no-repeat,
        linear-gradient(#fff,#fff) 7px 100% / 3px 75% no-repeat,
        linear-gradient(#fff,#fff) 14px 100% / 3px 50% no-repeat,
        linear-gradient(#fff,#fff) 21px 100% / 3px 90% no-repeat;

    animation:musicBars .9s ease-in-out infinite alternate;
}

/* =========================
   SOFT GLOW
========================= */
.episode-active::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:12px;

    box-shadow:
        inset 0 0 12px rgba(255,255,255,.04),
        0 0 18px rgba(218,34,255,.22);

    pointer-events:none;
}

/* =========================
   GRADIENT ANIMATION
========================= */
@keyframes gradientMove{
    0%{
        background-position:left center;
    }
    100%{
        background-position:right center;
    }
}

/* =========================
   MUSIC BAR ANIMATION
========================= */
@keyframes musicBars{

    0%{
        background:
            linear-gradient(#fff,#fff) 0 100% / 3px 30% no-repeat,
            linear-gradient(#fff,#fff) 7px 100% / 3px 80% no-repeat,
            linear-gradient(#fff,#fff) 14px 100% / 3px 45% no-repeat,
            linear-gradient(#fff,#fff) 21px 100% / 3px 95% no-repeat;
    }

    25%{
        background:
            linear-gradient(#fff,#fff) 0 100% / 3px 55% no-repeat,
            linear-gradient(#fff,#fff) 7px 100% / 3px 45% no-repeat,
            linear-gradient(#fff,#fff) 14px 100% / 3px 85% no-repeat,
            linear-gradient(#fff,#fff) 21px 100% / 3px 35% no-repeat;
    }

    50%{
        background:
            linear-gradient(#fff,#fff) 0 100% / 3px 90% no-repeat,
            linear-gradient(#fff,#fff) 7px 100% / 3px 30% no-repeat,
            linear-gradient(#fff,#fff) 14px 100% / 3px 60% no-repeat,
            linear-gradient(#fff,#fff) 21px 100% / 3px 70% no-repeat;
    }

    75%{
        background:
            linear-gradient(#fff,#fff) 0 100% / 3px 45% no-repeat,
            linear-gradient(#fff,#fff) 7px 100% / 3px 95% no-repeat,
            linear-gradient(#fff,#fff) 14px 100% / 3px 35% no-repeat,
            linear-gradient(#fff,#fff) 21px 100% / 3px 80% no-repeat;
    }

    100%{
        background:
            linear-gradient(#fff,#fff) 0 100% / 3px 70% no-repeat,
            linear-gradient(#fff,#fff) 7px 100% / 3px 50% no-repeat,
            linear-gradient(#fff,#fff) 14px 100% / 3px 100% no-repeat,
            linear-gradient(#fff,#fff) 21px 100% / 3px 40% no-repeat;
    }
}