/* ========================================================
   CHANNEL KIDS YOUTUBE PLAYER (channelyoutubeplayer)
   Estilos CSS reutilizables para el reproductor de YouTube
   ======================================================== */

.channelyoutubeplayer {
    position: relative;
    width: 100%;
    background: #0f172a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.25);
    border: 2px solid #334155;
    margin-bottom: 30px;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.channelyoutubeplayer-stage {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    background: #000000;
    overflow: hidden;
}

.channelyoutubeplayer-stage iframe, 
.channelyoutubeplayer-stage div[id$="-iframe"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* PANEL DE CONTROLES */
.channelyoutubeplayer-controls {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1.5px solid #334155;
}

/* BARRA DE PROGRESO INTERACTIVA */
.channelyoutubeplayer-progress-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s ease;
}

.channelyoutubeplayer-progress-wrap:hover {
    height: 10px;
}

.channelyoutubeplayer-progress-loaded {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    width: 0%;
}

.channelyoutubeplayer-progress-current {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    border-radius: 6px;
    width: 0%;
    transition: width 0.1s linear;
}

.channelyoutubeplayer-progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    display: none;
}

.channelyoutubeplayer-progress-wrap:hover .channelyoutubeplayer-progress-handle {
    display: block;
}

/* FILA DE BOTONES Y TIEMPO */
.channelyoutubeplayer-btns-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.channelyoutubeplayer-left-group, 
.channelyoutubeplayer-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channelyoutubeplayer-btn {
    background: transparent;
    border: none;
    color: #f8fafc;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.channelyoutubeplayer-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #38bdf8;
    transform: scale(1.08);
}

.channelyoutubeplayer-btn-play {
    background: #0284c7;
    color: #ffffff;
    width: 44px;
    height: 44px;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.channelyoutubeplayer-btn-play:hover {
    background: #0369a1;
    color: #ffffff;
}

.channelyoutubeplayer-time {
    font-family: 'Outfit', monospace, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #94a3b8;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.channelyoutubeplayer-time .current-time {
    color: #f8fafc;
}

/* VOLUMEN */
.channelyoutubeplayer-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.channelyoutubeplayer-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 75px;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: background 0.15s;
}

.channelyoutubeplayer-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.channelyoutubeplayer-vol-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    border: none;
}

@media (max-width: 600px) {
    .channelyoutubeplayer-vol-slider {
        width: 50px;
    }
    .channelyoutubeplayer-time {
        font-size: 12px;
        margin-left: 4px;
    }
    .channelyoutubeplayer-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .channelyoutubeplayer-btn-play {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}
