/* Modern Streaming Player Theme - Sportika Style */

:root {
    --player-destructive: #dc2626;
    --player-destructive-hover: #b91c1c;
    --player-foreground: #ffffff;
    --player-foreground-muted: rgba(255, 255, 255, 0.75);
    --player-bg-popover: rgba(30, 30, 30, 0.95);
    --player-border: rgba(255, 255, 255, 0.12);
    --player-ring: rgba(255, 255, 255, 0.2);
}

.shaka-controls-container,
.shaka-play-button-container,
.shaka-scrim-container {
    display: none !important;
}

.shaka-spinner-container,
.shaka-spinner,
.shaka-buffering-spinner {
    display: none !important;
}

.custom-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 32px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 45;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.custom-pause-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 30;
}

.custom-pause-overlay.is-visible {
    opacity: 1;
}

.custom-pause-icon {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.custom-controls.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.custom-controls-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-time {
    color: rgba(255, 255, 255, 0.75);
    min-width: 45px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.custom-seekbar {
    position: relative;
    flex: 1;
    height: 18px;
    display: flex;
    align-items: center;
}

.custom-seekbar-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transition: height 0.2s ease;
}

.custom-seekbar-buffer {
    height: 100%;
    width: 0;
    background: rgba(255, 255, 255, 0.2);
}

.custom-seekbar-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--player-destructive);
    transition: width 0.1s linear;
}

.custom-seek-input {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 18px;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.custom-seek-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--player-destructive);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    z-index: 3;
}

.custom-seekbar:hover .custom-seekbar-track {
    height: 6px;
}

.custom-seekbar:hover .custom-seek-thumb {
    transform: translate(-50%, -50%) scale(1.1);
}

.custom-live-badge {
    background: var(--player-destructive);
    color: var(--player-foreground);
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}

.custom-live-badge.back-live {
    background: rgba(255, 255, 255, 0.35);
    color: #111;
}

.custom-controls-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-controls-left,
.custom-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-icon-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.custom-pill-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-pill-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.custom-volume {
    position: relative;
    width: 90px;
    height: 18px;
    display: flex;
    align-items: center;
}

.custom-volume-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.custom-volume-fill {
    height: 100%;
    width: 100%;
    background: var(--player-destructive);
}

.custom-volume-input {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 18px;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

@keyframes enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.custom-menu {
    position: absolute;
    bottom: 60px;
    right: 16px;
    background: var(--player-bg-popover);
    border: 1px solid var(--player-border);
    border-radius: 8px;
    width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    animation: enter 0.15s ease;
}

.custom-menu button {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
}

.custom-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.custom-menu button[aria-checked="true"] {
    background: rgba(220, 38, 38, 0.2);
    color: var(--player-destructive);
    font-weight: 600;
}

.custom-menu button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-cursor {
    cursor: none !important;
}

.no-cursor * {
    cursor: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .custom-controls {
        padding: 12px 16px 16px;
    }

    .custom-controls-top,
    .custom-controls-bottom {
        gap: 8px;
    }

    .custom-icon-btn {
        padding: 6px;
    }

    .custom-pill-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .custom-volume {
        width: 60px;
    }
}
