/* 主要内容区样式 - 两行布局 */
    .content-container {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 60px);
        background-color: #f8f9fa;
    }

    /* 上方设置面板 */
    .top-panel {
        background-color: #fff;
        padding: 20px;
        box-shadow: 0 0 10px rgba(0,0,0,0.05);
    }

    .top-panel-body {
        display: flex;
        gap: 20px;
    }

    .top-left {
        flex: 1;
        min-width: 0;
    }

    .top-right {
        width: 320px;
        flex-shrink: 0;
        overflow-y: auto;
        max-height: 60vh;
    }

    /* 下方预览区 */
    .bottom-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        background-color: #2c3e50;
        background-image:
            radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
        background-size: 20px 20px;
    }

    .panel-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 20px;
        color: #0078d4;
        border-bottom: 2px solid #0078d4;
        padding-bottom: 8px;
    }

    /* 表单元素样式 */
    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        display: block;
        margin-bottom: 6px;
        font-weight: 500;
        color: #555;
    }

    .form-control {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background-color: #fff;
        box-sizing: border-box;
    }

    .range-container {
        display: flex;
        flex-direction: column;
    }

    .range-value {
        text-align: right;
        font-weight: 500;
        color: #0078d4;
        margin-top: 5px;
    }

    .btn {
        width: 100%;
        padding: 12px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 15px;
        font-weight: 500;
        text-align: center;
        margin-bottom: 10px;
        transition: all 0.2s ease;
    }

    .btn-primary {
        background-color: #0078d4;
        color: white;
    }

    .btn-primary:hover {
        background-color: #005a9e;
    }

    .btn-success {
        background-color: #28a745;
        color: white;
    }

    .btn-success:hover {
        background-color: #218838;
    }

    .btn-warning {
        background-color: #ffc107;
        color: #212529;
    }

    .btn-warning:hover {
        background-color: #e0a800;
    }

    .btn-disabled {
        background-color: #cccccc;
        cursor: not-allowed;
    }

    /* 图片预览区域样式 */
    .preview-area {
        width: 100%;
        max-width: 500px;
    }

    .preview-container {
        position: relative;
        border: 2px dashed #0078d4;
        background-color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 400px;
        height: 400px;
        margin: 0 auto;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .preview-text {
        color: #666;
        font-size: 16px;
        text-align: center;
        padding: 20px;
        background-color: #f8f9fa;
        border-radius: 4px;
        border: 1px solid #dee2e6;
    }

    /* 水印样式 */
    .watermark {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-weight: bold;
        font-size: 30px;
        color: rgba(225, 0, 0, 0.5);
        text-align: center;
        pointer-events: none;
        z-index: 999;
    }

    .watermark-overlay {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 5px 10px;
        border-radius: 15px;
        font-size: 12px;
        white-space: nowrap;
        pointer-events: none;
        z-index: 1000;
    }

    /* 缩略图和图片列表样式 */
    .thumbnail-container {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 15px 0;
    }

    .thumbnail {
        position: relative;
        width: 80px;
        height: 80px;
        border: 2px solid #0078d4;
        border-radius: 4px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s;
    }

    .thumbnail:hover {
        transform: scale(1.05);
    }

    .thumbnail.active {
        border-color: #28a745;
        box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
    }

    /* 图片名称溢出处理 */
    #selected-image-name {
        max-width: 220px;
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .thumbnail-number {
        position: absolute;
        top: 3px;
        left: 3px;
        background-color: #0078d4;
        color: white;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
        z-index: 10;
    }

    .image-editor {
        margin-top: 20px;
        padding: 15px;
        background-color: #f5f5f5;
        border-radius: 5px;
        border: 1px solid #e0e0e0;
    }

    .editor-title {
        font-weight: 600;
        margin-bottom: 10px;
        color: #444;
    }

    .position-controls {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        margin-bottom: 15px;
    }

    .position-btn {
        padding: 8px;
        background-color: #f0f0f0;
        border: 1px solid #ddd;
        border-radius: 3px;
        cursor: pointer;
        text-align: center;
        font-size: 12px;
    }

    .position-btn:hover {
        background-color: #e0e0e0;
    }

    .position-btn.active {
        background-color: #0078d4;
        color: white;
        border-color: #0066b2;
    }

    .tips-container {
        margin-top: 30px;
        background-color: #f0f7ff;
        padding: 15px;
        border-radius: 5px;
        border-left: 4px solid #0078d4;
    }

    .tips-container h3 {
        margin-top: 0;
        color: #0078d4;
        font-size: 16px;
        margin-bottom: 10px;
    }

    .tips-container ul {
        margin: 0;
        padding-left: 20px;
    }

    .tips-container li {
        margin-bottom: 8px;
        font-size: 14px;
        color: #333;
    }

    .custom-file-upload {
        display: inline-block;
        padding: 12px 15px;
        cursor: pointer;
        background-color: #0078d4;
        color: white;
        border-radius: 4px;
        text-align: center;
        transition: all 0.2s ease;
        width: 100%;
        box-sizing: border-box;
    }

    .custom-file-upload:hover {
        background-color: #005a9e;
    }

    input[type="file"] {
        display: none;
    }

    /* 对话框样式 */
    #dialogOverlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    #customDialog {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        width: 300px;
        text-align: center;
        z-index: 1001;
    }

    #customDialog p {
        margin-bottom: 20px;
        font-size: 16px;
    }

    #customDialog button {
        padding: 8px 16px;
        margin: 5px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }

    #confirmYes {
        background-color: #28a745;
        color: white;
    }

    #confirmNo {
        background-color: #dc3545;
        color: white;
    }

    /* 位置调整面板样式 */
    .position-editor {
        margin-top: 15px;
    }

    .position-slider {
        margin-bottom: 10px;
    }

    /* 响应式设计 */
    @media (max-width: 1200px) {
        .top-panel-body {
            flex-direction: column;
        }

        .top-right {
            width: 100%;
            max-height: none;
        }

        .preview-container {
            width: 100%;
            max-width: 400px;
            height: auto;
            aspect-ratio: 1/1;
        }
    }

    /* 移动端操作区居中 */
    @media (max-width: 768px) {
        .top-right {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            text-align: center;
        }

        .panel-title {
            text-align: center;
            width: 100%;
        }

        .debug-container {
            width: 100%;
            max-width: 300px;
        }

        .image-editor {
            width: 100%;
            max-width: 300px;
        }

        .tips-container {
            width: 100%;
            max-width: 300px;
        }
    }

    /* 调试信息样式 */
    .debug-info {
        display: none;
        background-color: #f8d7da;
        color: #721c24;
        padding: 10px;
        margin: 10px 0;
        border-radius: 5px;
        border: 1px solid #f5c6cb;
        font-size: 14px;
        max-height: 200px;
        overflow-y: auto;
    }

    .debug-toggle {
        font-size: 12px;
        color: #6c757d;
        cursor: pointer;
        text-decoration: underline;
        text-align: right;
        margin-top: 5px;
        user-select: none;
    }

    /* 标签页样式 */
    .tab-container {
        margin-bottom: 20px;
    }

    .tab-buttons {
        display: flex;
        border-bottom: 2px solid #eee;
        margin-bottom: 20px;
    }

    .tab-button {
        flex: 1;
        padding: 12px 20px;
        background-color: #f8f9fa;
        border: none;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        color: #666;
        transition: all 0.3s ease;
        border-bottom: 3px solid transparent;
    }

    .tab-button:hover {
        background-color: #e9ecef;
        color: #333;
    }

    .tab-button.active {
        background-color: #fff;
        color: #0078d4;
        border-bottom-color: #0078d4;
    }

    .tab-content {
        display: none;
    }

    .tab-content.active {
        display: block;
    }

    /* 视频转GIF相关样式 */
    .video-preview {
        width: 100%;
        max-width: 300px;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .video-info {
        background-color: #f8f9fa;
        padding: 10px;
        border-radius: 5px;
        margin-bottom: 15px;
        font-size: 14px;
    }

    .video-info-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;
    }

    .video-info-item:last-child {
        margin-bottom: 0;
    }

    .progress-container {
        margin: 15px 0;
        display: none;
    }

    .progress-bar {
        width: 100%;
        height: 20px;
        background-color: #e9ecef;
        border-radius: 10px;
        overflow: hidden;
    }

    .progress-fill {
        height: 100%;
        background-color: #0078d4;
        width: 0%;
        transition: width 0.3s ease;
        border-radius: 10px;
    }

    .progress-text {
        text-align: center;
        margin-top: 5px;
        font-size: 14px;
        color: #666;
    }

    /* 防止右键保存图片的保护措施 */
    .preview-container img {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-user-drag: none;
        -khtml-user-drag: none;
        -moz-user-drag: none;
        -o-user-drag: none;
        user-drag: none;
        pointer-events: none;
    }

    .preview-container {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* ASCII显示相关样式 */
    .ascii-display {
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 8px;
        line-height: 8px;
        white-space: pre;
        color: #00ff00;
        background-color: #000000;
        padding: 10px;
        border-radius: 4px;
        overflow: auto;
        max-width: 100%;
        max-height: 100%;
        text-align: left;
    }

    .ascii-container {
        position: relative;
        background-color: #000000;
        border-radius: 8px;
        padding: 10px;
        overflow: hidden;
    }
