/* 工具详情页样式 */

.tool-detail-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.tool-detail-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-title i {
    color: #007bff;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* 工具操作区 */
.tool-operation {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 40px;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.upload-label i {
    font-size: 2.5rem;
    color: #007bff;
}

.upload-label span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.upload-label p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* 文件信息 */
.file-info {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.no-file {
    text-align: center;
    color: #666;
    margin: 0;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details i {
    font-size: 2rem;
    color: #007bff;
}

.file-meta {
    flex: 1;
}

.file-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

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

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

.options-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.option-item {
    margin-bottom: 15px;
}

.option-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.option-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
    margin-left: 28px;
}

/* 操作区域 */
.action-section {
    display: flex;
    justify-content: center;
}

.convert-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.convert-btn:hover {
    background-color: #0069d9;
    transform: translateY(-2px);
}

.convert-btn:active {
    transform: translateY(0);
}

/* 转换结果区域 */
.result-section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 40px;
}

.result-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.result-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
}

.no-result {
    text-align: center;
    color: #666;
    padding: 40px 0;
}

.loading {
    text-align: center;
    color: #007bff;
    padding: 40px 0;
    font-size: 1.1rem;
}

.error {
    color: #dc3545;
    text-align: center;
    padding: 40px 0;
}

.result-text pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.result-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #28a745;
    text-align: center;
}

.result-success i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.result-success p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* 结果操作区 */
.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-btn,
.copy-btn,
.clear-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover:not(:disabled) {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}

.copy-btn:hover:not(:disabled) {
    background-color: #ffc107;
    color: #333;
    border-color: #ffc107;
}

.clear-btn:hover:not(:disabled) {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.download-btn:disabled,
.copy-btn:disabled,
.clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 功能说明区 */
.feature-section {
    margin-bottom: 40px;
}

.feature-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    color: #28a745;
    font-size: 1.2rem;
}

.feature-item span {
    font-size: 1rem;
    color: #333;
}

/* 常见问题 */
.faq-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.faq-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.faq-list {
    overflow: hidden;
}

.faq-item {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

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

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #007bff;
}

.faq-answer {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.show {
    max-height: 200px;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .tool-operation {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px;
    }
    
    .result-section {
        padding: 20px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
    
    .faq-section {
        padding: 20px;
    }
}

/* 提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}