/* ============================
   YouTube-ish Controls (Base)
   ============================ */

:root {
    --ytp-white: #fff;
    --ytp-white-70: rgba(255, 255, 255, .70);
    --ytp-white-50: rgba(255, 255, 255, .50);
    --ytp-white-30: rgba(255, 255, 255, .30);
    --ytp-white-15: rgba(255, 255, 255, .15);
    --ytp-black-60: rgba(0, 0, 0, .60);
    --ytp-black-75: rgba(0, 0, 0, .75);
    --ytp-black-85: rgba(0, 0, 0, .85);
    --ytp-accent: #ff0033;
    /* pode trocar pra azul se quiser */
}

.hidden {
    display: none !important;
}

/* O wrap precisa ser referência pro absolute dos controles */
#player-wrap {
    position: relative;
    background: #000;
}

/* Player container (classe “YouTube-like”) */
.html5-video-player {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: var(--ytp-white);
}

/* Video wrapper / video */
.ytp-video-wrapper,
.html5-main-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

/* ============================
   Big Play Button (overlay)
   ============================ */
#big-play.ytp-large-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72px;
    height: 52px;
    transform: translate(-50%, -50%);
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    z-index: 60;
    opacity: 0;
    /* JS controla */
    pointer-events: none;
    /* JS controla */
    transition: opacity .15s ease;
}

#big-play svg {
    width: 100%;
    height: 100%;
}

.ytp-large-play-button-bg {
    fill: rgba(0, 0, 0, .55);
    stroke: rgba(255, 255, 255, .15);
    stroke-width: 1;
}

.ytp-large-play-button-play {
    fill: #fff;
}

#big-play:hover .ytp-large-play-button-bg {
    fill: rgba(0, 0, 0, .70);
}

/* ============================
   Bottom Chrome / Controls
   ============================ */
.ytp-chrome-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    padding: 10px 12px 12px;
    background: linear-gradient(to top, var(--ytp-black-85), rgba(0, 0, 0, 0));
    pointer-events: auto;
}

/* ============================
   Progress Bar
   ============================ */
.ytp-progress-bar-container {
    position: relative;
    height: 10px;
    /* um pouco maior pra ficar "YouTube" */
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.ytp-progress-bar {
    position: relative;
    width: 100%;
    height: 5px;
    /* mais bonito */
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    overflow: hidden;
}

/* Buffer e Play em scaleX (como você já está usando) */
#buffer-bar.ytp-load-progress,
#play-bar.ytp-play-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
}

/* Buffer: barzinha clara atrás (mais evidente) */
#buffer-bar.ytp-load-progress {
    background: rgba(255, 255, 255, .38);
}

/* Progresso: vermelho (accent) */
#play-bar.ytp-play-progress {
    background: var(--ytp-accent);
}

/* bolinha do playhead na ponta — aparece no hover do seekbar */
#play-bar.ytp-play-progress::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    /* bolinha branca como YouTube */
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .12s ease;
}

.ytp-progress-bar-container:hover #play-bar.ytp-play-progress::after {
    opacity: 1;
}

/* ============================
   Controls Row
   ============================ */
.ytp-chrome-controls {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ytp-left-controls,
.ytp-right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================
   Buttons / Icons
   ============================ */
.ytp-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ytp-white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 36px;
    border-radius: 999px;
    transition: background-color .12s ease, transform .06s ease, opacity .12s ease;
}

.ytp-button:hover {
    background: rgba(255, 255, 255, .10);
}

.ytp-button:active {
    transform: scale(0.98);
}

.ytp-svg {
    width: 30px;
    height: 30px;
    display: block;
}

.ytp-svg-fill {
    fill: #fff;
}

/* “pílulas” da direita (como na imagem) */
.ytp-right-controls .ytp-button {
    height: 40px;
    width: 40px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
}

.ytp-right-controls .ytp-button:hover {
    background: rgba(0, 0, 0, .65);
    border-color: rgba(255, 255, 255, .18);
}

/* Botões da esquerda mais “pílula” e arredondados */
.ytp-left-controls .ytp-button {
    height: 40px;
    width: 40px;
    /* deixa bem pílula */
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(6px);
}

.ytp-left-controls .ytp-button:hover {
    background: rgba(0, 0, 0, .55);
}

/* Volume button ainda mais arredondado e “igual do print” */
#btn-mute.ytp-mute-button {
    height: 40px;
    width: 40px;
    border-radius: 999px;
}

/* ============================
   Volume Slider (BRANCO)
   ============================ */
.ytp-volume-panel {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(6px);
}

/* remove aparência padrão */
.ytp-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 75px;
    height: 4px;
    background: transparent;
    cursor: pointer;
}

/* Track branco */
.ytp-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
}

/* Thumb branco */
.ytp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    margin-top: -4px;
    /* centraliza */
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .45);
}

/* Firefox */
.ytp-volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
}

.ytp-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    border: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .45);
}

/* ============================
   Time Display
   ============================ */
.ytp-time-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 400;
    color: var(--ytp-white);
    padding: 0 10px;
    height: 40px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(6px);
}

.ytp-time-separator {
    color: rgba(255, 255, 255, .60);
    font-weight: 800;
}

/* Status (debug) - você pode esconder se quiser */
#status-text.ytp-status-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .70);
    padding: 0 10px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .08);
}

/* ============================
   Gear Menu
   ============================ */
.ytp-popup.ytp-settings-menu {
    color: #fff;
    background: rgba(0, 0, 0, .82);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    overflow: hidden;
    min-width: 180px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
    backdrop-filter: blur(10px);
}

.ytp-settings-title {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.gear-item {
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .12s ease;
}

.gear-item:hover {
    background: rgba(255, 255, 255, .10);
}

/* ============================
   Mobile tweaks
   ============================ */
@media (max-width: 640px) {
    .ytp-volume-panel {
        display: none;
    }

    #status-text.ytp-status-text {
        display: none;
    }

    .ytp-time-display {
        font-size: 12px;
        padding: 0 8px;
    }

    .ytp-right-controls .ytp-button {
        width: 40px;
    }
}