/* 开发者工具页面样式 */

/* 页面标题区 */
.page-header {
    background-color: #1e293b;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        radial-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.7;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto;
}

/* 工具内容区域 */
.tool-content {
    padding: 2rem 0 5rem;
}

/* 工具选项卡 */
.tool-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    /* overflow-x: auto; */
    scrollbar-width: thin;
    background-color: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    position: relative;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-btn i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.tab-btn:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
    color: #3b82f6;
    background-color: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3b82f6;
    border-radius: 3px 3px 0 0;
}

/* 工具面板 */
.tool-panel {
    display: none;
    animation: fadeIn 0.3s ease;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.tool-panel.active {
    display: block;
}

.tool-description {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.tool-description h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.tool-description p {
    color: #64748b;
}

/* 代码工具容器 */
.code-tool-container {
    display: grid;
    grid-template-columns: 1fr 280px 1fr;
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .code-tool-container {
        grid-template-columns: 1fr;
    }
}

/* 输入输出区域 */
.input-section, .output-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.section-header h4 {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

textarea {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

textarea::placeholder {
    color: #94a3b8;
}

.code-output {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background-color: #f8fafc;
    overflow-x: auto;
white-space: pre-wrap;
    color: #1e293b;
}

/* 选项区域 */
.options-section {
    background-color: #f8fafc;
    border-radius: 6px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group:last-child {
    margin-bottom: 0;
    margin-top: auto;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #334155;
}

/* 输入框组 */
.input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

.input-group span {
    white-space: nowrap;
    color: #64748b;
    font-size: 0.9rem;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 1.5rem;
    color: #334155;
}

.radio-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-option span {
    transition: color 0.2s ease;
}

.radio-option input:checked ~ span {
    color: #3b82f6;
    font-weight: 500;
}

.radio-option input:checked ~ span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #3b82f6;
}

.radio-option span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 1.5rem;
    color: #334155;
}

.checkbox-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-option span {
    transition: color 0.2s ease;
}

.checkbox-option input:checked ~ span {
    color: #3b82f6;
}

.checkbox-option input:checked ~ span::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    font-size: 12px;
    color: white;
    background-color: #3b82f6;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-option span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-color: white;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    transition: all 0.2s ease;
}

/* 选择框样式 */
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: white;
    transition: border-color 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* 结果消息 */
.result-message {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.result-message.info {
    display: block;
    background-color: #eff6ff;
    color: #3b82f6;
    border: 1px solid #dbeafe;
}

.result-message.success {
    display: block;
    background-color: #f0fdf4;
    color: #10b981;
    border: 1px solid #dcfce7;
}

.result-message.error {
    display: block;
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

/* 功能特点区域 */
.tool-features {
    background-color: #f8fafc;
    padding: 5rem 0;
}

.tool-features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #1e293b;
}

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

.feature-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 1.8rem;
    color: #3b82f6;
}

.feature-item h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    color: #1e293b;
}

.feature-item p {
    color: #64748b;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .tool-features h2 {
        font-size: 1.6rem;
    }
    
    .tab-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    textarea, .code-output {
        min-height: 300px;
    }
     .usage-guide h2 {
        font-size: 1.6rem;
    }
    
    .guide-steps {
        grid-template-columns: 1fr;
    }
    
    .guide-step {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .tool-panel {
        padding: 1rem;
    }
    
    .options-section {
        padding: 1rem;
    }
    
    .section-header h4 {
        font-size: 1rem;
    }
    
    textarea, .code-output {
        min-height: 250px;
        font-size: 0.85rem;
        padding: 0.75rem;
    }
}
    /* 使用指南区域 */
.usage-guide {
    background-color: #ffffff;
    padding: 5rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.usage-guide h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #1e293b;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.guide-step {
    display: flex;
    gap: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-size: 1.3rem;
}

.step-content p {
    color: #64748b;
    line-height: 1.6;
}

