/* VishvaX Stream — Ultra-Futuristic Universal Video Player Engine Styles */

.vx-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    outline: none;
    transition: box-shadow .3s ease;
}

.vx-stage:focus-visible {
    box-shadow: 0 0 0 2px var(--cyber-cyan), 0 20px 50px rgba(0, 0, 0, 0.9);
}

.vx-stage.is-fullscreen {
    aspect-ratio: auto;
    height: 100%;
    width: 100%;
    border: 0;
    border-radius: 0;
}

.vx-media, .vx-video, .vx-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000000;
    transform: translateZ(0);
    will-change: transform;
}

.vx-video {
    object-fit: contain;
}

.vx-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(14, 20, 36, 0.88) 0%, rgba(3, 5, 9, 0.98) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
    z-index: 5;
    transition: opacity .25s ease, visibility .25s ease;
}

.vx-overlay[data-state="buffering"] {
    background: rgba(3, 5, 9, 0.65);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.vx-overlay[data-state="idle"] {
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.9) 0%, rgba(3, 5, 9, 0.98) 100%);
}

.vx-overlay[data-state="ready"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vx-overlay[data-state="ready"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(3, 5, 9, 0.65) 0%, rgba(3, 5, 9, 0.95) 100%);
    z-index: 1;
}

.vx-overlay[data-state="ready"] > * {
    position: relative;
    z-index: 2;
}

.vx-message {
    font-family: var(--font-display, inherit);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--text, #f8fafc);
    max-width: 90%;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

.vx-overlay[data-state="error"] .vx-message,
.vx-overlay[data-state="embed_blocked"] .vx-message,
.vx-overlay[data-state="unsupported"] .vx-message {
    color: #ff4d6d;
    text-shadow: 0 0 16px rgba(255, 77, 109, 0.4);
}

.vx-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
}

.vx-actions .vx-btn, .vx-overlay .vx-btn {
    min-height: 44px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-neon) 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm, 8px);
    font: 800 .84rem/1 var(--font-display, inherit);
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 18px var(--brand-glow);
}

.vx-actions .vx-btn:hover, .vx-overlay .vx-btn:hover {
    background: linear-gradient(135deg, var(--brand-neon) 0%, #ff4d6d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--brand-glow), 0 0 16px rgba(255, 42, 75, 0.5);
}

.vx-actions .vx-btn-alt {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: none;
}

.vx-actions .vx-btn-alt:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.vx-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, .15);
    border-top-color: var(--cyber-cyan);
    border-right-color: var(--brand-neon);
    border-radius: 50%;
    animation: vx-spin .75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.6));
}

@keyframes vx-spin {
    to { transform: rotate(360deg); }
}

/* Custom Controls Bar with Floating Cyber-Glass Deck */
.vx-controls {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    background: rgba(9, 14, 26, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md, 12px);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 10;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    padding: 10px 14px 12px;
}

.vx-stage.hide-controls .vx-controls:not(:hover):not(:focus-within) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.vx-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.vx-controls.is-frame {
    top: 12px;
    bottom: auto;
    left: auto;
    right: 12px;
    width: auto;
    padding: 4px;
    background: rgba(9, 14, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm, 8px);
    backdrop-filter: blur(10px);
    opacity: .95;
}

.vx-controls.is-frame:hover {
    opacity: 1;
}

.vx-controls.is-frame .vx-spacer {
    display: none;
}

.vx-spacer {
    flex: 1;
}

.vx-ctl {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #ffffff;
    border: 0;
    border-radius: var(--radius-sm, 8px);
    font-size: 1.05rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, transform .1s ease, color .15s ease;
    padding: 0 6px;
}

.vx-ctl:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--cyber-cyan);
}

.vx-ctl:active {
    transform: scale(0.92);
}

/* Volume Slider */
.vx-volume {
    width: 72px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    transition: background .15s ease, width .2s ease;
}

.vx-volume:hover {
    background: rgba(255, 255, 255, 0.45);
    width: 86px;
}

.vx-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--cyber-cyan);
    box-shadow: 0 0 8px var(--cyber-cyan);
    cursor: pointer;
    transition: transform .1s ease;
}

.vx-volume::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.vx-volume::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--cyber-cyan);
    border: 0;
    box-shadow: 0 0 8px var(--cyber-cyan);
    cursor: pointer;
}

