.bunny-player-page,
.bunny-player-page *:not(iframe) {
    box-sizing: border-box;
}

html.is-embed,
html.is-embed body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
}

.bunny-player-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.25), transparent 35%),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
    color: #f8fafc;
    font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.bunny-player-page.is-embed {
    min-height: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.bunny-player-layout {
    max-width: 1220px;
    margin: 0 auto;
    padding: 20px 28px 28px;
}

.bunny-site-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.bunny-site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.28);
}

.bunny-site-logo:hover {
    opacity: 0.94;
}

.bunny-site-mark {
    font-size: 22px;
    line-height: 1;
}

.bunny-site-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.bunny-site-search input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.85);
    color: #e2e8f0;
    font-size: 14px;
}

.bunny-site-search input::placeholder {
    color: #94a3b8;
}

.bunny-site-search input:focus {
    outline: none;
    border-color: #818cf8;
}

.bunny-site-search button {
    height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: #818cf8;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.bunny-site-search button:hover {
    background: #6366f1;
}

.bunny-player-page.is-embed .bunny-player-layout {
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
}

.bunny-player-card {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.45);
}

.bunny-player-page.is-embed .bunny-player-card {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #000;
}

.bunny-player-stage {
    position: relative;
    background: #000;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.bunny-player-page.is-embed .bunny-player-stage {
    aspect-ratio: unset;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
}

.bunny-player-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bunny-player-stage .fluid_video_wrapper {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    background: #000 !important;
    border-radius: inherit;
}

.bunny-player-stage .fluid_video_wrapper video,
.bunny-player-stage .bunny-player-video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #000 !important;
    display: block;
}

.bunny-player-stage .fluid_video_wrapper .fluid_controls_container,
.bunny-player-stage .fluid_video_wrapper .fluid_streaming_type,
.bunny-player-stage .fluid_video_wrapper .fluid_subtitles_container {
    border-radius: inherit;
}

.bunny-player-stage .skip_button,
.bunny-player-stage .skip_control,
.bunny-player-stage .fluid_ad_cta,
.bunny-player-stage .ad_countdown,
.bunny-player-stage .vast_clickthrough {
    z-index: 50 !important;
    pointer-events: auto !important;
}

.bunny-player-stage iframe[id*="vpaid"],
.bunny-player-stage iframe[class*="vpaid"],
.bunny-player-stage [class*="vpaid"],
.bunny-player-stage .fluid_vpaid_slot,
.bunny-player-stage .fluid_vpaidIframe {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    z-index: 40 !important;
    border: 0 !important;
    pointer-events: auto !important;
    background: #000;
}

.bunny-player-stage.is-ad-playing video {
    object-fit: contain !important;
    object-position: center center !important;
}

.bunny-player-error {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 12;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14px;
    backdrop-filter: blur(12px);
    background: rgba(127, 29, 29, 0.9);
    color: #fee2e2;
}

.bunny-player-error[hidden] {
    display: none !important;
}

.bunny-player-panel {
    padding: 28px 30px 30px;
}

.bunny-player-page.is-embed .bunny-player-panel {
    display: none;
}

.bunny-player-title {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.2;
    color: #fff;
}

.bunny-player-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.bunny-player-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    font-size: 13px;
}

.bunny-player-description {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 14px;
}

.bunny-player-embed-box {
    margin-top: 22px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.bunny-player-embed-box label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.bunny-player-embed-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.bunny-player-embed-row textarea {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #020617;
    color: #e2e8f0;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.5;
    resize: vertical;
}

.bunny-player-button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.bunny-player-button:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.bunny-player-note {
    margin-top: 12px;
    color: #94a3b8;
    font-size: 12px;
}

@media (max-width: 768px) {
    .bunny-player-layout {
        padding: 10px;
    }

    .bunny-site-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 12px;
    }

    .bunny-site-logo {
        justify-content: center;
        font-size: 18px;
    }

    .bunny-player-stage {
        aspect-ratio: 16 / 9;
    }

    .bunny-player-title {
        font-size: 22px;
    }

    .bunny-player-panel {
        padding: 18px;
    }

    .bunny-player-embed-row textarea {
        min-height: 112px;
    }

    .bunny-player-embed-row {
        flex-direction: column;
    }
}
