/* 图片转换器工具样式 */
.image-converter-tool {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* 统计信息样式 */
.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 工具栏样式 */
.text-toolbar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.text-toolbar .btn {
    min-width: 80px;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #0d6efd;
    background: #e9ecef;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background: #e7f3ff;
    transform: scale(1.02);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 3rem;
    color: #6c757d;
}

/* 图片预览样式 */
.preview-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.preview-container:hover img {
    transform: scale(1.05);
}

/* 图片信息样式 */
.image-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

/* 转换选项样式 */
#qualitySettings {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-range {
    height: 8px;
}

.form-range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    background: #0d6efd;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

#resizeOptions {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 0.5rem;
}

#advancedSettings {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

/* 转换进度样式 */
.conversion-progress {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* 结果预览样式 */
.result-preview {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-preview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.result-preview:hover img {
    transform: scale(1.02);
}

.result-info {
    font-size: 0.875rem;
}

/* 对比视图样式 */
.comparison-view {
    margin-top: 1rem;
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.comparison-item {
    text-align: center;
}

.comparison-item h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.comparison-item img {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem;
    max-height: 200px;
    object-fit: contain;
    width: 100%;
}

/* 批量转换样式 */
.batch-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.batch-upload-area:hover {
    border-color: #0d6efd;
    background: #e9ecef;
}

.batch-items {
    max-height: 300px;
    overflow-y: auto;
}

.batch-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: #fff;
    transition: all 0.3s ease;
}

.batch-item:hover {
    background: #f8f9fa;
    border-color: #0d6efd;
}

.batch-item-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.batch-item-info {
    flex: 1;
}

.batch-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.batch-item-details {
    font-size: 0.75rem;
    color: #6c757d;
}

.batch-item-status {
    width: 80px;
    text-align: center;
}

.batch-item-remove {
    color: #dc3545;
    cursor: pointer;
    transition: color 0.3s ease;
}

.batch-item-remove:hover {
    color: #bb2d3b;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    margin: 0;
}

/* 文字样式 */
.text-primary {
    color: #0d6efd !important;
}

.text-success {
    color: #198754 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* 按钮样式 */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7, #520dc2);
}

/* 卡片样式 */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
}

/* 输入框样式 */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 加载动画 */
.converting {
    position: relative;
    overflow: hidden;
}

.converting::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.3), transparent);
    animation: converting 1.5s infinite;
}

@keyframes converting {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 成功状态样式 */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 1rem;
    color: #155724;
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

/* 错误状态样式 */
.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1rem;
    color: #721c24;
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

/* 警告状态样式 */
.warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    color: #856404;
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }

    .text-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-item {
        margin-bottom: 0.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .preview-container img,
    .result-preview img {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 1.5rem 1rem;
    }

    .upload-icon {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .batch-item {
        flex-direction: column;
        text-align: center;
    }

    .batch-item-thumbnail {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .image-converter-tool {
        background: #1a1a1a;
        color: #e9ecef;
    }

    .stat-item {
        background: #2d3748;
        border-color: #4a5568;
    }

    .stat-item:hover {
        background: #4a5568;
    }

    .upload-area,
    .batch-upload-area {
        background: #2d3748;
        border-color: #4a5568;
        color: #e9ecef;
    }

    .upload-area:hover,
    .batch-upload-area:hover {
        background: #4a5568;
        border-color: #63b3ed;
    }

    .upload-area.dragover {
        background: #2c5282;
        border-color: #63b3ed;
    }

    .upload-icon {
        color: #a0aec0;
    }

    .text-toolbar,
    .conversion-progress,
    #qualitySettings,
    #resizeOptions,
    #advancedSettings {
        background: #2d3748;
        border-color: #4a5568;
    }

    .image-info {
        background: #2d3748;
        border-color: #4a5568;
    }

    .comparison-container {
        background: #2d3748;
        border-color: #4a5568;
    }

    .comparison-item img {
        background: #4a5568;
        border-color: #718096;
    }

    .batch-item {
        background: #2d3748;
        border-color: #4a5568;
    }

    .batch-item:hover {
        background: #4a5568;
        border-color: #63b3ed;
    }

    .card {
        background: #2d3748;
        border-color: #4a5568;
    }

    .card-header {
        background: #2d3748;
        border-color: #4a5568;
        color: #e9ecef;
    }

    .form-control,
    .form-select {
        background: #4a5568;
        border-color: #718096;
        color: #e9ecef;
    }

    .form-control:focus,
    .form-select:focus {
        background: #4a5568;
        border-color: #63b3ed;
        color: #e9ecef;
    }

    .preview-container,
    .result-preview {
        background: #2d3748;
    }
}

/* 打印样式 */
@media print {
    .text-toolbar,
    .conversion-progress,
    .card-header,
    footer {
        display: none !important;
    }

    .preview-container img,
    .result-preview img {
        max-height: none;
        overflow: visible;
        border: 1px solid #000;
        background: #fff;
    }

    .comparison-container {
        break-inside: avoid;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .upload-area,
    .batch-upload-area {
        border-width: 3px;
        border-color: #000;
    }

    .form-control,
    .form-select {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid #000;
        font-weight: 600;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}