/* Live Badge with Pulse */
.vx-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 43, 66, 0.18);
    color: var(--live-red);
    border: 1px solid rgba(255, 43, 66, 0.45);
    border-radius: var(--radius-sm, 6px);
    font-family: var(--font-mono, monospace);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 43, 66, 0.25);
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.vx-live-badge:hover {
    background: rgba(255, 43, 66, 0.35);
    border-color: #ff334b;
    transform: scale(1.04);
}

/* Timeline & Progress Bar */
.vx-progress-wrap {
    flex: 1 1 120px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 8px;
}

.vx-progress-bar {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    transition: background .15s ease, height .15s ease;
}

.vx-progress-bar:hover {
    height: 8px;
    background: rgba(255, 255, 255, 0.35);
}

.vx-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-neon);
    box-shadow: 0 0 10px var(--brand-glow);
    cursor: pointer;
}

.vx-progress-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-neon);
    border: 0;
    box-shadow: 0 0 10px var(--brand-glow);
    cursor: pointer;
}

.vx-time-display {
    font-family: var(--font-mono, monospace);
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Select Dropdown in Controls */
.vx-select {
    height: 32px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm, 6px);
    font-family: var(--font-mono, monospace);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    backdrop-filter: blur(8px);
    transition: background .15s ease, border-color .15s ease;
}

.vx-select:hover, .vx-select:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--cyber-cyan);
}

.vx-select option {
    background: #090e1a;
    color: #ffffff;
}

/* Center Big Play Button with Futuristic Concentric Radar Pulse */
.vx-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-neon) 100%);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    z-index: 8;
    pointer-events: auto;
    box-shadow: 
        0 8px 36px var(--brand-glow),
        0 0 28px rgba(255, 42, 75, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), background .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.vx-center-play::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 42, 75, 0.4);
    animation: vx-radar-ring 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    pointer-events: none;
}

@keyframes vx-radar-ring {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.vx-center-play:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background: linear-gradient(135deg, var(--brand-neon) 0%, #ff4d6d 100%);
    box-shadow: 
        0 14px 44px var(--brand-glow),
        0 0 35px rgba(255, 42, 75, 0.9);
}

.vx-center-play.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.85);
}

/* Stats for Nerds HUD Overlay (Cyber-Deck Telemetry Matrix) */
.vx-hud {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(5, 8, 17, 0.92);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: var(--radius-sm, 8px);
    padding: 14px 18px;
    color: #cbd5e1;
    font-family: var(--font-mono, monospace);
    font-size: .75rem;
    line-height: 1.65;
    z-index: 15;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 242, 254, 0.2);
    pointer-events: auto;
}

.vx-hud-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--cyber-cyan);
    font-weight: 700;
    letter-spacing: .06em;
}

.vx-hud-close {
    background: transparent;
    border: 0;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 4px;
    transition: color .15s ease;
}

.vx-hud-close:hover {
    color: var(--brand-neon);
}

.vx-hud-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.vx-hud-label {
    color: #64748b;
}

.vx-hud-val {
    color: var(--cyber-cyan);
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

/* Double Tap Ripple Animations for Mobile */
.vx-tap-ripple {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 254, 0.1);
    color: #ffffff;
    font-family: var(--font-mono, monospace);
    font-size: 1rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    z-index: 9;
    transition: opacity .3s ease;
}

.vx-tap-ripple.left {
    left: 0;
    border-radius: 0 120px 120px 0;
}

.vx-tap-ripple.right {
    right: 0;
    border-radius: 120px 0 0 120px;
}

.vx-tap-ripple.active {
    opacity: 1;
    animation: vx-fade-ripple .5s ease forwards;
}

@keyframes vx-fade-ripple {
    0% { opacity: 0; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); }
}

@media (max-width: 640px) {
    .vx-controls {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 6px 10px 8px;
    }
    .vx-volume {
        width: 44px;
    }
    .vx-ctl {
        min-width: 32px;
        height: 32px;
        font-size: .88rem;
    }
    .vx-select {
        height: 28px;
        font-size: .7rem;
        padding: 0 4px;
    }
    .vx-center-play {
        width: 58px;
        height: 58px;
        font-size: 1.5rem;
    }
}
