* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    background: #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #e0e0e0;
}

.btn.primary {
    background: #4CAF50;
    color: white;
}

.btn.primary:hover {
    background: #388E3C;;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.upload-area:hover {
    border-color: #2196F3;
}

.gallery {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
}
/* 修改原有的 copy-url-btn 样式 */
.copy-btn-group {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.copy-url-btn {
    flex: 1;
    padding: 5px;
    background: #a0a0a0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.copy-url-btn:hover {
    background: #6a6868;
}

.copy-url-btn.md {
    background: #4CAF50;
}

.copy-url-btn.md:hover {
    background: #388E3C;
}

.copy-success {
    background: #4CAF50 !important;
}

.url-preview {
    margin-top: 5px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    word-break: break-all;
}

.url-preview small {
    color: #666;
}

.url-hint {
    margin-top: 5px;
}

.url-hint small {
    color: #666;
}

#urlPreview {
    color: #2196F3;
    font-family: monospace;
}

.form-group {
    margin-bottom: 20px;
}

/* Toast 提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 1001;
    animation: toast-fade-in 0.3s ease;
}

.toast-info {
    background-color: #61c864;
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #F44336;
}

.toast-fade-out {
    animation: toast-fade-out 0.3s ease forwards;
}

@keyframes toast-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

.upload-options {
    border: 2px dashed #ccc;
    margin-top: 20px;
    padding: 10px;
    text-align: center;
}

.preview-area {
    margin: 10px 0;
    text-align: center;
}

#previewImage {
    max-width: 800px;
    max-height: 400px;
}

.quality-control {
    margin: 10px 0;
}

.image-info {
    color: #666;
    font-size: 14px;
}