/* ═══════════════════════════════════════════════════════
   🎬 HOLWATFLIX PREMIUM VIDEO PLAYER — Shared Styles
   ═══════════════════════════════════════════════════════ */

/* ── Container ── */
#hwPlayerWrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(229, 9, 20, 0.15);
    cursor: default;
    user-select: none;
    max-width: 1100px;
    margin: 2rem auto;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.5s;
}

#hwPlayerWrapper.theater-mode {
    max-width: 100%;
    border-radius: 0;
}

#hwVideo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

/* ── Poster overlay ── */
.hw-poster-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.6s ease;
}

.hw-poster-overlay.hw-hidden {
    opacity: 0;
    pointer-events: none;
}

.hw-poster-bg {
    position: absolute;
    inset: 0;
}

.hw-poster-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) blur(2px);
}

.hw-poster-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

/* ── Mega play button ── */
.hw-play-mega {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.9), rgba(255, 107, 53, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.4), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.hw-play-mega:hover {
    transform: scale(1.12);
    box-shadow: 0 0 80px rgba(229, 9, 20, 0.6), 0 10px 50px rgba(0, 0, 0, 0.6);
}

.hw-play-mega svg {
    width: 44px;
    height: 44px;
    fill: #fff;
    margin-left: 5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hw-play-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(229, 9, 20, 0.4);
    animation: hwRingPulse 2s ease-in-out infinite;
}

@keyframes hwRingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.hw-poster-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
}

.hw-poster-badges {
    display: flex;
    gap: 0.6rem;
}

.hw-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.hw-badge-hd {
    background: rgba(229, 9, 20, 0.25);
    border: 1px solid rgba(229, 9, 20, 0.5);
    color: #ff8a50;
}

.hw-badge-dub {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.hw-badge-dur {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

/* ── Loading spinner ── */
.hw-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.hw-loading.hw-active {
    opacity: 1;
}

.hw-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.hw-spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #E50914;
    border-radius: 50%;
    animation: hwSpin 0.9s linear infinite;
}

@keyframes hwSpin {
    to {
        transform: rotate(360deg);
    }
}

.hw-spinner-logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 0.9rem;
    color: #E50914;
}

/* ── Center indicator ── */
.hw-center-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 18;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.2s;
}

.hw-center-indicator.hw-flash {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hw-center-indicator svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

/* ── Skip indicators ── */
.hw-skip-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.7);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    z-index: 18;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.25s;
}

.hw-skip-indicator.hw-flash {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.hw-skip-back {
    left: 15%;
}

.hw-skip-fwd {
    right: 15%;
}

.hw-skip-indicator svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.hw-skip-indicator span {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}

/* ── Gradient overlays ── */
.hw-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    z-index: 8;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.hw-gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    z-index: 8;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

#hwPlayerWrapper:hover .hw-gradient-top,
#hwPlayerWrapper:hover .hw-gradient-bottom,
#hwPlayerWrapper.hw-controls-visible .hw-gradient-top,
#hwPlayerWrapper.hw-controls-visible .hw-gradient-bottom {
    opacity: 1;
}

/* ── Top bar ── */
.hw-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s, transform 0.4s;
}

#hwPlayerWrapper:hover .hw-top-bar,
#hwPlayerWrapper.hw-controls-visible .hw-top-bar {
    opacity: 1;
    transform: translateY(0);
}

.hw-brand-mini {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.5px;
}

.hw-brand-mini span {
    background: linear-gradient(135deg, #E50914, #FF6B35);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Controls ── */
.hw-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px 10px;
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s, transform 0.4s;
}

#hwPlayerWrapper:hover .hw-controls,
#hwPlayerWrapper.hw-controls-visible .hw-controls {
    opacity: 1;
    transform: translateY(0);
}

/* ── Progress bar ── */
.hw-progress-container {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 4px;
}

.hw-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: height 0.15s;
}

.hw-progress-container:hover .hw-progress-bar {
    height: 6px;
}

.hw-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: width 0.3s;
}

.hw-progress-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #E50914, #FF6B35);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.hw-progress-thumb {
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #E50914;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.6);
    transition: transform 0.15s;
}

.hw-progress-container:hover .hw-progress-thumb {
    transform: translateY(-50%) scale(1);
}

.hw-progress-preview {
    position: absolute;
    bottom: 24px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    transform: translateX(-50%);
    white-space: nowrap;
}

.hw-progress-container:hover .hw-progress-preview {
    opacity: 1;
}

/* ── Button row ── */
.hw-btn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hw-btn-left,
.hw-btn-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Control buttons ── */
.hw-ctrl-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s;
    color: #fff;
    padding: 0;
}

.hw-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hw-ctrl-btn:active {
    transform: scale(0.9);
}

.hw-ctrl-btn svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.hw-skip-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Volume ── */
.hw-volume-group {
    display: flex;
    align-items: center;
}

.hw-volume-slider-wrap {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.hw-volume-group:hover .hw-volume-slider-wrap {
    width: 80px;
}

.hw-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.hw-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.hw-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
}

/* ── Time ── */
.hw-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
}

.hw-time-sep {
    margin: 0 4px;
    opacity: 0.4;
}

/* ── Speed menu ── */
.hw-speed-group {
    position: relative;
}

.hw-speed-btn {
    width: auto !important;
    padding: 0 10px !important;
}

#hwSpeedText {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: #fff;
}

.hw-speed-menu {
    position: absolute;
    bottom: 48px;
    right: 0;
    background: rgba(12, 8, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px 0;
    min-width: 110px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s;
    z-index: 30;
}

.hw-speed-group:hover .hw-speed-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hw-speed-opt {
    padding: 8px 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
}

.hw-speed-opt:hover {
    background: rgba(229, 9, 20, 0.1);
    color: #fff;
}

.hw-speed-opt.active {
    color: #E50914;
    font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #hwPlayerWrapper {
        border-radius: 10px;
        margin: 1rem auto;
    }

    .hw-play-mega {
        width: 70px;
        height: 70px;
    }

    .hw-play-mega svg {
        width: 32px;
        height: 32px;
    }

    .hw-poster-title {
        font-size: 1rem;
    }

    .hw-badge {
        font-size: 0.6rem;
        padding: 3px 10px;
    }

    .hw-ctrl-btn {
        width: 34px;
        height: 34px;
    }

    .hw-ctrl-btn svg {
        width: 18px;
        height: 18px;
    }

    .hw-skip-btn {
        display: none;
    }

    .hw-time {
        font-size: 0.72rem;
    }

    .hw-speed-btn {
        display: none !important;
    }

    .hw-controls {
        padding: 0 10px 6px;
    }
}

@media (max-width: 480px) {
    .hw-play-mega {
        width: 56px;
        height: 56px;
    }

    .hw-play-mega svg {
        width: 26px;
        height: 26px;
    }

    .hw-poster-badges {
        gap: 0.3rem;
    }

    .hw-poster-title {
        font-size: 0.85rem;
    }

    .hw-play-ring {
        inset: -5px;
    }
}