/* Isolated Scoped Styles - Advanced Video Player */
.avp-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    background-color: #000000;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.avp-media-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.avp-iframe-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.avp-iframe-wrapper iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.avp-gradient-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.avp-ui-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* UI Elements Pointer Control */
.avp-top-bar, .avp-center-play-btn, .avp-bottom-bar {
    pointer-events: auto;
}

/* Top Bar */
.avp-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.avp-sub-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a1a1aa;
    display: block;
}

.avp-main-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 4px 0 0 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.avp-author-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.avp-author-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}

.avp-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Center Play Button */
.avp-center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.avp-center-play-btn i {
    margin-left: 4px;
}

.avp-center-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0, 0, 0, 0.85);
}

/* Bottom Bar */
.avp-bottom-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Seekbar */
.avp-timeline-container {
    position: relative;
    width: 100%;
    height: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.avp-timeline-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    transition: height 0.15s ease;
}

.avp-timeline-container:hover .avp-timeline-track {
    height: 8px;
}

.avp-timeline-fill {
    width: 0%;
    height: 100%;
    background: #eab308;
}

.avp-seekbar-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

/* Controls Row */
.avp-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.avp-controls-left, .avp-controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avp-controls-left button, .avp-controls-right button {
    background: none;
    border: none;
    color: #d4d4d8;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}

.avp-controls-left button:hover, .avp-controls-right button:hover {
    color: #ffffff;
}

.avp-volume-slider {
    width: 60px;
    accent-color: #eab308;
    cursor: pointer;
}

.avp-time-display {
    font-size: 12px;
    font-family: monospace;
    color: #a1a1aa;
}

.avp-brand-logo {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.avp-brand-red { color: #dc2626; }
.avp-brand-white { color: #ffffff; font-weight: 300; margin-left: 2px; }

/* Active Playing State */
.avp-container.avp-playing .avp-gradient-layer {
    opacity: 0;
}
.avp-container.avp-playing .avp-top-bar,
.avp-container.avp-playing .avp-center-play-btn {
    opacity: 0;
    pointer-events: none;
}
.avp-container.avp-playing:hover .avp-gradient-layer {
    opacity: 1;
}
.avp-container.avp-playing:hover .avp-top-bar {
    opacity: 1;
    pointer-events: auto;
}