.cf-player {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.cf-player:fullscreen,
.cf-player:-webkit-full-screen {
    border-radius: 0;
}

.cf-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.cf-hidden {
    display: none !important;
}

/* ---- Center play button ---- */
.cf-big-play {
    position: absolute;
    inset: 0;
    margin: auto;
    z-index: 20;
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease, background-color 0.18s ease, visibility 0s;
}

.cf-big-play:hover {
    transform: scale(1.06);
    background: rgba(0, 0, 0, 0.62);
}

.cf-big-play-hidden {
    opacity: 0;
    transform: scale(1.3);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.18s ease, visibility 0.6s linear 0.15s;
}

.cf-big-play-icon {
    display: flex;
}

.cf-big-play-icon svg {
    width: 48px;
    height: 48px;
    fill: #fff;
}

/* ---- Click for sound pill ---- */
.cf-sound-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: background-color 0.15s ease;
}

.cf-sound-pill:hover {
    background: rgba(0, 0, 0, 0.82);
}

.cf-sound-text {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.cf-sound-icon {
    display: inline-flex;
}

.cf-sound-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

/* Animated volume waves (Wistia-style flash) */
.cf-sound-icon .cf-wave {
    animation: cfWaveFlash 1s infinite;
}

.cf-sound-icon .cf-wave:nth-of-type(2) {
    animation-delay: 0.15s;
}

.cf-sound-icon .cf-wave:nth-of-type(3) {
    animation-delay: 0.3s;
}

@keyframes cfWaveFlash {
    0% {
        opacity: 0;
    }
    35% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ---- Bottom controls bar ---- */
.cf-controls {
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 3px;
    z-index: 25;
    padding-left: 12px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(71, 228, 139, 0.85);
    color: #00640b;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.cf-controls-hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.cf-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cf-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #00640b;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.cf-btn:hover {
    color: #fff;
    background: #008229;
}

.cf-btn svg {
    width: 22px;
    height: 22px;
}

.cf-btn-fullscreen {
    border-radius: 0;
}

.cf-time {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: rgba(0, 100, 11, 0.85);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ---- Seek bar ---- */
.cf-seek {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(to right, #00640b var(--cf-progress, 0%), rgba(0, 100, 11, 0.85) var(--cf-progress, 0%));
    outline: none;
    cursor: pointer;
    margin: 0;
}

.cf-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 100, 11);
        box-shadow: 0 0 1px 2px rgba(0, 100, 11, 0.35);
}

.cf-seek::-moz-range-thumb {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 100, 11, 0.85);
    border: 0;
}

.cf-seek:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 100, 11, 0.5);
}

/* ---- Loading spinner ---- */
.cf-spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 44px;
    height: 44px;
    z-index: 15;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #34d399;
    animation: cfSpin 0.8s linear infinite;
    pointer-events: none;
}

@keyframes cfSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .cf-big-play {
        width: 72px;
        height: 72px;
    }

    .cf-big-play-icon svg {
        width: 36px;
        height: 36px;
    }

    .cf-sound-pill {
        padding: 7px 12px 7px 14px;
    }

    .cf-sound-text {
        font-size: 14px;
    }

    .cf-btn {
        width: 32px;
        height: 32px;
    }

    .cf-btn svg {
        width: 18px;
        height: 18px;
    }
}