.vx-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}
.vx-stage.is-fullscreen {
    aspect-ratio: auto;
    height: 100%;
    border-radius: 0;
}
.vx-media, .vx-video, .vx-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    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: 12px;
    padding: 16px;
    text-align: center;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
    transition: opacity .2s ease;
}
.vx-overlay[data-state="buffering"] {
    background: rgba(0, 0, 0, .35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}
.vx-message {
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .03em;
    max-width: 90%;
    overflow-wrap: anywhere;
}
.vx-overlay[data-state="error"] .vx-message,
.vx-overlay[data-state="embed_blocked"] .vx-message,
.vx-overlay[data-state="unsupported"] .vx-message {
    color: #ff9da8;
}
.vx-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.vx-actions .vx-btn, .vx-overlay .vx-btn {
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #0b0d12;
    border: 0;
    border-radius: 10px;
    font: 700 .8rem/1 inherit;
    letter-spacing: .05em;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.vx-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, .15);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: vx-spin .75s linear infinite;
}
@keyframes vx-spin {
    to { transform: rotate(360deg); }
}

.vx-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .88));
    z-index: 2;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.vx-stage.hide-controls .vx-controls:not(:hover):not(:focus-within) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}
.vx-controls.is-frame {
    top: 0;
    bottom: auto;
    left: auto;
    width: auto;
    padding: 6px;
    background: none;
    opacity: .8;
}
.vx-controls.is-frame:hover {
    opacity: 1;
}
.vx-controls.is-frame .vx-spacer {
    display: none;
}
.vx-spacer {
    flex: 1;
}
.vx-ctl {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s, transform .1s;
}
.vx-controls.is-frame .vx-ctl {
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.vx-ctl:hover {
    background: rgba(255, 255, 255, .15);
}
.vx-ctl:active {
    transform: scale(0.92);
}
.vx-volume {
    width: 72px;
    accent-color: var(--brand);
    cursor: pointer;
}
.vx-select {
    min-height: 34px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .78rem;
    max-width: 80px;
    padding: 0 4px;
}
.vx-live-badge {
    background: transparent;
    border: 0;
    font-family: inherit;
    color: var(--live);
    font-size: .75rem;
    font-weight: 700;
    margin: 0 4px;
    padding: 3px 6px;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, opacity .15s ease;
}
.vx-live-badge:hover {
    background: rgba(255, 42, 68, 0.12);
}
.vx-live-badge:active {
    transform: scale(0.95);
}
.vx-live-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 6px var(--live);
    animation: vx-pulse 1.3s infinite ease-in-out;
}

@media (max-width: 480px) {
    .vx-volume {
        display: none;
    }
    .vx-ctl {
        min-width: 38px;
        min-height: 38px;
    }
    .vx-controls {
        padding: 6px 8px;
    }
}
