/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 按钮容器样式 */
.buttons-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

/* 上传按钮样式 */
.upload-btn {
    white-space: nowrap;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #0056b3;
}

/* 表单头部样式 - 用于对齐标签和按钮 */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

/* 更新日志按钮样式 */
.changelog-btn {
    white-space: nowrap;
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.changelog-btn:hover {
    background-color: #5a6268;
}

/* 更新日志模态框样式 */
.changelog-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.changelog-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.changelog-close {
    color: #aaa;
    float: right;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 25px;
    right: 20px;
}

.changelog-close:hover,
.changelog-close:focus {
    color: black;
    text-decoration: none;
}

.changelog-content {
    margin-top: 20px;
}

.changelog-entry {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.changelog-entry:last-child {
    border-bottom: none;
}

.changelog-entry h3 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.changelog-entry ul {
    padding-left: 20px;
    margin: 0;
}

.changelog-entry li {
    margin-bottom: 5px;
    color: #6c757d;
}

/* 属性输入区域样式 */
.attributes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.attribute-item {
    display: flex;
    align-items: center;
}

.attribute-item label {
    width: 50px;
    font-weight: normal;
    margin-bottom: 0;
}

.attribute-item input {
    width: 100px;
    padding: 5px;
}

/* 图片预览区域样式 */
.image-preview-container {
    display: none;
    margin-top: 15px;
}

.image-preview-wrapper {
    position: relative;
    display: inline-block;
}

/* 图片关闭按钮样式 */
.image-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.image-close-btn:hover {
    background-color: #c82333;
}

/* 示例图按钮样式 */
.example-btn {
    white-space: nowrap;
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

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

.image-preview-container img {
    max-width: 200px;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.batch-props-input {
    width: 100%;
    padding: 8px;
}

.form-header-label {
    font-size: 12px;
    display: block;
    margin-bottom: 0px !important;
}

.form-header-top {
    margin-bottom: 0px !important;
}

/* 图片查看器遮罩层 */
.example-image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.example-image-viewer.active {
    display: flex;
}

/* 查看器图片容器 */
.example-viewer-img-container {
    position: relative;
    cursor: grab;
    user-select: none;
}

.example-viewer-img-container.grabbing {
    cursor: grabbing;
}

.example-viewer-img {
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}

/* 关闭按钮 */
.example-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s;
}

.example-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.example-close-btn::before,
.example-close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: white;
}

.example-close-btn::before {
    transform: rotate(45deg);
}

.example-close-btn::after {
    transform: rotate(-45deg);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-container {
    text-align: center;
}

/* 结果容器样式 */
.result-container {
    margin-top: 15px;
    padding: 5px 10px 10px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.result-container h2 {
    color: #2c3e50;
}

/* 多选标签下拉框样式 */
.tag-select-container {
    position: relative;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    cursor: pointer;
    background-color: #fff;
    min-height: 36px;
}

.tag-select-container:focus-within {
    outline: 2px solid #007bff;
}

.tag-chip {
    background-color: #007bff;
    color: white;
    border: 1px solid #0056b3;
    border-radius: 15px;
    padding: 3px 8px;
    margin: 3px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-chip .remove-btn {
    cursor: pointer;
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.tag-chip .remove-btn:hover {
    color: #dc3545;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 16px;
    color: #6c757d;
    padding: 0 5px;
    user-select: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #767676;
}

.tag-input-placeholder {
    color: #6c757d;
    margin: 3px;
    font-style: italic;
    flex-shrink: 0;
}

/* 模态弹窗样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-backdrop.show .modal {
    opacity: 1;
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px 0 24px;
    font-size: 18px;
    font-weight: bold;
}

.modal-body {
    padding: 20px 24px;
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

.modal-footer {
    padding: 0 24px 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-btn-primary {
    background-color: #007bff;
    color: white;
}

.modal-btn-primary:hover {
    background-color: #0056b3;
}

/* 根据通知类型设置不同的头部颜色 */
.modal-backdrop.success .modal-header {
    color: #28a745;
}

.modal-backdrop.error .modal-header {
    color: #dc3545;
}

.modal-backdrop.warning .modal-header {
    color: #ffc107;
}

.modal-backdrop.info .modal-header {
    color: #17a2b8;
}

.image-modal-img {
    cursor: pointer;
    transition: transform 0.2s;
    max-width: 200px;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.image-modal-img:hover {
    transform: scale(1.02);
}

/* 提交建议按钮样式 */
.suggest-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* 建议输入框样式 */
.feedback-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

/* 字符数统计样式 */
.char-count {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    text-align: right;
}

/* 作者地址容器样式 */
.author-url-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 5px;
}

.author-url {
    color: #007bff;
    text-decoration: none;
    /* font-size: 14px; */
    transition: color 0.3s;
}

.author-url:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 标题样式 */
h1 {
    text-align: center;
    color: #2c3e50;
}

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

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.result-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-height: 100px;
}

/* 加载状态样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .changelog-modal-content {
        margin: 10% auto;
        width: 95%;
    }

    /* 移动端按钮容器样式 */
    .buttons-container {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    /* 移动端按钮样式 */
    .upload-btn,
    .example-btn,
    .changelog-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 移动端属性输入区域样式 - 保持两列布局 */
    .attributes-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .attribute-item {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }

    .attribute-item label {
        width: 50px;
        font-weight: normal;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .attribute-item input {
        flex: 1;
        padding: 6px;
        min-width: 60px;
    }

    .example-close-btn {
        width: 30px;
        height: 30px;
        top: 15px;
        right: 15px;
    }

    .example-close-btn::before,
    .example-close-btn::after {
        width: 15px;
    }

    .container {
        padding: 15px 20px;
    }

    .h1-title {
        font-size: 26px;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}