html,
body {
  position: relative;
  font-family: "Open Sans", sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  color: #272829;
  overflow-x: hidden;
  background-color: #000;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
  width: 100%;
}

:root {
  --bg-blur: 8px;
  /* Reducido según pedido */
  --bg-bright: 0.92;
  --bg-sat: 1.05;
  --cover-float: 18px;
}

#bgWrapper {
  position: fixed;
  inset: -15%;
  z-index: -4;
  will-change: transform;
  animation: cinematic-motion 25s ease-in-out infinite alternate;
}

@keyframes cinematic-motion {
  0% { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.15) translate(-1%, 2%); }
}

.bgfx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #000;
  opacity: 0;
  transition: opacity 600ms ease;
  z-index: -3;
  backface-visibility: hidden;
  will-change: opacity, filter;
}

.bgfx.on {
  opacity: 1;
}

.bgfx.mode1 {
  -webkit-filter: none !important;
  filter: none !important;
}

.bgfx.mode2 {
  -webkit-filter: blur(var(--bg-blur)) brightness(var(--bg-bright)) saturate(var(--bg-sat)) !important;
  filter: blur(var(--bg-blur)) brightness(var(--bg-bright)) saturate(var(--bg-sat)) !important;
}

@media (max-width: 768px) {
  .bgfx.mode2 {
    -webkit-filter: blur(4px) brightness(0.96) saturate(1.03) !important;
    filter: blur(4px) brightness(0.96) saturate(1.03) !important;
  }
}

#bgOverlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.bgfx.mode1~#bgOverlay {
  background:
    radial-gradient(ellipse at center,
      rgba(0, 0, 0, 0.01) 0%,
      rgba(0, 0, 0, 0.03) 60%,
      rgba(0, 0, 0, 0.05) 100%);
}

.bgfx.mode2~#bgOverlay {
  background:
    radial-gradient(ellipse at center,
      rgba(0, 0, 0, 0.10) 0%,
      rgba(0, 0, 0, 0.30) 60%,
      rgba(0, 0, 0, 0.55) 100%);
}



#player {
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  margin: 80px auto 0 !important;
  width: 40%;
  height: 50%;
  padding: 20px 0;
  background: transparent !important;
}

@media only screen and (max-width: 768px) {
  #player {
    width: 95%;
    /* Wider on mobile for better fit */
    height: 48%;
    margin: 60px auto 0 !important;
    /* Move up slightly */
    padding: 10px 0;
  }
}

.btn-red {
  background: transparent;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-family: sans-serif;
  padding: 10px 15px;
  width: 200px;
  text-align: left;
  display: inline-block;
  white-space: nowrap;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-red i {
  margin-right: 8px;
}

.btn-red:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  #menuContainer.offcanvas-start {
    width: 85% !important;
    /* Gives the menu a proper native mobile app feel */
    background-color: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

@media (min-width: 768px) {
  #menuContainer.offcanvas-start {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 250px !important;
    min-height: 100vh !important;
    transform: none !important;
    visibility: visible !important;
    background-color: transparent !important;
    border: none;
  }

  #menuContainer .btn-close {
    display: none !important;
  }
}

.offcanvas-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  height: 100%;
  padding: 1rem;
  margin-top: 20px;
}

#tvSection {
  display: block;
}

@media (max-width: 767.98px) {
  #tvSection {
    display: none;
  }
}

#copyMenu {
  font-size: 14px;
  color: #fff;
  text-align: center;
}

.offcanvas-body img {
  max-width: 150px;
  margin-bottom: 1rem;
}

#menuBtn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

@media (min-width: 768px) {
  #menuBtn {
    display: none;
  }
}

#footerBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
}

#socialIcons {
  display: flex;
  gap: 15px;
  padding: 10px 0;
}

.social-icon {
  width: 60px;
  height: 60px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  text-decoration: none;
  transition: background 0.2s ease;
  margin-bottom: 10px;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.2);
}

#footerCopy {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  text-align: center;
  font-size: 13px;
  width: 100%;
  padding: 8px 0;
}

@media (min-width: 768px) {
  #footerBar {
    bottom: 15px;
    right: 15px;
    width: auto;
    left: auto;
    flex-direction: row;
    background: none;
  }

  #footerCopy {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .social-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
    line-height: 26px;
  }
}

@font-face {
  font-family: 'DS-DIGIB';
  src: url('../font/DS-DIGIB.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

#clockContainer {
  font-family: 'DS-DIGIB', sans-serif;
  font-size: 28px;
  color: #fff;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 10px;
  padding: 0px 15px;
  width: 190px;
  text-align: center;
}

@media (min-width: 768px) {
  #clockContainer {
    position: fixed;
    top: 30px;
    right: 20px;
    margin: 0;
  }
}

