/* 圆角图片生成器样式 */

.tool-page {
    padding: 1.5rem 0 2rem;
    background: #f5f7fa;
}

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

.tool-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

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

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

/* 上传区域 */
.upload-area {
    border: 2px dashed #e1e4e8;
    border-radius: 8px;
    padding: 1.75rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafbfc;
    margin-bottom: 1rem;
}

.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: 1rem;
}

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

.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;
}

/* 圆角滑块 */
#radiusSlider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #2d8cf0, #5b9bd5);
    border-radius: 4px;
    cursor: pointer;
}

#radiusSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid #2d8cf0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 预设按钮 */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e1e4e8;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    border-color: #2d8cf0;
    color: #2d8cf0;
}

.preset-btn.active {
    background: #2d8cf0;
    color: #fff;
    border-color: #2d8cf0;
}

/* 预览区域 */
.preview-section {
    margin-bottom: 1rem;
}

.preview-container {
    position: relative;
    background: #fafbfc;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-canvas {
    max-width: 100%;
    max-height: 400px;
    display: block;
    border-radius: 0;
}

.corner-handle {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #2d8cf0;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: move;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.corner-handle:hover {
    transform: scale(1.2);
    background: #1d77d6;
}

.corner-handle.top-left {
    top: -12px;
    left: -12px;
}

.corner-handle.top-right {
    top: -12px;
    right: -12px;
}

.corner-handle.bottom-left {
    bottom: -12px;
    left: -12px;
}

.corner-handle.bottom-right {
    bottom: -12px;
    right: -12px;
}

.preview-hint {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.preview-hint i {
    margin-right: 0.25rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    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-warning {
    background: #faad14;
    color: #fff;
}

.btn-warning:hover {
    background: #d4940a;
}

.btn-success {
    background: #52c41a;
    color: #fff;
}

.btn-success:hover {
    background: #3f9e0d;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 文件列表 */
.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-icon {
    font-size: 2rem;
    color: #2d8cf0;
}

.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-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;
}

/* 功能特点 */
.feature-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;
}

/* 使用教程 */
.tutorial-section {
    padding: 2rem 0;
    background: #fff;
}

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

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

.tutorial-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f3f6;
}

.tutorial-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    width: 1.75rem;
    height: 1.75rem;
    background: #2d8cf0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* 科普知识 */
.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;
}

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

.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;
}

.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;
}

/* Toast提示 */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.toast.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

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

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

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

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