* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    gap: 15px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 32px;
    height: 32px;
}

.header-text {
    font-size: 24px;
    color: #333;
}

.header-link {
    font-size: 14px;
    color: #267EF0;
    text-decoration: none;
    font-weight: normal;
}

.header-link:hover {
    text-decoration: underline;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total-stats {
    font-size: 14px;
    color: #333;
    padding: 5px 12px;
    border-radius: 4px;
    min-height: 24px;
    text-align: center;
    background-color: #f0f0f0;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: 1px solid #ddd;
    transition: background-color 0.3s ease;
}


.modify-stats {
    font-size: 14px;
    color: #333;
    padding: 5px 12px;
    border-radius: 4px;
    min-height: 24px;
    min-width: 80px;
    text-align: center;
    background-color: #2bc350;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modify-stats:hover {
    background-color: #22a844;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #267EF0;
    color: white;
}

.btn-primary:not(:disabled):hover {
    background-color: #1e5abf;
}

.btn-success {
    background-color: #2bc350;
    color: white;
}

.btn-success:not(:disabled):hover {
    background-color: #22a844;
}

.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #888888;
    color: white;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #888888;
    color: white;
}

/* .btn-secondary {
    background-color: #888888;
} */

.btn-secondary:not(:disabled):hover {
    background-color: #b3b3b3;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #888888;
    color: white;
}

.btn-danger {
    background-color: #ff4c3b;
    color: white;
}

.btn-danger:not(:disabled):hover {
    background-color: #ff4c3b;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #FF6963;
    color: white;
}

.btn-info {
    background-color: white;
    color: #2bc350;
    padding: 4px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-info:hover {
    background-color: #eeeeee;
}

/* 元数据 tooltip 样式 */
.image-card {
    position: relative;
}

.image-meta-tooltip {
    position: absolute;
    bottom: 60px;
    left: 15px;
    background-color: #333;
    color: white;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.6;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 80%;
}

.image-meta-tooltip .tooltip-content p {
    margin: 5px 0;
    word-break: break-all;
}

.image-meta-tooltip .tooltip-content strong {
    color: #aaa;
    display: inline-block;
    min-width: 70px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.image-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 有待提交修改的卡片样式 */
.image-card.has-modify {
    border: 2px solid #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3), 0 4px 8px rgba(0,0,0,0.15);
}

.image-card-thumb {
    width: 100%;
    height: 200px;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.image-card-thumb .thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card-thumb:hover .thumb-image {
    transform: scale(1.05);
}

.image-info {
    margin-bottom: 15px;
}

.image-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    position: relative;
}

.image-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    word-break: break-word;
}

.image-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.image-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
}

.login-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #808080;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 8px 8px;
    flex-shrink: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 分页样式 */
.pagination {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 5px 0px;
    background-color: white;
    border-top: 1px solid #ddd;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .pagination {
        padding: 2px 0px;
        gap: 2px;
    }
    .pagination button {
        padding: 8px 8px;
    }
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 15px;
}

.upload-area {
    width: 100%;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #267EF0;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #267EF0;
    background-color: #e8f0fe;
}

.upload-area-empty .upload-preview-img {
    display: none !important;
}

.upload-area:not(.upload-area-empty) .upload-placeholder {
    display: none;
}

.upload-area:not(.upload-area-empty) {
    border-style: solid;
    border-color: #ddd;
}

.upload-placeholder {
    text-align: center;
    color: #999;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-placeholder p {
    font-size: 14px;
    margin: 0;
}

.upload-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .header-title {
        width: 100%;
        justify-content: flex-start;
    }

    .header-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 10px;
    }

    .header-stats {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions button {
        flex: 1;
    }
    
}

/* 加载动画样式 */
.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Toast 通知样式 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2000;
    max-width: 300px;
    word-wrap: break-word;
}

.toast-show {
    opacity: 1;
}

.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545;
}

.toast-warning {
    background-color: #ffc107;
    color: #333;
}

/* 拖拽上传区域样式 */
.drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #267EF0;
    background-color: #f0f7ff;
}

.drop-zone p {
    margin: 0;
    color: #666;
}

.file-label {
    color: #267EF0;
    cursor: pointer;
    text-decoration: underline;
}

.file-label:hover {
    color: #1e5abf;
}

/* 上传加载动画样式 */
.upload-loading {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
}

.upload-loading.show {
    display: flex;
}

.upload-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 大图模态框样式 */
.imageflow-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow: auto;
}

.imageflow-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.imageflow-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.imageflow-modal-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 75vh;
    margin-top: 20px;
}

.imageflow-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.imageflow-modal-info {
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    text-align: center;
    max-height: 20vh;
    overflow-y: auto;
}

.imageflow-modal-info h2 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.imageflow-description {
    font-size: 14px;
    line-height: 1.6;
    color: #ddd;
    text-align: center;
}

.imageflow-description a {
    color: #87ceeb;
    text-decoration: none;
}

.imageflow-description a:hover {
    text-decoration: underline;
}

.imageflow-description p {
    margin: 5px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 缓存详情样式 */
.cache-section {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.cache-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.cache-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}

.cache-item:last-child {
    margin-bottom: 0;
}

.cache-item-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.cache-item-detail {
    font-size: 13px;
    color: #666;
    margin-bottom: 3px;
}

.cache-empty {
    color: #999;
    font-style: italic;
    padding: 10px;
    text-align: center;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 45px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


