.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center
}

.modal.hidden {
    display: none
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 27, 40, .48);
    backdrop-filter: blur(4px)
}

.video-modal,
.export-modal,
.settings-modal {
    position: relative;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .24);
    padding: 20px
}

.video-modal {
    width: min(920px, 90vw)
}

.export-modal,
.settings-modal {
    width: min(620px, 90vw)
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 12px;
    border: 0;
    background: #f2f4f7;
    color: #667084;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer
}

.video-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 42px;
    margin-bottom: 14px
}

.video-head h2,
.export-modal h2,
.settings-modal h2 {
    margin: 4px 0 16px;
    font-size: 19px
}

.download-btn {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700
}

.video-modal video {
    width: 100%;
    display: block;
    border-radius: 9px;
    background: #111;
    max-height: 70vh
}

.export-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px
}

.export-grid button {
    border: 1px solid var(--line);
    background: #fafbfc;
    border-radius: 11px;
    text-align: left;
    padding: 16px;
    cursor: pointer
}

.export-grid button:hover {
    border-color: #bfc7ff;
    background: #f7f8ff
}

.export-grid b {
    display: block;
    font-size: 15px
}

.export-grid span {
    display: block;
    color: #8a94a3;
    font-size: 10px;
    margin-top: 5px
}

.export-status {
    margin-top: 16px;
    padding: 10px;
    background: #f6f7fa;
    border-radius: 8px;
    color: #7c8797;
    font-size: 10px
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.settings-grid label {
    font-size: 10px;
    color: #788396
}

.settings-grid .input {
    margin-top: 5px
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #172033;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: .2s;
    z-index: 200
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}


/* =========================================================
   PNG 导出预览
========================================================= */

.png-preview {
    width: 100%;
    max-height: 70vh;

    box-sizing: border-box;
    padding: 16px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.png-preview img {
    display: block;

    max-width: 100%;
    max-height: 65vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   PPTX 导出结果
========================================================= */

.pptx-result {
    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.pptx-icon {
    margin-bottom: 16px;

    font-size: 28px;
    font-weight: 700;
}