/* Unified Player Container */
.pro-player_container {
    --primary: #3b82f6;
    --bg-body: #0f172a;
    --bg-overlay: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 20%, rgba(0, 0, 0, 0) 100%);
    --text-main: #f8fafc;
    --border: rgba(255, 255, 255, 0.1);
    --live-red: #ef4444;
    position: relative;
    background: #000;
    overflow: hidden;
    aspect-ratio: 16/9;
    max-width: 100%;
    max-height: 100%;
    color: #FFF;
}

.pro-player_embed-box {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: auto;
}

.pro-player_embed-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.pro-player_container.state-embed .pro-player_video {
    display: none !important;
}

.state-embed .pro-player_ui-layer {
    display: none !important;
}

.pro-player_container.state-embed .pro-player_error-box {
    display: none !important;
}

.pro-player_container video, 
.pro-player_container iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Unified Overlay Layer */
.pro-player_ui-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    background: var(--bg-overlay);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.pro-player_container:hover .pro-player_ui-layer,
.pro-player_container.state-paused .pro-player_ui-layer {
    opacity: 1;
    pointer-events: auto;
}

.pro-player_container.hide-cursor {
    cursor: none;
}

/* Top Area */
.pro-player_ui-top {
    display: flex;
    justify-content: flex-start;
}
.pro-player_live-badge {
    background: var(--live-red);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}
.state-vod .pro-player_live-badge {
    display: none !important;
}

.pro-player_live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

/* Center Area */
.pro-player_ui-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.pro-player_big-icon-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0.5);
}
.pro-player_big-icon-wrapper svg {
    width: 30px;
    height: 30px;
}
.pro-player_container.state-paused .pro-player_big-icon-wrapper {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.animate-pop {
    animation: popEffect 0.5s ease-out forwards;
}
@keyframes popEffect {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pro-player_loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
}
.pro-player_container.state-loading .pro-player_loader {
    display: block;
}
.pro-player_container.state-loading .pro-player_big-icon-wrapper {
    display: none;
}

/* Bottom Area (Controls) */
.pro-player_ui-bottom {
    width: 100%;
    pointer-events: auto;
}

.pro-player_container.state-live .pro-player_progress-container {
    display: none !important;
}

.pro-player_progress-container {
    margin-bottom: 16px;
}

.pro-player_seekbar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    appearance: none;
    outline: none;
    cursor: pointer;
}
.seekbar::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
}

.pro-player_control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pro-player_controls-left,
.pro-player_controls-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pro-player_btn-icon {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition:
        color 0.2s,
        transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pro-player_btn-icon:hover {
    color: var(--primary);
}
.pro-player_btn-icon:active {
    transform: scale(0.9);
}
.pro-player_btn-icon svg {
    width: 24px;
    height: 24px;
}

.pro-player_vol-box {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pro-player_vol-slider {
    width: 0;
    overflow: hidden;
    transition: width 0.3s;
}
.pro-player_vol-box:hover .pro-player_vol-slider {
    width: 80px;
}

/* Timecode Styling */
.pro-player_time-text {
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    min-width: 45px;
}

.pro-player_live-text {
    display: none;
    color: var(--live-red);
    font-weight: 800;
    letter-spacing: 1.5px;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.pro-player_live-text::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--live-red);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1s infinite;
}

.state-live .pro-player_live-text {
    display: flex !important;
}
.state-live .pro-player_timecode-wrapper {
    display: none !important;
}

.state-vod .pro-player_live-text {
    display: none !important;
}
.state-vod .pro-player_timecode-wrapper {
    display: flex !important;
}

/* Error Message Layer */
.pro-player_error-box {
    position: absolute;
    inset: 0;
    background: #0f172a;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
    text-align: center;
}
.state-error .pro-player_error-box {
    display: flex;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
