.zib-vp-page {
    --zib-vp-border: rgba(120, 130, 150, 0.14);
    --zib-vp-soft: rgba(120, 130, 150, 0.07);
    --zib-vp-shadow: 0 10px 30px rgba(32, 45, 65, 0.06);
}

.zib-vp-shell {
    max-width: 980px;
    margin: 0 auto;
}

.zib-dap-shell {
    max-width: 1180px;
}

.zib-vp-disclaimer {
    margin: 14px 0 4px;
    color: var(--muted-2-color, #8590a6);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.zib-vp-panel {
    overflow: hidden;
    border: 1px solid var(--zib-vp-border);
    box-shadow: var(--zib-vp-shadow);
}

.zib-vp-header {
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 10px;
}

.zib-vp-heading,
.zib-dap-account-head {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.zib-vp-heading .box-title,
.zib-dap-account-head .box-title {
    margin: 0 0 4px;
    line-height: 1.35;
}

.zib-vp-heading p,
.zib-dap-account-head p {
    margin: 0;
}

.zib-vp-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(47, 128, 237, 0.1);
    color: var(--focus-color, #2f80ed);
    font-size: 18px;
}

.zib-dap-icon {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.zib-vp-header-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.zib-vp-header-badge {
    white-space: nowrap;
}

.zib-vp-switch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    line-height: 1.2;
    white-space: nowrap;
}

.zib-vp-textarea-wrap {
    overflow: hidden;
    border: 1px solid rgba(120, 130, 150, 0.18);
    border-radius: 8px;
    background: var(--zib-vp-soft);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.zib-vp-textarea-wrap:focus-within {
    border-color: var(--focus-color, #2f80ed);
    background: var(--main-bg-color, #fff);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.08);
}

.zib-vp-textarea {
    min-height: 126px;
    padding: 14px 16px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    resize: vertical;
}

.zib-vp-input-hint {
    gap: 10px;
    padding: 9px 12px;
    border-top: 1px dashed rgba(120, 130, 150, 0.16);
    color: var(--muted-color, #888);
    font-size: 12px;
}

.zib-vp-input-hint span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zib-vp-input-hint .is-active {
    color: var(--focus-color, #2f80ed);
    font-weight: 700;
}

.zib-vp-billing {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(120, 130, 150, 0.16);
    border-radius: 8px;
    background: var(--zib-vp-soft);
}

.zib-vp-billing.is-disabled {
    border-color: rgba(235, 87, 87, 0.28);
    background: rgba(235, 87, 87, 0.06);
}

.zib-vp-billing.is-free {
    border-style: dashed;
}

.zib-vp-billing-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.zib-vp-billing-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(47, 128, 237, 0.1);
    color: var(--focus-color, #2f80ed);
}

.zib-vp-billing-main strong,
.zib-vp-billing-main p {
    display: block;
    margin: 0;
    line-height: 1.5;
}

.zib-vp-billing-prices,
.zib-vp-billing-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.zib-vp-billing-prices span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--main-bg-color, #fff);
    color: var(--muted-color, #777);
    font-size: 12px;
    white-space: nowrap;
}

.zib-vp-billing-actions {
    grid-column: 1 / -1;
}

.zib-vp-billing-actions:empty {
    display: none;
}

.zib-vp-billing-actions .but,
.zib-vp-billing-actions .btn,
.zib-vp-billing-actions a {
    margin: 0;
}

.zib-vp-form-actions,
.zib-vp-sub-actions,
.btn-group-wrapper {
    flex-wrap: wrap;
}

.zib-vp-form-actions {
    margin-top: 14px;
}

.zib-vp-primary-btn {
    min-width: 150px;
}

.zib-vp-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    border: 1px dashed rgba(120, 130, 150, 0.22);
    border-radius: 8px;
    background: var(--zib-vp-soft);
}

.zib-vp-loading-state {
    margin-top: 14px;
    justify-content: flex-start;
}

.zib-vp-loading-state strong,
.zib-vp-loading-state p {
    display: block;
    margin: 0;
    line-height: 1.5;
}

.zib-vp-empty-body {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted-color, #777);
}

.zib-vp-empty-body > i {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--zib-vp-soft);
    color: var(--focus-color, #2f80ed);
    font-size: 18px;
}

.zib-vp-empty-body h4,
.zib-vp-empty-body p {
    margin: 0;
    line-height: 1.55;
}

.zib-vp-result-panel {
    margin-right: auto;
    margin-left: auto;
}

.zib-vp-video-card {
    max-width: 680px;
    margin: 0 auto 16px;
}

.zib-vp-play-card {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #111;
    color: #fff;
    cursor: pointer;
}

.zib-vp-play-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.zib-vp-play-card:hover img {
    transform: scale(1.03);
}

.zib-vp-cover-empty,
.zib-vp-play-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zib-vp-cover-empty {
    color: rgba(255, 255, 255, 0.45);
    font-size: 56px;
}

.zib-vp-play-mask {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
}

.zib-vp-play-mask i {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 20px;
    text-indent: 3px;
}

.zib-vp-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.zib-vp-image-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    background: var(--zib-vp-soft);
}

.zib-vp-image-item img {
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.zib-vp-image-item:hover img {
    transform: scale(1.04);
}

.zib-vp-image-download {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.62);
    color: #fff !important;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.zib-vp-image-download:hover {
    background: var(--focus-color, #2f80ed);
    color: #fff !important;
}

.zib-vp-image-item:hover .zib-vp-image-download,
.zib-vp-image-download:focus {
    opacity: 1;
    transform: translateY(0);
}

.zib-vp-result-head {
    width: 100%;
    max-width: 720px;
    margin: 12px auto 15px;
    text-align: left;
}

.zib-vp-author {
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--zib-vp-soft);
    color: var(--muted-color, #777);
    font-size: 13px;
}

.zib-vp-author-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--border-color, #eee);
    object-fit: cover;
}

.zib-vp-author-meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.zib-vp-author-label {
    color: var(--muted-color, #999);
    font-size: 12px;
    line-height: 1.2;
}

.zib-vp-author-name {
    overflow: hidden;
    color: var(--main-color, #333);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zib-vp-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.zib-vp-title-main {
    min-width: 0;
    flex: 1 1 260px;
}

.zib-vp-title-row .box-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 6px 0 0;
    line-height: 1.55;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.zib-vp-result-actions {
    margin-top: 8px;
}

.zib-vp-video-modal .modal-dialog {
    width: min(920px, calc(100vw - 28px));
}

.zib-vp-video-modal .modal-content {
    overflow: hidden;
    border-radius: 8px;
    background: var(--main-bg-color, #fff);
}

.zib-vp-modal-body {
    padding: 14px;
}

.zib-vp-modal-title {
    margin: 0 42px 12px 0;
    color: var(--main-color, #333);
    font-weight: 700;
}

.zib-vp-theme-dplayer,
.zib-vp-fallback-video {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.zib-vp-fallback-video {
    max-height: 78vh;
}

.zib-dap-options {
    display: grid;
    grid-template-columns: 150px 150px minmax(190px, 1fr) auto 190px;
    gap: 12px;
    margin: 14px 0 16px;
    align-items: end;
}

.zib-dap-field,
.zib-dap-check {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 6px;
    color: var(--muted-color, #777);
    font-size: 13px;
    font-weight: 400;
}

.zib-dap-field .form-control {
    height: 38px;
    border-radius: 8px;
}

.zib-dap-check {
    min-height: 38px;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    padding: 8px 10px;
    border: 1px solid rgba(120, 130, 150, 0.18);
    border-radius: 8px;
    background: var(--zib-vp-soft);
    color: var(--main-color, #333);
    white-space: nowrap;
}

.zib-dap-result-header {
    align-items: flex-start;
    gap: 12px;
}

.zib-dap-result-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.zib-dap-summary {
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--zib-vp-soft);
}

.zib-dap-summary span {
    font-weight: 700;
}

.zib-dap-summary p {
    margin: 2px 0 0;
}

.zib-dap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.zib-dap-card {
    overflow: hidden;
    border: 1px solid rgba(120, 130, 150, 0.12);
    border-radius: 8px;
    background: var(--main-bg-color, #fff);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.zib-dap-card:hover {
    border-color: rgba(120, 130, 150, 0.22);
    box-shadow: 0 8px 24px rgba(32, 45, 65, 0.08);
    transform: translateY(-2px);
}

.zib-dap-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--zib-vp-soft);
}

.zib-dap-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.zib-dap-card-image .zib-dap-card-media img {
    cursor: zoom-in;
}

.zib-dap-card:hover .zib-dap-card-media img {
    transform: scale(1.04);
}

.zib-dap-card-empty {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--muted-color, #999);
}

.zib-dap-type,
.zib-dap-duration {
    position: absolute;
    z-index: 2;
}

.zib-dap-type {
    top: 10px;
    left: 10px;
}

.zib-dap-duration {
    right: 10px;
    bottom: 10px;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.64);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
}

.zib-dap-media-play {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.42));
    color: #fff;
    cursor: pointer;
}

.zib-dap-media-play i {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.44);
    color: #fff;
    text-indent: 3px;
}

.zib-dap-card-body {
    padding: 12px;
}

.zib-dap-card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0 0 8px;
    color: var(--main-color, #333);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.zib-dap-card-meta {
    overflow: hidden;
    margin-bottom: 10px;
    color: var(--muted-color, #999);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zib-dap-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
    color: var(--muted-color, #777);
    font-size: 12px;
}

.zib-dap-stats span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zib-dap-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.zib-dap-preview-tip {
    cursor: default;
}

.zib-dap-more-wrap {
    margin-top: 18px;
}

.zib-vp-empty-inline {
    margin-top: 12px;
}

.zib-vp-user-records {
    --zib-vp-border: rgba(120, 130, 150, 0.14);
    --zib-vp-soft: rgba(120, 130, 150, 0.07);
}

.zib-vp-history-head {
    overflow: hidden;
    border: 1px solid var(--zib-vp-border);
}

.zib-vp-history-list {
    display: grid;
    gap: 12px;
}

.zib-vp-history-card {
    position: relative;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
    overflow: hidden;
    padding: 12px;
    border: 1px solid var(--zib-vp-border);
}

.zib-vp-history-delete-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(235, 87, 87, 0.22);
    border-radius: 50%;
    background: rgba(235, 87, 87, 0.1);
    color: #eb5757;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(235, 87, 87, 0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.zib-vp-history-delete-icon:hover,
.zib-vp-history-delete-icon:focus {
    background: #eb5757;
    color: #fff;
    box-shadow: 0 8px 20px rgba(235, 87, 87, 0.28);
    transform: translateY(-1px);
}

.zib-vp-history-delete-text {
    border-color: rgba(235, 87, 87, 0.28) !important;
    background: #eb5757 !important;
    color: #fff !important;
}

.zib-vp-history-delete-text:hover,
.zib-vp-history-delete-text:focus {
    background: #d94343 !important;
    color: #fff !important;
}

.zib-vp-history-media {
    overflow: hidden;
    border-radius: 8px;
    background: var(--zib-vp-soft);
    aspect-ratio: 1 / 1;
}

.zib-vp-history-media img,
.zib-vp-history-media span {
    width: 100%;
    height: 100%;
}

.zib-vp-history-media img {
    object-fit: cover;
}

.zib-vp-history-media span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--focus-color, #2f80ed);
    font-size: 34px;
}

.zib-vp-history-main {
    min-width: 0;
}

.zib-vp-history-title {
    align-items: flex-start;
    margin-bottom: 8px;
}

.zib-vp-history-title h4 {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    color: var(--main-color, #333);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.zib-vp-history-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.zib-vp-history-billing {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: -2px 0 12px;
}

.zib-vp-history-billing span {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--zib-vp-soft);
}

.zib-vp-history-actions {
    flex-wrap: wrap;
}

.zib-vp-history-empty {
    padding: 42px 20px;
}

.zib-vp-history-empty i {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 8px;
    background: var(--zib-vp-soft);
    color: var(--focus-color, #2f80ed);
    font-size: 22px;
}

.zib-vp-history-empty h4,
.zib-vp-history-empty p {
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .zib-dap-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .zib-dap-field-grow,
    .zib-dap-field-file {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .zib-vp-header,
    .zib-dap-result-header,
    .zib-dap-summary {
        flex-direction: column;
    }

    .zib-vp-header-actions {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .zib-vp-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .zib-vp-switch-link,
    .zib-vp-form-actions > .btn,
    .zib-vp-sub-actions,
    .zib-vp-sub-actions .btn,
    .zib-dap-result-actions,
    .zib-dap-result-actions .btn {
        width: 100%;
    }

    .zib-vp-input-hint,
    .zib-vp-billing {
        flex-direction: column;
        gap: 4px;
    }

    .zib-vp-billing {
        display: flex;
        align-items: stretch;
    }

    .zib-vp-billing-prices,
    .zib-vp-billing-actions {
        justify-content: flex-start;
    }

    .zib-vp-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .zib-vp-image-download {
        opacity: 1;
        transform: none;
    }

    .zib-dap-options,
    .zib-dap-grid {
        grid-template-columns: 1fr;
    }

    .zib-vp-history-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .zib-vp-history-title {
        flex-direction: column;
    }

    .zib-dap-field-grow,
    .zib-dap-field-file {
        grid-column: auto;
    }

    .zib-vp-empty-body,
    .zib-vp-heading,
    .zib-dap-account-head {
        align-items: flex-start;
    }

    .zib-vp-video-modal .modal-dialog {
        width: calc(100vw - 20px);
    }
}
