/* =========================
   RESET
========================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}
body{
  background:#000;
  color:#fff;
  font-family:Arial,sans-serif;
  overflow:hidden;
}

/* =========================
   PLAYER
========================= */

#player-container{
  position:relative;
  width:100vw;
  height:100vh;
  background:#000;
}
video{
  width:100%;
  height:100%;
  object-fit:cover;
  background:#000;
}

/* =========================
   OVERLAYS
========================= */

.logo{
  position:absolute;
  top:40px;
  left:20px;
  z-index:20;
  background:rgba(0,0,0,.65);
  padding:10px 16px;
  border-radius:10px;
  font-size:22px;
  font-weight:bold;
}
.status{
  position:absolute;
  top:50px;
  right:20px;
  z-index:20;
  background:#d00000;
  padding:10px 14px;
  border-radius:8px;
  font-size:14px;
  font-weight:bold;
}
.now-playing{
  position:absolute;
  left:20px;
  bottom:20px;
  z-index:20;
  background:rgba(0,0,0,.65);
  padding:12px 18px;
  border-radius:10px;
  font-size:18px;
  max-width:55%;
}

/* =========================
   BOTÕES
========================= */

.cast-btn,
.change-city-btn{
  position:absolute;
  right:20px;
  z-index:30;
  border:none;
  padding:12px 18px;
  border-radius:10px;
  cursor:pointer;
  font-size:15px;
  font-weight:bold;
  color:#fff;
}
.cast-btn{
  bottom:20px;
  background:#34a853;
}
.cast-btn:hover{
  background:#2c8f47;
}
.change-city-btn{
  bottom:75px;
  background:#0d6efd;
}
.change-city-btn:hover{
  background:#0b5ed7;
}

/* =========================
   PLAYLIST
========================= */

.playlist{
  position:absolute;
  top:0;
  right:-430px;
  width:430px;
  height:100vh;
  background:rgba(0,0,0,.96);
  backdrop-filter:blur(10px);
  z-index:50;
  overflow-y:auto;
  transition:right .35s ease;
  box-shadow:-5px 0 25px rgba(0,0,0,.5);
}
.playlist.open{
  right:0;
}
.playlist-toggle{
  position:fixed;
  top:50%;
  right:0;
  transform:translateY(-50%);
  z-index:9999;
  background:#0d6efd;
  color:#fff;
  padding:16px 12px;
  border-radius:12px 0 0 12px;
  cursor:pointer;
  writing-mode:vertical-rl;
  text-orientation:mixed;
  font-size:16px;
  font-weight:bold;
  transition:right .35s ease;
}
.playlist.open + .playlist-toggle{
  right:430px;
}

/* =========================
   PLAYLIST HEADER
========================= */

.playlist-header{
  padding:20px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.playlist-header h2{
  font-size:24px;
}

/* =========================
   ACCORDION
========================= */

.accordion-day{
  border-bottom:1px solid rgba(255,255,255,.08);
}
.accordion-header{
  padding:16px 18px;
  cursor:pointer;
  background:#111;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:bold;
  font-size:16px;
  transition:.2s;
}
.accordion-header:hover{
  background:#1a1a1a;
}
.accordion-header.today{
  background:#0d6efd;
}
.accordion-content{
  display:none;
}
.accordion-day.open .accordion-content{
  display:block;
}

/* =========================
   PROGRAMAS
========================= */

.program-item{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.program-thumb{
  width:160px;
  min-width:160px;
  height:90px;
  border-radius:10px;
  overflow:hidden;
  background:#222;
}
.program-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.program-info{
  flex:1;
  min-width:0;
}
.program-time{
  color:#0d6efd;
  font-size:14px;
  font-weight:bold;
  margin-bottom:6px;
}
.program-title{
  font-size:16px;
  font-weight:bold;
  margin-bottom:6px;
  line-height:1.3;
}
.program-description{
  color:#bbb;
  font-size:13px;
  line-height:1.5;
}

/* =========================
   STARTUP
========================= */

#startup-screen{
  position:fixed;
  inset:0;
  background:#000;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
}
.startup-box{
  width:90%;
  max-width:420px;
  background:#111;
  padding:40px;
  border-radius:20px;
  text-align:center;
}
.startup-box h1{
  font-size:32px;
  margin-bottom:15px;
}
.startup-box p{
  color:#aaa;
  margin-bottom:30px;
}
.startup-box button{
  width:100%;
  padding:16px;
  margin-bottom:15px;
  border:none;
  border-radius:12px;
  background:#0d6efd;
  color:#fff;
  font-size:18px;
  font-weight:bold;
  cursor:pointer;
}
.startup-box button:hover{
  background:#0b5ed7;
}

/* =========================
   RESPONSIVO
========================= */

@media (max-width:768px){
  body{
    overflow:auto;
  }
  #player-container{
    height:auto;
    min-height:100vh;
  }
  video{
    width:100%;
    height:auto;
    aspect-ratio:16/9;
    position:relative;
  }
  .logo{
    top:8px;
    left:8px;
    font-size:14px;
    padding:6px 10px;
  }
  .status{
    top:8px;
    right:8px;
    font-size:11px;
    padding:6px 8px;
  }
  .now-playing{
    position:relative !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;
    display:block;
    margin:10px 8px 8px 8px;
    width:calc(100% - 16px);
    max-width:none;
    font-size:13px;
    padding:10px;
    z-index:1;
  }
  .change-city-btn{
    position:relative;
    right:auto;
    bottom:auto;
    width:calc(100% - 16px);
    margin:0 8px 8px 8px;
    display:block;
  }
  .cast-btn{
    position:relative;
    right:auto;
    bottom:auto;
    width:calc(100% - 16px);
    margin:0 8px 12px 8px;
    display:block;
  }
  .playlist{
    width:100%;
    right:-100%;
  }
  .playlist.open{
    right:0;
  }
  .playlist.open + .playlist-toggle{
    right:0;
  }

  /* =========================
     MOBILE IGUAL PC
  ========================= */

  .program-item{
    flex-direction:row;
    align-items:flex-start;
    gap:10px;
    padding:12px;
  }
  .program-thumb{
    width:120px;
    min-width:120px;
    height:68px;
  }
  .program-time{
    font-size:12px;
  }

  .program-title{
    font-size:14px;
  }
  .program-description{
    font-size:11px;
    line-height:1.4;
  }
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar{
  width:8px;
}
::-webkit-scrollbar-thumb{
  background:#444;
  border-radius:10px;
}