/* GIF压缩工具样式 */

.tool-page {
    padding: 2rem 0 3rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tool-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-subtitle i {
    color: #2d8cf0;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #d0d7de;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    margin-bottom: 1.5rem;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #2d8cf0;
    background: #f0f7ff;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #2d8cf0 0%, #5b9bd5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
}

.upload-area h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.upload-area p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #2d8cf0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: #1d77d6;
    transform: translateY(-1px);
}

/* 选项区域 */
.options-section {
    margin-bottom: 1.5rem;
}

.option-item {
    background: #fafbfc;
    border-radius: 6px;
    padding: 0.875rem;
}

.option-item label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    display: block;
}

.option-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.75rem;
    line-height: 1.5;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #e1e4e8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-label:hover {
    border-color: #2d8cf0;
    background: #f8fbff;
}

.radio-label:has(input[type="radio"]:checked),
.radio-label.selected {
    border-color: #2d8cf0;
    background: #f0f7ff;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2d8cf0;
}

.radio-label span:first-of-type {
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2d8cf0;
    background: #f8fbff;
}

.mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mode-card {
    position: relative;
    padding: 1rem;
    background: #fafbfc;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-card:hover {
    border-color: #2d8cf0;
    background: #f8fbff;
}

.mode-card.selected {
    border-color: #2d8cf0;
    background: #f0f7ff;
}

.mode-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.mode-card.selected::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    background: #2d8cf0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
}

.mode-card.selected::before {
    content: '\2713';
}

.mode-icon {
    width: 3rem;
    height: 3rem;
    background: #e6f0fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: #2d8cf0;
    font-size: 1.25rem;
}

.mode-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.375rem;
}

.mode-info p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.mode-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #2d8cf0;
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #2d8cf0;
    color: #fff;
}

.btn-primary:hover {
    background: #1d77d6;
}

.btn-secondary {
    background: #f0f3f6;
    color: #333;
}

.btn-secondary:hover {
    background: #e4e8ec;
}

.btn-success {
    background: #22c55e;
    color: #fff;
}

.btn-success:hover {
    background: #16a34a;
}

/* 文件列表 */
.files-section {
    margin-bottom: 1.5rem;
}

.files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.file-count {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
}

.files-list {
    min-height: 120px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 1rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.95rem;
}

/* 文件项 */
.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #fafbfc;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #f0f7ff;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-preview {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background: #e1e4e8;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.8rem;
    color: #666;
}

.file-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.status-pending {
    background: #fef3c7;
    color: #b45309;
}

.status-compressing {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.file-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* 结果区域 */
.result-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e4e8;
}

.result-summary {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0fa 100%);
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

.summary-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.summary-item.highlight .summary-value {
    color: #22c55e;
    font-size: 1.5rem;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fafbfc;
    border-radius: 8px;
}

.result-preview {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.result-info {
    flex: 1;
}

.result-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.result-sizes {
    font-size: 0.85rem;
    color: #666;
}

.result-saved {
    font-size: 0.85rem;
    color: #22c55e;
    font-weight: 500;
}

.result-download {
    padding: 0.5rem 1rem;
    background: #2d8cf0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-download:hover {
    background: #1d77d6;
}

/* 功能特点 */
.features-section {
    padding: 2rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, #2d8cf0 0%, #5b9bd5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.375rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: #666;
}

/* GIF知识科普 */
.info-section {
    padding: 2rem 0;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.info-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.info-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.info-list {
    padding-left: 1.25rem;
    margin: 0;
}

.info-list li {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.compare-table {
    margin-top: 0.75rem;
    overflow-x: auto;
}

.compare-table table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e4e8;
}

.compare-table th {
    background: #f6f8fa;
    font-weight: 600;
    color: #333;
}

/* 应用场景 */
.scenario-section {
    padding: 2rem 0;
    background: #fff;
}

.scenario-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.scenario-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.scenario-item {
    text-align: center;
    padding: 1rem;
    background: #fafbfc;
    border-radius: 8px;
}

.scenario-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 0.75rem;
    background: #e6f0fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d8cf0;
    font-size: 1.25rem;
}

.scenario-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.375rem;
}

.scenario-item p {
    font-size: 0.85rem;
    color: #666;
}

/* FAQ */
.faq-section {
    padding: 2rem 0;
}

.faq-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.faq-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e6f0fa;
}

.faq-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f3f6;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.faq-answer {
    color: #666;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* 相关工具 */
.related-section {
    padding: 2rem 0;
    background: #fff;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    text-decoration: none;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: #e6f0fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d8cf0;
    font-size: 1.25rem;
}

.related-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.related-info p {
    font-size: 0.8rem;
    color: #666;
}

/* 响应式 */
@media (max-width: 768px) {
    .tool-card {
        padding: 1rem;
    }

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

    .mode-options {
        grid-template-columns: 1fr;
    }

    .result-summary {
        flex-direction: column;
        gap: 0.75rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .file-item,
    .result-item {
        flex-wrap: wrap;
    }
}