@media (max-width: 767.98px) {
  #clockContainer {
    position: absolute;
    font-size: 24px;
    left: 50%;
    transform: translateX(-50%);
    top: 80px;
    margin-bottom: 50px;
    z-index: 2;
    text-align: center;
  }
}

.btn-instalar {
  background: transparent;
  border: 1px solid #fff;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-family: sans-serif;
  padding: 10px 15px;
  width: 135px;
  display: block;
  text-align: center;
  white-space: nowrap;
  margin: 10px auto;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-instalar:hover {
  background: rgba(255, 255, 255, 0.2);
}

#install-button-container-footer {
  display: block;
}

@media (min-width: 768px) {
  #install-button-container-footer {
    display: none;
  }
}

@keyframes lunaCoverFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate(-0.6deg);
  }

  50% {
    transform: translate3d(0, calc(var(--cover-float) * -1), 0) rotate(0.6deg);
  }

  100% {
    transform: translate3d(0, 0, 0) rotate(-0.6deg);
  }
}

@keyframes lunaCoverGlow {
  0% {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35));
  }

  50% {
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .55));
  }

  100% {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35));
  }
}

body.bg-anim #playercoverwrapper {
  will-change: filter;
  transform-origin: 50% 50%;
}

body.bg-anim #playercoverwrapper1,
body.bg-anim #playercoverwrapper2 {
  will-change: opacity;
}

body.bg-anim #playersmallcoverwrapper {
  will-change: filter;
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: reduce) {

  body.bg-anim #playercoverwrapper,
  body.bg-anim #playersmallcoverwrapper {
    animation: none !important;
  }
}

#playercoverwrapper {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  #playercoverwrapper {
    transform: scale(1.05);
  }
}

@media (max-width: 768px) {

  #playercoverwrapper,
  #playercoverwrapper * {
    overflow: visible !important;
  }
}

.playertexttitle,
.playersmalltexttitle {
  overflow: hidden !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {

  .playertexttitle,
  .playersmalltexttitle {
    left: 0 !important;
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

#playertexttitle,
#playersmalltexttitle {
  overflow: hidden !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {

  #playertexttitle,
  #playersmalltexttitle {
    left: 0 !important;
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 768px) {
  #player {
    overflow: visible !important;
  }

  #playerbg,
  #playerwrapper,
  #playerwrap,
  #playercontainer,
  .playerbg,
  .playerwrapper,
  .playerwrap,
  .playercontainer {
    overflow: visible !important;
  }

  #playercoverwrapper,
  #playercoverwrapper * {
    overflow: visible !important;
  }

  .playertexttitle,
  .playersmalltexttitle,
  #playertexttitle,
  #playersmalltexttitle {
    overflow: hidden !important;
  }
}

@media (max-width: 768px) {
  :root {
    --cover-float: 20px;
  }

  #player {
    padding-top: 34px !important;
    height: 52% !important;
    min-height: 420px;
  }

  #playercoverwrapper {
    margin-top: 6px;
  }
}

/* ==========================================================================
   Custom Radio Status Badge (EN VIVO / AUTODJ)
   ========================================================================== */
#playerstatusbadge {
  left: 0 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 30px;
  font-family: 'Open Sans', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

/* EN VIVO Status */
.status-badge.live {
  border-color: rgba(255, 59, 48, 0.3) !important;
}

.status-badge.live .pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #ff3b30;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.8);
  animation: pulse-red 1.6s infinite;
}

@keyframes pulse-red {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
  }
}

/* AUTO DJ Status */
.status-badge.autodj {
  border-color: rgba(46, 204, 113, 0.3) !important;
}

.status-badge.autodj .status-icon {
  width: 7px;
  height: 7px;
  background-color: #2ecc71;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.8);
  animation: pulse-green 1.6s infinite;
  display: inline-block;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

/* Custom Scrollbar for Menu Container (Sidebar) */
#menuContainer .offcanvas-body::-webkit-scrollbar {
  width: 5px;
}
#menuContainer .offcanvas-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
#menuContainer .offcanvas-body::-webkit-scrollbar-thumb {
  background: var(--primary-color, #ff0000);
  border-radius: 4px;
}
#menuContainer .offcanvas-body::-webkit-scrollbar-thumb:hover {
  background: #ff3333;
}

/* Rediseño de pestañas de programación en pantallas móviles */
@media (max-width: 575.98px) {
  .sch-tabs {
    justify-content: space-around !important;
    flex-wrap: nowrap !important;
    overflow-x: hidden !important; /* Evita que aparezca scroll horizontal */
    padding-bottom: 0 !important;
  }
  .sch-tabs .nav-link {
    padding: 6px 8px !important;
  }
  .sch-tabs .nav-link .sch-tab-full {
    display: none !important;
  }
  .sch-tabs .nav-link .sch-tab-short {
    display: inline !important;
  }
}