body {
    background-color: #f8f9fa;
    padding: 2rem 0;
}

.encoder-tool {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.encoder-tool h2 {
    margin-bottom: 0.5rem;
    color: #333;
}

.form-section {
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #444;
    font-weight: 500;
    font-size: 0.9rem;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-control {
    font-size: 0.9rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-control:focus {
    border-color: #4a90e2;
    background: white;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.1);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    line-height: 1.5;
    font-family: monospace;
}

/* 选项卡样式 */
.nav-tabs {
    border-bottom: 1px solid #e0e0e0;
}

.nav-tabs .nav-link {
    border: none;
    color: #666;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link i {
    margin-right: 6px;
}

.nav-tabs .nav-link:hover {
    border: none;
    color: #4a90e2;
}

.nav-tabs .nav-link.active {
    border: none;
    color: #4a90e2;
    position: relative;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #4a90e2;
}

/* 开关样式 */
.switch-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #4a90e2;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

input:disabled + .slider:before {
    background-color: #f5f5f5;
}

.switch-label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

/* 结果区域样式 */
.result-section {
    margin-top: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.result-section h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.result-container {
    position: relative;
    margin-bottom: 1rem;
}

.result-container pre {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.9rem;
    color: #333;
    border: 1px solid #e0e0e0;
    min-height: 100px;
    max-height: 300px;
}

.result-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* 图片预览区域 */
.image-preview {
    margin-top: 1.5rem;
    text-align: center;
}

.image-preview h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 表单选择器样式 */
.form-select {
    font-size: 0.9rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #4a90e2;
    background: white;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.1);
    outline: none;
}

/* 复制成功提示 */
.copy-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-tooltip.show {
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .options {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions button {
        width: 100%;
    }
    
    .switch-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
} 