/* Main container for the secure player */
.secure-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    overflow: hidden;
}

/* The iframe injected by the script */
.secure-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Clickable overlay zone */
.zona-clic-principal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 50px); /* Don't cover controls */
    z-index: 2;
    cursor: pointer;
}

/* Custom controls container */
.controles-personalizados {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide controls during playback when mouse is out */
.secure-player-container.reproduciendo:not(:hover) .controles-personalizados {
    opacity: 0;
}

.controles-inferiores {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
}

.controles-grupo {
    display: flex;
    align-items: center;
}

.controles-progreso {
    padding: 0 10px;
    position: relative;
    bottom: -5px;
}

.barra-progreso {
    flex-grow: 1;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: height 0.15s ease;
}

.barra-progreso:hover {
    height: 8px;
}

.progreso-relleno {
    height: 100%;
    width: 0%;
    background-color: #00adef;
}

.control-btn {
    background: none;
    border: none;
    padding: 0 8px;
    cursor: pointer;
    fill: white;
    width: 36px;
    height: 36px;
    transition: transform 0.1s ease;
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn .icono-pausa,
.control-btn .icono-sonido-on,
.control-btn .icono-fullscreen-exit {
    display: none;
}

.control-btn.reproduciendo .icono-pausa { display: block; }
.control-btn.reproduciendo .icono-play { display: none; }
.control-btn.sonido-activo .icono-sonido-on { display: block; }
.control-btn.sonido-activo .icono-sonido-off { display: none; }
.control-btn.fullscreen-activo .icono-fullscreen-exit { display: block; }
.control-btn.fullscreen-activo .icono-fullscreen-enter { display: none; }

.tiempo-actual {
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    user-select: none;
    margin: 0 8px;
}

@media (max-width: 600px) {
    .tiempo-actual { display: none; }
    .control-btn { width: 32px; height: 32px; }
}