body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 10vh;
    background-color: #fff;
    margin: 0;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.header {
    display: flex;
    align-items: center;
    /* 新增：让 .header 内部的内容在水平方向居中 */
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 50px;
}

#video-icon {
    width: 40px;
    height: 40px;
    fill: #ff9900;
}

.video-text {
    font-size: 3rem;
    font-weight: 500;
    color: #000;
    margin-left: 20px;
}

.container {
    width: 100%;
    /* max-width: 600px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: max-width 0.3s ease-in-out;
}

.main-input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    padding: 10px;
    background-color: #f7f7f7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.input-top-row {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.input-top-row textarea {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 1rem;
    color: #333;
    resize: none;
    overflow: hidden;
    height: 70px;
}

.input-top-row textarea::placeholder {
    color: #aaa;
}

.generate-button {
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.generate-button:hover {
    background-color: #333;
}

.generate-button svg {
    width: 18px;
    height: 38px;
    fill: #fff;
    margin-right: 5px;
    flex-shrink: 0;
}

.sub-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
}

.sub-button {
    background-color: #f0f0f0;
    color: #555;
    padding: 5px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

/* 禁用状态的按钮样式 */
.sub-button.disabled-button {
    background-color: #d0d0d0;
    color: #888;
    cursor: not-allowed;
}

.sub-button.disabled-button svg {
    fill: #888;
}

.sub-button:not(.disabled-button):hover {
    background-color: #e5e5e5;
}

.sub-button svg {
    width: 14px;
    height: 14px;
    fill: #555;
    margin-right: 5px;
}

.image-box-container {
    display: none;
    /* 初始隐藏 */
    gap: 10px;
    margin: 0 10px;
}

/* 单独控制 image-box 元素的显示 */
.image-box {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-color: #302929;
    display: none;
    /* 初始隐藏 */
    border: 1px solid #ccc;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.image-box.active {
    display: block;
    /* 有缩略图时显示 */
}

/* 新增：用于确保加载 GIF 显示时，image-box 元素是可见的 */
.image-box.is-loading {
    display: block;
}

.image-box.has-video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    fill: #fff;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.image-box:hover .play-icon {
    opacity: 1;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-box:hover {
    transform: scale(1.1) rotate(-8deg);
}

.delete-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 20px;
    height: 20px;
    background-color: #ff4d4f;
    border-radius: 50%;
    color: #fff;
    font-family: sans-serif;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.image-box:hover .delete-btn {
    opacity: 1;
}

/* 视频播放器样式 */
.video-container {
    display: none;
    /* 初始隐藏 */
    width: 1090px;
    height: 445px;
    border-radius: 20px;
    position: relative;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.video-container.visible {
    display: flex;
}

.video-player {
    height: 100%;
    width: auto;
    display: block;
    border: 10px solid #000;
    box-sizing: border-box;
    outline: 2px solid #ccc;
    outline-offset: -12px;
}

.download-link {
    position: absolute;
    right: 20px;
    bottom: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-link:hover {
    color: #000;
}

.download-icon {
    width: 16px;
    height: 16px;
    color: #666;
}

/* 新增：模态弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}



.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}



.modal-option {
    background-color: #f7f7f7;
    padding: 5px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 138px;
}

.modal-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-option-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
}

/* 新增：提示弹窗样式 */
.alert-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.alert-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.alert-modal-content p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
}

.alert-modal-content button {
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.alert-modal-content button:hover {
    background-color: #333;
}

.aiinkeduser-info-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
    /* 将内边距改为 2px */
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: auto;
    width: 100%;
}

.aiinkeduser-info-item {
    display: flex;
    align-items: center;

    margin-right: 2px;
    /* 将右边距改为 2px */
}

.aiinkedchakra-icon {
    width: 26px;
    /* 将图标宽度改为 16px */
    height: 26px;
    /* 将图标高度改为 16px */
    margin-right: 2px;
    /* 将图标右边距改为 2px */

}

span {
    font-family: "DM Sans Variable", sans-serif;
    font-size: 14px;
    /* 设置字体大小为 15px */
    font-weight: bold;
    /* 设置字体加粗 */
    color: #333;
    /* 设置字体颜色为深灰色 */
}

.generate-button {
    /* 保持您已有的样式，例如： */
    background-color: #27292c;
    /* 示例主色 */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    /* 图标和文本之间的间距 */
    font-size: 16px;

    /* --- 动画修改从这里开始 --- */
    transition: all 0.1s ease-out;
    /* 使过渡更平滑 */

    /* 1. 添加阴影来创建“深度” */
    box-shadow: 0 4px 0 #3e3f41;
    /* 较暗的蓝色阴影 */
}

/* 鼠标悬停时的效果（可选，提升用户体验） */
.generate-button:hover {
    background-color: #232425;
}

/* 按钮被点击按下时 (核心动画) */
.generate-button:active {
    box-shadow: none;
    /* 移除阴影 */
    transform: translateY(4px);
    /* 向下移动 4px */
}

/* Lora Model 下拉选择框样式  */
.aiinked-video-select {
    /* 模仿 sub-button 和 main-input-group 的基础样式 */
    width: 100%;
    padding: 3px 15px;
    border-radius: 3px;
    /* 修正：边框颜色应为标准的六位十六进制 */
    border: 1px solid #e0e0e0;
    background-color: #f7f7f7;
    font-size: 1rem;
    color: #333;
    height: auto;

    /* 移除浏览器默认外观 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* 添加自定义下拉箭头 */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%20177.3c-.5%200-1%200-1.5%200-1.8%200-3.6-.6-5.4-1.8L146.2%2042.8%2012%20175.5c-3%203-7.5%203-10.5%200s-3-7.5%200-10.5L135.8%2027.6c3-3%207.5-3%2010.5%200l134.3%20134.3c3%203%203%207.5%200%2010.5s-7.5%203-10.5%200z%22%2F%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M5.4%20115.1l134.3%20134.3c3%203%207.5%203%2010.5%200l134.3-134.3c3-3%203-7.5%200-10.5s-7.5-3-10.5%200L146.2%20224.5%2015.9%20115.1c-3-3-7.5-3-10.5%200s-3%207.5%200%2010.5z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 35px;
    /* 为箭头留出空间 */

    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.aiinked-video-select:focus {
    border-color: #ff9900;
    /* 聚焦时边框变色 */
}

/* 选项样式（浏览器默认样式难以完全控制，但可以设置字体） */
.aiinked-video-select option {
    background: #fff;
    color: #333;
    padding: 5px 0;
}

/* Lora 选择模型，容器 */
.video-lora-select-contain {
    position: relative;
    display: flex;
    align-items: center;
    border: 8px solid rgb(235, 232, 235);
    /* 边框颜色 */
    padding: 2px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Ensures centered layout */
    gap: 2px;
    /* Increased consistent spacing */
    width: 100%;
    max-width: 150px;
    margin-top: 1px;
    /* Add some top margin to separate from upload button */
    margin-bottom: 1px;
    box-sizing: border-box;
    padding: 0 5px;
}

/* 标签样式 */
.video-lora-select-contain label {
    position: absolute;
    top: -10px;
    left: 10px;
    background-color: #f7f7f7;
    padding: 0 5px;
    font-family: "DM Sans Variable", sans-serif;
    font-size: 0.8rem;
    color: rgba(68, 66, 66, 0.6);
}

.video-lora-select-contain {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid rgba(170, 167, 167, 0.7);
    /* 初始边框颜色和不透明度 */
    padding: 8px;
    border-radius: 12px;
    transition: border-width 0.3s, border-color 0.3s;
    /* 添加过渡效果 */
}

.video-lora-select-contain:hover {
    border-width: 3px;
    border-color: rgb(17, 16, 16);
    /* 鼠标悬停时的边框颜色和不透明度 */
}

/* 新增：当 .video-lora-select-contain 被悬停时，其内部的 label 字体颜色变为白色 */
.video-lora-select-contain:hover label {
    color: #ff9900;
}

.video-lora-select-contain {
    margin-left: 10px;
    /* 上边距 */
    margin-right: 10px;
    /* 下边距 */
}

/* --- 响应式设计 --- */
@media (max-width: 1024px) {
    .video-container {
        width: 100%;
        max-width: 800px;
        height: auto;
        padding: 15px;
    }

    .video-player {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
        width: 100%;
        border: none;
        outline: none;
    }

    .video-player iframe,
    .video-player video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .download-link {
        right: 15px;
        bottom: 5px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
    }

    .video-text {
        font-size: 2rem;
        margin-left: 0;
        margin-top: 10px;
    }

    .video-container {
        padding: 10px;
        margin-bottom: 20px;
    }

    .video-player {
        border: none;
        outline: none;
        padding-bottom: 56.25%;
    }

    .input-top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-top-row textarea {
        height: 50px;
        margin-bottom: 10px;
    }

    .generate-button {
        width: 100%;
        font-size: 0.9rem;
    }

    .image-box-container {
        width: 100%;
        justify-content: space-around;
        margin: 10px 0;
    }

    .image-box {
        width: 60px;
        height: 60px;
    }

    .sub-buttons {
        justify-content: center;
    }

    .sub-button {
        flex: 1 1 auto;
        text-align: center;
    }

    .aiinked-video-input-group {
        padding: 0 5px;
        /* 减小左右边距 */
    }

    .aiinked-video-select {
        font-size: 0.9rem;
    }

    /* 新增Frame Point Editor Modal样式 */
    .frame-modal-content {
        padding: 10px;
    }

    .frame-editor-container {
        flex-direction: column;
    }

    .upload-panel {
        min-width: unset;
        max-width: unset;
    }

    .frame-panel {
        flex: 1;
    }

    .canvas-container {
        max-width: 100%;
        max-height: 360px;
    }

    .control-group {
        flex-wrap: wrap;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-options {
        gap: 10px;
    }

    .modal-option {
        min-width: 130px;
        padding: 10px;
    }

    .modal-option img {
        width: 80px;
        height: 80px;
    }
}

/* -------------------------------------- */
/* Frame Point Editor Modal Styles (New)  */
/* -------------------------------------- */

/* 沿用 .modal-overlay 样式 */

.frame-modal-content {
    background-color: #fff;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 1000px;
    /* 增加最大宽度以容纳两栏布局 */
    min-height: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.frame-editor-container {
    display: flex;
    gap: 20px;
    width: 100%;
    flex-grow: 1;
    margin-top: 15px;
}

.editor-panel {
    flex: 1;
    padding: 20px;
    border-radius: 12px;
    background-color: #f7f7f7;
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.upload-panel {
    min-width: 300px;
    max-width: 300px;
}

.frame-panel {
    flex: 3;
    background-color: #fff;
    /* 帧图片区域用白色背景 */
    border: 1px solid #ddd;
    overflow: hidden;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.input-group input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.primary-btn {
    background-color: #000;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
    transition: background-color 0.2s ease;
}

.primary-btn:hover:not(:disabled) {
    background-color: #333;
}

.primary-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.status-text {
    font-size: 0.9rem;
    color: #666;
    min-height: 18px;
    /* 避免文本变化时布局跳动 */
}

.placeholder-area {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.url-identifier {
    /* 核心修改：改为系统默认的比例字体，提升阅读舒适度 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* 确保文本自然换行，不需要强制 break-all */
    word-break: normal;

    /* 调整字体大小，保证可读性 */
    font-size: 0.95rem;

    /* 颜色：使用深灰色，既清晰又比纯黑柔和 */
    color: #333;

    /* 提升美观度和辨识度，使其看起来像一个“说明框” */
    background-color: #f7f7f7;
    /* 浅灰色背景，与页面区分 */
    padding: 15px;
    /* 增加内边距，提供“呼吸感” */
    border-radius: 8px;
    /* 柔和的圆角 */

    /* 增加一个突出的左侧边框，强调这是提示或说明 */
    border-left: 4px solid #007bff;
    /* 使用您文件中出现过的主题蓝色作为强调色 */

    /* 增加行高，让文字不那么拥挤，更易阅读 */
    line-height: 1.6;
}

#frameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    /* 初始透明度为0，加载图片后变为1 */
    opacity: 0;
    transition: opacity 0.5s;
    cursor: crosshair;
}

.control-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.control-btn {
    padding: 8px 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.control-btn.green {
    background-color: #e6ffe6;
    border-color: #00cc00;
    color: #00cc00;
}

.control-btn.red {
    background-color: #ffe6e6;
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.control-btn.clear {
    background-color: #f0f0f0;
    border-color: #aaa;
    color: #555;
}

.control-btn.active {
    font-weight: bold;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
    border-width: 2px;
}

.control-btn.green.active {
    background-color: #00cc00;
    color: #fff;
}

.control-btn.red.active {
    background-color: #ff4d4f;
    color: #fff;
}

.point-list-container {
    max-height: 70px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

#pointList {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

#pointList li {
    margin-bottom: 5px;
}

.confirm-btn {
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.confirm-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.confirm-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.close-btn svg {
    width: 24px;
    height: 24px;
    color: #555;
    transition: color 0.2s;
}

.close-btn:hover svg {
    color: #000;
}

.canvas-container {
    /* 核心修改：将容器最大尺寸修改为您需要的 480x480 */
    max-width: 480px;
    max-height: 480px;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    /* 保持容器为正方形 */

    overflow: hidden;
    margin: 15px auto;
    /* 居中显示 */

    /* 使用 Flexbox 确保图片/Canvas 在容器内居中 */
    display: flex;
    justify-content: center;
    /* 水平居中 */
    align-items: center;
    /* 垂直居中 */
}

/* 确保 Canvas 和 Image 元素按比例显示，并适应 540x540 容器 */
#frameCanvas,
#frameImage {
    /* 覆盖可能的内联样式或默认设置 */
    width: auto !important;
    height: auto !important;

    /* 限制最大尺寸为父容器的 100% */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* 确保图片完整显示在容器内 */
    display: block;
}

.frame-modal-content {
    /* 保持原有的居中和尺寸限制属性不变，仅添加缩放 */
    transform: scale(0.8);
    transform-origin: center center;
    /* 提示：如果弹窗关闭按钮 (close-btn) 在 content 之外，也需要对它进行相应缩放或调整位置。 */
}

/* --- 模态弹窗选项区域样式优化 (Model Selection Modal)251029 --- */

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    /* 核心修改：增加最大宽度以美观地容纳四个选项 */
    max-width: 900px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-options {
    display: flex;
    /* 关键：默认不换行，保持所有选项在一行 */
    flex-wrap: nowrap;
    justify-content: center;
    /* 选项之间的间距 */
    gap: 20px;
    width: 100%;
    /* 关键：当内容超出时显示水平滚动条 */
    overflow-x: auto;
    /* 为水平滚动条留出空间 */
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    /* 提高 iOS 上的滚动体验 */
}

/* 隐藏滚动条（可选：提升美观度） */
.modal-options::-webkit-scrollbar {
    height: 8px;
}

.modal-options::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-option {
    background-color: #f7f7f7;
    padding: 5px;
    /* 增加内边距，更美观 */
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    /* 核心修改：设置固定大小并阻止收缩 */
    min-width: 130px;
    /* 确保每个选项有足够的最小宽度 */
    width: 20%;
    /* 尝试让 4 个选项平分空间 */
    flex-shrink: 0;
    /* 关键：阻止选项在空间不足时收缩，从而触发滚动条 */
}

.modal-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-option img {
    /* 优化图片尺寸，使其在选项卡内居中且美观 */
    max-width: 138px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 8px;
}

.modal-option-text {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-top: 5px;
    white-space: nowrap;
    /* 防止文本换行，保持选项卡高度一致 */
}

#openFrameEditorBtn {
    /* 关键：设置 display: none 来完全移除元素在页面流中的占位 */
    display: none;
}


/* 分辨率选择按钮-start */

/* 默认隐藏分辨率选择器 */
.resolution-selector-group.hidden {
    display: none !important;
    /* 使用 !important 确保它覆盖可能的 flex 或 block 属性 */
}

.resolution-selector-group {
    display: flex;
    align-items: center;
    margin-left: 20px;
    /* 与 Point Editor 按钮保持一定间隔 */
    color: var(--text-color-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    /* 轻微圆角 */
    padding: 8px 15px;
    /* 增加内边距，将内容与边框隔开 */
    gap: 5px;
    /* 增加整体元素之间的间距 */
}

.resolution-label {
    font-size: 0.8em;
    margin-right: 10px;
    font-weight: 600;
}

.resolution-buttons {
    display: flex;
    gap: 5px;
    /* 按钮之间的间距 */
}

/* 隐藏实际的 radio input */
.resolution-buttons input[type="radio"] {
    display: none;
}

/* 调整 Label/Button 的样式，使其更像 sub-button */
.res-button {
    /* 继承 sub-button 的基础样式 */
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    border: 1px solid var(--border-color-dark);
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
    /* 增加 transform 过渡 */
    /* 覆盖 sub-button 的 flex 布局，只显示文字 */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    /* 移除 min-width 约束 */
}

/* 默认状态和悬停效果 - 增加边框强调 */
.res-button:hover {
    background-color: var(--button-hover-bg);
    border-color: #ff9900;
    /* 悬停时使用新颜色作为边框提示 */
}

/* 【优化建议 1】: 按下状态的即时反馈 */
.res-button:active {
    transform: scale(0.98);
    /* 按钮轻微缩小 */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3) inset;
    /* 添加内阴影模拟按下效果 */
}

/* 【核心修改】: 选中状态，背景为 #ff9900，字体为纯白色 #ffffff */
.resolution-buttons input[type="radio"]:checked+.res-button {
    background-color: #1a1918;
    color: #ffffff;
    /* <<<<<<< 字体颜色设置为纯白色 #ffffff */
    border-color: #ff9900;
    /* 增强视觉强调 */
    transform: scale(1);
    /* 确保选中后恢复正常大小 */
}

/* 确保选中时，分辨率文本（即 <span> 标签）也变为白色 */
.resolution-buttons input[type="radio"]:checked+.res-button span {
    color: #ffffff !important;
    /* 强制将 <span> 文本颜色设为纯白 */
}

/* 分辨率选择按钮-end */

.generate-text {
    color: #f7f7f7;
    display: flex;
    flex-direction: column;
    /* 垂直堆叠内容 */
    align-items: flex-start;
    /* 左对齐 Generate 和 Credits */
    line-height: 1.2;
    /* 允许使用 flex-direction: column; 配合 align-items */
}

/* 积分显示样式 */
#credits-display {
    font-size: 0.7em;
    /* 积分文本小一点 */
    /* 移除 margin-top，让 line-height 调整间距 */
    color: #f7f7f7;
}

/* aiinkedVideo.css 新增内容 */
.upload-status-icon {
    /* 容器尺寸 35x35px */
    width: 28px;
    height: 28px;
    margin-left: 8px;
    /* 图标与文本的间距 */
    display: flex;
    align-items: center;
    justify-content: center;
    /* 确保图标不会挤压文本 */
    flex-shrink: 0;
}

.upload-status-icon img {
    /* 确保图片填充容器 */
    width: 100%;
    height: 100%;
    object-fit: contain;
}