/* 图片压缩工具 - 简洁版样式 */

.image-zip-simple {
    background: var(--bg-primary, #f5f7fa);
    min-height: calc(100vh - 80px);
    padding: 40px 0;
}

/* CSS 变量回退 */
:root {
    --primary-color: #35be70;
    --primary-dark: #2a9d5a;
    --primary-light: #4fd489;
}

.image-zip-simple .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #007bff;
}

.breadcrumb i {
    font-size: 12px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-title i {
    color: var(--primary-color);
}

.page-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    background: white;
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    user-select: none;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0fdf4;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #dcfce7;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-hint {
    color: #666;
    margin-bottom: 25px;
}

.btn-upload {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.btn-upload:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(53, 190, 112, 0.3);
}

/* 压缩设置区域 */
.compress-settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.compress-mode-selector h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.mode-option {
    cursor: pointer;
    position: relative;
}

.mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-content {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.mode-content i {
    font-size: 32px;
    color: #666;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.mode-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.mode-desc {
    display: block;
    font-size: 13px;
    color: #666;
}

.mode-option input[type="radio"]:checked + .mode-content {
    border-color: var(--primary-color);
    background: rgba(53, 190, 112, 0.05);
}

.mode-option input[type="radio"]:checked + .mode-content i {
    color: var(--primary-color);
}

.mode-option:hover .mode-content {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 自定义压缩设置 */
.custom-compress-settings {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.custom-compress-settings label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.ratio-slider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.ratio-slider input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.ratio-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ratio-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ratio-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
}

.ratio-hint {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.ratio-hint strong {
    color: var(--primary-color);
}

/* 操作按钮区域 */
.action-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(53, 190, 112, 0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

/* 图片列表 */
.images-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
}

.image-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s;
    background: white;
}

.image-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-item.compressed {
    border-color: #28a745;
    background: #f8fff9;
}

.image-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    border: 1px solid #dee2e6;
}

.image-info {
    flex: 1;
    min-width: 0;
}

.image-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-details {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.image-size,
.image-compressed-size,
.image-saved {
    display: flex;
    align-items: center;
    gap: 5px;
}

.image-saved {
    color: #28a745;
    font-weight: 600;
}

/* 进度条 */
.image-progress {
    margin: 10px 0;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.3s;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 1.5s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.image-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    margin-top: 5px;
}

.status-pending {
    color: #6c757d;
}

.status-compressing {
    color: var(--primary-color);
}

.status-completed {
    color: #28a745;
}

.status-error {
    color: #dc3545;
}

/* 图片操作 */
.image-actions {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.btn-download,
.btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn-download:hover:not(:disabled) {
    background: #218838;
}

.btn-download:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* 上传确认模态框 */
.upload-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.upload-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
    position: relative;
    z-index: 100000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.upload-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
}

.upload-modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.upload-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.upload-info {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.upload-info strong {
    color: #007bff;
    font-size: 18px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.preview-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 28px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 48px;
    }

    .action-section {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .image-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .image-thumbnail {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .image-actions {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .btn-download,
    .btn-delete {
        flex: 1;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
}

