* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 50px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* 主要标题 */
h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

/* 标签页导航 */
.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    padding: 15px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #667eea;
    background-color: #f8f9fa;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: #f0f3ff;
}

/* 标签页内容 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.upload-area:hover {
    border-color: #667eea;
    background-color: #f0f3ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background-color: #f0f3ff;
    transform: scale(1.02);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    height: 100%;
    width: 100%;
}

.upload-text {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.file-info {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

.file-format {
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
}

/* 链接提取区域 */
.link-section {
    margin-bottom: 30px;
}

.link-section input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.link-section input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 语言选择 */
.language-section {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.language-label {
    display: block;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.language-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.language-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95em;
    color: #666;
    transition: all 0.3s ease;
    padding: 6px 10px;
    border-radius: 6px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.language-option input[type="radio"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.language-option:hover {
    color: #667eea;
    border-color: #667eea;
    background-color: #f0f3ff;
}

.language-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

/* 按钮样式 */
.btn-primary {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.btn-primary:disabled {
    background: #bdc3c7;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    margin-right: 10px;
    display: inline-block;
    width: auto;
    padding: 12px 25px;
    font-size: 1.1em;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

/* 进度条 */
.progress-section {
    margin-top: 25px;
}

.progress-bar {
    position: relative;
    border: 2px solid #667eea;
    border-radius: 15px;
    overflow: hidden;
    background-color: #fdfdfd;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
    height: 35px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease-in-out;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    margin-top: 10px;
}

/* 结果区域 */
.result-section {
    margin-top: 35px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background-color: #ffffff;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-controls {
    text-align: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.result-text,
.result-textarea {
    padding: 25px;
    white-space: pre-wrap;
    line-height: 1.8;
    color: #555;
    font-size: 1.05em;
    min-height: 180px;
    width: 100%;
    border: none;
    resize: vertical;
    background-color: transparent;
    font-family: 'Inter', 'Microsoft YaHei', Arial, sans-serif;
    outline: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 30px 25px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
    }
    
    .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 1.1em;
    }
}
