body {
    background: #f5f7fa;
}

.codeformat-tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.codeformat-tool-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.tool-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    padding: 0.5rem 0.5rem 0 0.5rem;
}

.tab-btn {
    padding: 0.875rem 2rem;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102,126,234,0.08);
}

.tab-btn.active {
    color: #667eea;
    background: rgba(102,126,234,0.1);
    border-bottom-color: #667eea;
    box-shadow: 0 -2px 8px rgba(102,126,234,0.1) inset;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-section,
.output-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

.section-header h2 {
    color: #444;
    font-size: 1.2rem;
    margin: 0;
}

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

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

textarea[readonly] {
    background: #f8f9ff;
}

.input-info,
.output-info {
    margin-top: 0.75rem;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

.options-section {
    background: #f0f7ff;
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.option-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-size: 0.95rem;
}

.option-row select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.option-row select:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #4a5568;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.action-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}

.btn-secondary {
    padding: 1rem 2rem;
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-secondary.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: transparent;
}

.info-section {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2rem;
}

.info-section h3 {
    color: #065f46;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-section ul {
    padding-left: 1.5rem;
}

.info-section li {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .codeformat-tool-container {
        padding: 1rem;
    }
    
    .tool-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .input-section,
    .output-section {
        padding: 1.25rem;
    }
    
    textarea {
        min-height: 150px;
    }
    
    .option-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .action-buttons {
        width: 100%;
    }
}
