.lacorn-perf-player {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 320px;
    overflow: visible;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, .18), rgba(2, 6, 23, .82)),
        var(--lacorn-player-poster, linear-gradient(135deg, #0f172a, #1d4ed8));
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .2);
}

.lacorn-perf-player__play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.lacorn-perf-player__play span {
    position: relative;
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 38px rgba(37, 99, 235, .38);
}

.lacorn-perf-player__play span::after {
    content: '';
    position: absolute;
    left: 29px;
    top: 23px;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 20px solid #fff;
}

.lacorn-perf-player__play strong {
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(2, 6, 23, .68);
    font-size: 15px;
    backdrop-filter: blur(12px);
}

.lacorn-perf-player.is-playing { background: #000; }
.lacorn-perf-player iframe { display: block; width: 100%; height: 100%; min-height: inherit; border: 0; border-radius: inherit; }

.lacorn-lazy-comments {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(248, 250, 252, .96), rgba(239, 246, 255, .9));
    text-align: center;
    content-visibility: auto;
    contain-intrinsic-size: 180px;
}

.lacorn-lazy-comments__button {
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #173b82, #2563eb, #06b6d4);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.lacorn-lazy-comments.is-loading .lacorn-lazy-comments__button { opacity: .68; cursor: wait; }

body.lacorn-dark-theme .lacorn-lazy-comments,
html[data-theme="dark"] .lacorn-lazy-comments {
    border-color: rgba(56, 189, 248, .2);
    background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(8, 47, 73, .9));
}

@media (max-width: 767px) {
    .lacorn-perf-player { min-height: 420px; border-radius: 18px; aspect-ratio: auto; }
    .lacorn-lazy-comments { padding: 16px; border-radius: 18px; }
    .lacorn-lazy-comments__button { width: 100%; }
}

/* lacorn-player-states v1 */
.lacorn-perf-player {
    position: relative;
    isolation: isolate;
    z-index: 5;
    overflow: hidden;
}

.lacorn-perf-player.is-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border: 3px solid rgba(255, 255, 255, .28);
    border-top-color: #22d3ee;
    border-radius: 50%;
    animation: lacorn-player-spin .9s linear infinite;
    z-index: 3;
}

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

.lacorn-perf-player__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background: rgba(2, 6, 23, .82);
    color: #fff;
    z-index: 4;
}

.lacorn-perf-player__fallback[hidden] { display: none; }

.lacorn-perf-player__fallback p {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .86);
}

.lacorn-perf-player__fallback button {
    min-width: 150px;
    min-height: 44px;
    padding: 10px 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.lacorn-perf-player__fallback button.is-secondary {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
}

.lacorn-perf-player iframe {
    position: relative;
    z-index: 2;
}

/* Всплывающие окна и рекламные оверлеи не должны перекрывать область плеера. */
.lacorn-perf-player ~ .my-popup,
body:has(.lacorn-perf-player) .my-popup-overlay {
    pointer-events: auto;
}
